-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To be used by the kustomize-controller and helm-controller for various patching functionalities. Signed-off-by: Hidde Beydals <[email protected]>
- Loading branch information
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
Copyright 2021 The Flux authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Package kustomize contains a selective set of Kustomize APIs for use by | ||
// toolkit components. | ||
package kustomize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/fluxcd/pkg/apis/kustomize | ||
|
||
go 1.15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
Copyright 2021 The Flux authors | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package kustomize | ||
|
||
// Image contains an image name, a new name, a new tag or digest, | ||
// which will replace the original name and tag. | ||
type Image struct { | ||
// Name is a tag-less image name. | ||
// +required | ||
Name string `json:"name"` | ||
|
||
// NewName is the value used to replace the original name. | ||
// +optional | ||
NewName string `json:"newName,omitempty"` | ||
|
||
// NewTag is the value used to replace the original tag. | ||
// +optional | ||
NewTag string `json:"newTag,omitempty"` | ||
|
||
// Digest is the value used to replace the original image tag. | ||
// If digest is present NewTag value is ignored. | ||
// +optional | ||
Digest string `json:"digest,omitempty" yaml:"digest,omitempty"` | ||
} | ||
|
||
// Selector specifies a set of resources. | ||
// Any resource that matches intersection of all conditions is included in this set. | ||
type Selector struct { | ||
// Group is the API group to select. | ||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md | ||
// +optional | ||
Group string `json:"group,omitempty"` | ||
|
||
// Version of the API Group to select. | ||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md | ||
// +optional | ||
Version string `json:"version,omitempty"` | ||
|
||
// Kind of the API Group to select. | ||
// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md | ||
// +optional | ||
Kind string `json:"kind,omitempty"` | ||
|
||
// +optional | ||
Namespace string `json:"namespace,omitempty"` | ||
|
||
// +optional | ||
Name string `json:"name,omitempty"` | ||
|
||
// AnnotationSelector is a string that follows the label selection expression | ||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api | ||
// It matches with the resource annotations. | ||
// +optional | ||
AnnotationSelector string `json:"annotationSelector,omitempty"` | ||
|
||
// LabelSelector is a string that follows the label selection expression | ||
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api | ||
// It matches with the resource labels. | ||
// +optional | ||
LabelSelector string `json:"labelSelector,omitempty"` | ||
} |