mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 09:24:23 +00:00
Merge pull request #3356 from JaredTan95/update_extension_version
upgrade admissionregistration.k8s.io/v1beta1 version to v1
This commit is contained in:
@@ -21,7 +21,7 @@ func TestImageTagUpdater_Filter(t *testing.T) {
|
||||
}{
|
||||
"ignore CustomResourceDefinition": {
|
||||
input: `
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: whatever
|
||||
@@ -30,7 +30,7 @@ spec:
|
||||
- image: whatever
|
||||
`,
|
||||
expectedOutput: `
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: whatever
|
||||
|
||||
@@ -32,7 +32,7 @@ spec:
|
||||
action: fly
|
||||
`)
|
||||
th.WriteF("/app/base/mykind.yaml", `
|
||||
apiVersion: jingfang.example.com/v1beta1
|
||||
apiVersion: jingfang.example.com/v1
|
||||
kind: MyKind
|
||||
metadata:
|
||||
name: mykind
|
||||
@@ -236,7 +236,7 @@ kind: Secret
|
||||
metadata:
|
||||
name: x-crdsecret
|
||||
---
|
||||
apiVersion: jingfang.example.com/v1beta1
|
||||
apiVersion: jingfang.example.com/v1
|
||||
kind: MyKind
|
||||
metadata:
|
||||
name: x-mykind
|
||||
@@ -285,7 +285,7 @@ kind: Secret
|
||||
metadata:
|
||||
name: prod-x-crdsecret
|
||||
---
|
||||
apiVersion: jingfang.example.com/v1beta1
|
||||
apiVersion: jingfang.example.com/v1
|
||||
kind: MyKind
|
||||
metadata:
|
||||
name: prod-x-mykind
|
||||
|
||||
@@ -463,7 +463,7 @@ spec:
|
||||
// TestFormatInput_service verifies a Service yaml is formatted correctly
|
||||
func TestFormatInput_validatingWebhookConfiguration(t *testing.T) {
|
||||
y := `
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: <name of this configuration object>
|
||||
@@ -490,7 +490,7 @@ webhooks:
|
||||
- v1beta1
|
||||
timeoutSeconds: 1
|
||||
`
|
||||
expected := `apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
expected := `apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: <name of this configuration object>
|
||||
|
||||
@@ -87,7 +87,7 @@ var WhitelistedListSortKinds = newSet(
|
||||
// sorting list field elements
|
||||
var WhitelistedListSortApis = newSet(
|
||||
"apps/v1", "apps/v1beta1", "apps/v1beta2", "batch/v1", "batch/v1beta1",
|
||||
"extensions/v1beta1", "v1", "admissionregistration.k8s.io/v1beta1")
|
||||
"extensions/v1beta1", "v1", "admissionregistration.k8s.io/v1")
|
||||
|
||||
// WhitelistedListSortFields contains json paths to list fields that should
|
||||
// be sorted, and the field they should be sorted by
|
||||
|
||||
@@ -78,7 +78,7 @@ subjects:
|
||||
name: another
|
||||
namespace: random
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: example
|
||||
@@ -94,7 +94,7 @@ webhooks:
|
||||
name: svc2
|
||||
namespace: system
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: crd
|
||||
@@ -159,7 +159,7 @@ subjects:
|
||||
name: another
|
||||
namespace: random
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: example
|
||||
@@ -175,7 +175,7 @@ webhooks:
|
||||
namespace: system
|
||||
name: example2
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: crd
|
||||
|
||||
@@ -37,7 +37,7 @@ spec:
|
||||
ports:
|
||||
- port: 7002
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: crd
|
||||
@@ -67,7 +67,7 @@ spec:
|
||||
ports:
|
||||
- port: 7002
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: crd
|
||||
@@ -106,7 +106,7 @@ spec:
|
||||
- image: myapp
|
||||
name: main
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: crd
|
||||
@@ -134,7 +134,7 @@ spec:
|
||||
- image: myapp
|
||||
name: test-main
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: crd
|
||||
|
||||
Reference in New Issue
Block a user