mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
Support custom config for image transformer
This commit is contained in:
@@ -31,7 +31,7 @@ func GetDefaultFieldSpecs() []byte {
|
||||
[]byte(namespaceFieldSpecs),
|
||||
[]byte(varReferenceFieldSpecs),
|
||||
[]byte(nameReferenceFieldSpecs),
|
||||
[]byte(imageFieldSpecs),
|
||||
[]byte(imagesFieldSpecs),
|
||||
}
|
||||
return bytes.Join(configData, []byte("\n"))
|
||||
}
|
||||
@@ -46,6 +46,6 @@ func GetDefaultFieldSpecsAsMap() map[string]string {
|
||||
result["namespace"] = namespaceFieldSpecs
|
||||
result["varreference"] = varReferenceFieldSpecs
|
||||
result["namereference"] = nameReferenceFieldSpecs
|
||||
result["image"] = imageFieldSpecs
|
||||
result["images"] = imagesFieldSpecs
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -17,9 +17,15 @@ limitations under the License.
|
||||
package defaultconfig
|
||||
|
||||
const (
|
||||
imageFieldSpecs = `
|
||||
image:
|
||||
- path: containers
|
||||
- path: initContainers
|
||||
imagesFieldSpecs = `
|
||||
images:
|
||||
- kind: Pod
|
||||
path: spec/initContainers
|
||||
- kind: Pod
|
||||
path: spec/containers
|
||||
- kind: Deployment
|
||||
path: spec/template/spec/initContainers
|
||||
- kind: Deployment
|
||||
path: spec/template/spec/containers
|
||||
`
|
||||
)
|
||||
Reference in New Issue
Block a user