change current version from v1 to v1beta1

This commit is contained in:
Jingfang Liu
2018-12-20 15:32:06 -08:00
parent 6f566d7a38
commit 1cd99ab68e
24 changed files with 26 additions and 33 deletions

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: team-foo- namePrefix: team-foo-
commonLabels: commonLabels:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: p1- namePrefix: p1-
configMapGenerator: configMapGenerator:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: p2- namePrefix: p2-
configMapGenerator: configMapGenerator:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
bases: bases:
- myapp/mycomponent - myapp/mycomponent

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
bases: bases:
- ../../../../base/myapp/mycomponent - ../../../../base/myapp/mycomponent

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
bases: bases:
- ../../../../base/myapp/mycomponent2 - ../../../../base/myapp/mycomponent2

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
crds: crds:
- mycrd.json - mycrd.json

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
configMapGenerator: configMapGenerator:
- name: the-non-default-namespace-map - name: the-non-default-namespace-map

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: staging- namePrefix: staging-
commonLabels: commonLabels:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: team-foo- namePrefix: team-foo-
commonLabels: commonLabels:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: staging- namePrefix: staging-
commonLabels: commonLabels:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: team-foo- namePrefix: team-foo-
commonLabels: commonLabels:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: staging- namePrefix: staging-
commonLabels: commonLabels:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: team-foo- namePrefix: team-foo-
commonLabels: commonLabels:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- deployment.yaml - deployment.yaml

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
nameprefix: kustomized- nameprefix: kustomized-

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: dev- namePrefix: dev-
bases: bases:

View File

@@ -1,4 +1,4 @@
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: base- namePrefix: base-
resources: resources:

View File

@@ -17,9 +17,6 @@ limitations under the License.
package fix package fix
import ( import (
"log"
"strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/commands/kustfile" "sigs.k8s.io/kustomize/pkg/commands/kustfile"
"sigs.k8s.io/kustomize/pkg/fs" "sigs.k8s.io/kustomize/pkg/fs"
@@ -53,10 +50,6 @@ func RunFix(fSys fs.FileSystem) error {
if err != nil { if err != nil {
return err return err
} }
msgs := m.DealWithMissingFields()
if len(msgs) > 0 {
log.Printf(strings.Join(msgs, "\n"))
}
return mf.Write(m) return mf.Write(m)
} }

View File

@@ -173,7 +173,7 @@ func TestPreserveComments(t *testing.T) {
`# shem qing some comments `# shem qing some comments
# This is some comment we should preserve # This is some comment we should preserve
# don't delete it # don't delete it
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- pod.yaml - pod.yaml
@@ -228,7 +228,7 @@ resources:
- service.yaml - service.yaml
APIVersion: v1beta1 APIVersion: v1beta1
kind: kustomization.yaml kind: kustomization
# something you may want to keep # something you may want to keep
vars: vars:
@@ -266,7 +266,7 @@ resources:
- service.yaml - service.yaml
apiVersion: v1beta1 apiVersion: v1beta1
kind: kustomization.yaml kind: kustomization
# something you may want to keep # something you may want to keep
vars: vars:

View File

@@ -40,7 +40,7 @@ func MakeFakeFS() *fakeFs {
} }
// kustomizationContent is used in tests. // kustomizationContent is used in tests.
const kustomizationContent = `apiVersion: v1 const kustomizationContent = `apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: some-prefix namePrefix: some-prefix
nameSuffix: some-suffix nameSuffix: some-suffix

View File

@@ -35,7 +35,7 @@ import (
const ( const (
kustomizationContent1 = ` kustomizationContent1 = `
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
namePrefix: foo- namePrefix: foo-
nameSuffix: -bar nameSuffix: -bar
@@ -67,7 +67,7 @@ patchesJson6902:
path: jsonpatch.json path: jsonpatch.json
` `
kustomizationContent2 = ` kustomizationContent2 = `
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
secretGenerator: secretGenerator:
- name: secret - name: secret

View File

@@ -60,7 +60,7 @@ func writeF(
func writeK( func writeK(
t *testing.T, ldr loadertest.FakeLoader, dir string, content string) { t *testing.T, ldr loadertest.FakeLoader, dir string, content string) {
writeF(t, ldr, filepath.Join(dir, constants.KustomizationFileName), ` writeF(t, ldr, filepath.Join(dir, constants.KustomizationFileName), `
apiVersion: v1 apiVersion: v1beta1
kind: Kustomization kind: Kustomization
`+content) `+content)
} }

View File

@@ -22,7 +22,7 @@ import (
) )
const ( const (
KustomizationVersion = "v1" KustomizationVersion = "v1beta1"
KustomizationKind = "Kustomization" KustomizationKind = "Kustomization"
) )