mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
change current version from v1 to v1beta1
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: team-foo-
|
namePrefix: team-foo-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: p1-
|
namePrefix: p1-
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: p2-
|
namePrefix: p2-
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
bases:
|
bases:
|
||||||
- myapp/mycomponent
|
- myapp/mycomponent
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
bases:
|
bases:
|
||||||
- ../../../../base/myapp/mycomponent
|
- ../../../../base/myapp/mycomponent
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
bases:
|
bases:
|
||||||
- ../../../../base/myapp/mycomponent2
|
- ../../../../base/myapp/mycomponent2
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
crds:
|
crds:
|
||||||
- mycrd.json
|
- mycrd.json
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: staging-
|
namePrefix: staging-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: team-foo-
|
namePrefix: team-foo-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: staging-
|
namePrefix: staging-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: team-foo-
|
namePrefix: team-foo-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: staging-
|
namePrefix: staging-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: team-foo-
|
namePrefix: team-foo-
|
||||||
commonLabels:
|
commonLabels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
nameprefix: kustomized-
|
nameprefix: kustomized-
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: dev-
|
namePrefix: dev-
|
||||||
bases:
|
bases:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namePrefix: base-
|
namePrefix: base-
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
KustomizationVersion = "v1"
|
KustomizationVersion = "v1beta1"
|
||||||
KustomizationKind = "Kustomization"
|
KustomizationKind = "Kustomization"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user