mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
add group name to kustomize.config.k8s.io
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
# visible in configuration reviews.
|
||||
# ----------------------------------------------------
|
||||
# apiVersion and kind of Kustomization
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
# Adds namespace to all resources.
|
||||
|
||||
@@ -127,7 +127,7 @@ func TestPreserveComments(t *testing.T) {
|
||||
`# shem qing some comments
|
||||
# This is some comment we should preserve
|
||||
# don't delete it
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- pod.yaml
|
||||
@@ -181,7 +181,7 @@ resources:
|
||||
# See which field this comment goes into
|
||||
- service.yaml
|
||||
|
||||
APIVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: kustomization
|
||||
|
||||
# something you may want to keep
|
||||
@@ -219,7 +219,7 @@ resources:
|
||||
- pod.yaml
|
||||
- service.yaml
|
||||
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: kustomization
|
||||
|
||||
# something you may want to keep
|
||||
|
||||
@@ -40,7 +40,7 @@ func MakeFakeFS() *fakeFs {
|
||||
}
|
||||
|
||||
// kustomizationContent is used in tests.
|
||||
const kustomizationContent = `apiVersion: v1beta1
|
||||
const kustomizationContent = `apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: some-prefix
|
||||
nameSuffix: some-suffix
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
func TestGenerator1(t *testing.T) {
|
||||
th := NewKustTestHarness(t, "/app/overlay")
|
||||
th.writeK("/app/base1", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: p1-
|
||||
configMapGenerator:
|
||||
@@ -33,7 +33,7 @@ configMapGenerator:
|
||||
- from=base
|
||||
`)
|
||||
th.writeK("/app/base2", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: p2-
|
||||
configMapGenerator:
|
||||
@@ -43,7 +43,7 @@ configMapGenerator:
|
||||
- from=base
|
||||
`)
|
||||
th.writeK("/app/overlay/o1", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
bases:
|
||||
- ../../base1
|
||||
@@ -54,7 +54,7 @@ configMapGenerator:
|
||||
- from=overlay
|
||||
`)
|
||||
th.writeK("/app/overlay/o2", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
bases:
|
||||
- ../../base2
|
||||
@@ -65,7 +65,7 @@ configMapGenerator:
|
||||
- from=overlay
|
||||
`)
|
||||
th.writeK("/app/overlay", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
bases:
|
||||
- o1
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
func writeBaseWithCrd(th *KustTestHarness) {
|
||||
th.writeK("/app/base", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
crds:
|
||||
- mycrd.json
|
||||
@@ -273,7 +273,7 @@ func TestCrdWithOverlay(t *testing.T) {
|
||||
th := NewKustTestHarness(t, "/app/overlay")
|
||||
writeBaseWithCrd(th)
|
||||
th.writeK("/app/overlay", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: prod-
|
||||
bases:
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
func TestSimpleBase(t *testing.T) {
|
||||
th := NewKustTestHarness(t, "/app/base")
|
||||
th.writeK("/app/base", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: team-foo-
|
||||
commonLabels:
|
||||
@@ -163,7 +163,7 @@ spec:
|
||||
|
||||
func makeBaseWithGenerators(th *KustTestHarness) {
|
||||
th.writeK("/app", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: team-foo-
|
||||
commonLabels:
|
||||
@@ -341,7 +341,7 @@ spec:
|
||||
name: configmap-in-overlay
|
||||
`)
|
||||
th.writeK("/overlay", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: staging-
|
||||
commonLabels:
|
||||
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
|
||||
const (
|
||||
kustomizationContent1 = `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: foo-
|
||||
nameSuffix: -bar
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
|
||||
func makeCommonFileForMultiplePatchTest(th *KustTestHarness) {
|
||||
th.writeK("/app/base", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: team-foo-
|
||||
commonLabels:
|
||||
@@ -80,7 +80,7 @@ spec:
|
||||
app: nginx
|
||||
`)
|
||||
th.writeK("/app/overlay/staging", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: staging-
|
||||
commonLabels:
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
func TestNamespacedGenerator(t *testing.T) {
|
||||
th := NewKustTestHarness(t, "/app")
|
||||
th.writeK("/app", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
configMapGenerator:
|
||||
- name: the-non-default-namespace-map
|
||||
|
||||
@@ -75,7 +75,7 @@ func (th *KustTestHarness) writeF(dir string, content string) {
|
||||
|
||||
func (th *KustTestHarness) writeK(dir string, content string) {
|
||||
th.writeF(filepath.Join(dir, constants.KustomizationFileNames[0]), `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
`+content)
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
func TestVariableRef(t *testing.T) {
|
||||
th := NewKustTestHarness(t, "/app/overlay/staging")
|
||||
th.writeK("/app/base", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: base-
|
||||
resources:
|
||||
@@ -323,7 +323,7 @@ spec:
|
||||
storage: 1Gi
|
||||
`)
|
||||
th.writeK("/app/overlay/staging", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namePrefix: dev-
|
||||
bases:
|
||||
@@ -583,7 +583,7 @@ spec:
|
||||
func TestVariableRefIngress(t *testing.T) {
|
||||
th := NewKustTestHarness(t, "/app/overlay")
|
||||
th.writeK("/app/base", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deployment.yaml
|
||||
@@ -657,7 +657,7 @@ spec:
|
||||
targetPort: http
|
||||
`)
|
||||
th.writeK("/app/overlay", `
|
||||
apiVersion: v1beta1
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
nameprefix: kustomized-
|
||||
bases:
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
KustomizationVersion = "v1beta1"
|
||||
KustomizationVersion = "kustomize.config.k8s.io/v1beta1"
|
||||
KustomizationKind = "Kustomization"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user