Merge pull request #3356 from JaredTan95/update_extension_version

upgrade admissionregistration.k8s.io/v1beta1 version to v1
This commit is contained in:
Jeff Regan
2020-12-16 10:44:08 -08:00
committed by GitHub
6 changed files with 34 additions and 34 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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>

View File

@@ -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

View File

@@ -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,21 +94,21 @@ webhooks:
name: svc2
namespace: system
---
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: crd
`,
// Import note: The namespace transformer is in charge of
// the metadata.namespace field. The namespace transformer SHOULD
// NOT modify neither the "namespace" subfield within the
// ClusterRoleBinding.subjects field nor the "namespace"
// subfield in the ValidatingWebhookConfiguration.webhooks field.
// This is the role of the namereference Transformer to handle
// object reference changes (prefix/suffix and namespace).
// For use cases involving simultaneous change of name and namespace,
// refer to namespaces tests in pkg/target test suites.
`
// Import note: The namespace transformer is in charge of
// the metadata.namespace field. The namespace transformer SHOULD
// NOT modify neither the "namespace" subfield within the
// ClusterRoleBinding.subjects field nor the "namespace"
// subfield in the ValidatingWebhookConfiguration.webhooks field.
// This is the role of the namereference Transformer to handle
// object reference changes (prefix/suffix and namespace).
// For use cases involving simultaneous change of name and namespace,
// refer to namespaces tests in pkg/target test suites.
`
apiVersion: v1
kind: ConfigMap
metadata:
@@ -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
@@ -259,12 +259,12 @@ metadata:
name: cm
namespace: bar
`,
func(t *testing.T, err error) {
if err == nil {
t.Fatal("expected error")
}
if !strings.Contains(err.Error(), "ID conflict") {
t.Fatalf("unexpected error: %s", err.Error())
}
})
func(t *testing.T, err error) {
if err == nil {
t.Fatal("expected error")
}
if !strings.Contains(err.Error(), "ID conflict") {
t.Fatalf("unexpected error: %s", err.Error())
}
})
}

View File

@@ -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