remove patches and imageTags from kustomization.yaml

This commit is contained in:
Jingfang Liu
2019-01-25 14:26:17 -08:00
parent 028724df08
commit c461f1f766
11 changed files with 24 additions and 344 deletions

View File

@@ -162,7 +162,7 @@ configMapGenerator:
- name: app-config
files:
- configmap/app-init.ini
imageTags:
images:
- name: nginx
newTag: 1.8.0`)

View File

@@ -111,7 +111,7 @@ bases:
- ../base
patchesStrategicMerge:
- deployment/deployment.yaml
imageTags:
images:
- name: whatever
newTag: 1.8.0
`)

View File

@@ -58,13 +58,12 @@ func NewKustTarget(
if err != nil {
return nil, err
}
content = types.DealWithDeprecatedFields(content)
var k types.Kustomization
err = unmarshal(content, &k)
if err != nil {
return nil, err
}
k.DealWithDeprecatedFields()
msgs, errs := k.EnforceFields()
if len(errs) > 0 {
return nil, fmt.Errorf(strings.Join(errs, "\n"))