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
|
||||
namePrefix: team-foo-
|
||||
commonLabels:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: p1-
|
||||
configMapGenerator:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: p2-
|
||||
configMapGenerator:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
bases:
|
||||
- myapp/mycomponent
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
bases:
|
||||
- ../../../../base/myapp/mycomponent
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
bases:
|
||||
- ../../../../base/myapp/mycomponent2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
crds:
|
||||
- mycrd.json
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
configMapGenerator:
|
||||
- name: the-non-default-namespace-map
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: staging-
|
||||
commonLabels:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: team-foo-
|
||||
commonLabels:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: staging-
|
||||
commonLabels:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: team-foo-
|
||||
commonLabels:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: staging-
|
||||
commonLabels:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: team-foo-
|
||||
commonLabels:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deployment.yaml
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
nameprefix: kustomized-
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: dev-
|
||||
bases:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: base-
|
||||
resources:
|
||||
|
||||
@@ -17,9 +17,6 @@ limitations under the License.
|
||||
package fix
|
||||
|
||||
import (
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"sigs.k8s.io/kustomize/pkg/commands/kustfile"
|
||||
"sigs.k8s.io/kustomize/pkg/fs"
|
||||
@@ -53,10 +50,6 @@ func RunFix(fSys fs.FileSystem) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
msgs := m.DealWithMissingFields()
|
||||
if len(msgs) > 0 {
|
||||
log.Printf(strings.Join(msgs, "\n"))
|
||||
}
|
||||
|
||||
return mf.Write(m)
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ func TestPreserveComments(t *testing.T) {
|
||||
`# shem qing some comments
|
||||
# This is some comment we should preserve
|
||||
# don't delete it
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- pod.yaml
|
||||
@@ -228,7 +228,7 @@ resources:
|
||||
- service.yaml
|
||||
|
||||
APIVersion: v1beta1
|
||||
kind: kustomization.yaml
|
||||
kind: kustomization
|
||||
|
||||
# something you may want to keep
|
||||
vars:
|
||||
@@ -266,7 +266,7 @@ resources:
|
||||
- service.yaml
|
||||
|
||||
apiVersion: v1beta1
|
||||
kind: kustomization.yaml
|
||||
kind: kustomization
|
||||
|
||||
# something you may want to keep
|
||||
vars:
|
||||
|
||||
@@ -40,7 +40,7 @@ func MakeFakeFS() *fakeFs {
|
||||
}
|
||||
|
||||
// kustomizationContent is used in tests.
|
||||
const kustomizationContent = `apiVersion: v1
|
||||
const kustomizationContent = `apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: some-prefix
|
||||
nameSuffix: some-suffix
|
||||
|
||||
@@ -35,7 +35,7 @@ import (
|
||||
|
||||
const (
|
||||
kustomizationContent1 = `
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: foo-
|
||||
nameSuffix: -bar
|
||||
@@ -67,7 +67,7 @@ patchesJson6902:
|
||||
path: jsonpatch.json
|
||||
`
|
||||
kustomizationContent2 = `
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
secretGenerator:
|
||||
- name: secret
|
||||
|
||||
@@ -60,7 +60,7 @@ func writeF(
|
||||
func writeK(
|
||||
t *testing.T, ldr loadertest.FakeLoader, dir string, content string) {
|
||||
writeF(t, ldr, filepath.Join(dir, constants.KustomizationFileName), `
|
||||
apiVersion: v1
|
||||
apiVersion: v1beta1
|
||||
kind: Kustomization
|
||||
`+content)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
KustomizationVersion = "v1"
|
||||
KustomizationVersion = "v1beta1"
|
||||
KustomizationKind = "Kustomization"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user