From fb287a463487cf783c18a6a6e20181470e96a14e Mon Sep 17 00:00:00 2001 From: Jesse Suen Date: Wed, 9 Oct 2019 20:51:34 -0700 Subject: [PATCH] Update k8s library dependencies to v1.16 (#192) * Update k8s library dependencies to v1.16 * Remove container resource OpenAPI validation from all types --- Dockerfile | 2 +- Gopkg.lock | 108 +-- Gopkg.toml | 21 +- hack/gen-crd-spec/main.go | 110 +-- manifests/crds/analysis-run-crd.yaml | 759 +++++++++++++++++- manifests/crds/analysis-template-crd.yaml | 759 +++++++++++++++++- manifests/crds/experiment-crd.yaml | 759 +++++++++++++++++- manifests/crds/rollout-crd.yaml | 759 +++++++++++++++++- .../rollouts/v1alpha1/openapi_generated.go | 32 +- .../v1alpha1/zz_generated.deepcopy.go | 8 +- pkg/client/clientset/versioned/clientset.go | 7 + .../versioned/fake/clientset_generated.go | 7 +- .../rollouts/v1alpha1/rollouts_client.go | 3 +- .../externalversions/rollouts/interface.go | 2 +- rollout/controller_test.go | 15 +- utils/conditions/rollouts_test.go | 5 +- utils/controller/controller.go | 2 +- utils/experiment/experiment_test.go | 14 +- 18 files changed, 3078 insertions(+), 294 deletions(-) diff --git a/Dockerfile b/Dockerfile index b2da41e48b..ccbbfb6c4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image # Also used as the image in CI jobs so needs all dependencies #################################################################################################### -FROM golang:1.12.6 as builder +FROM golang:1.13.1 as builder RUN apt-get update && apt-get install -y \ git \ diff --git a/Gopkg.lock b/Gopkg.lock index e901899db9..578f53fa37 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -99,12 +99,12 @@ version = "v2.8.0" [[projects]] - digest = "1:8466756c66127d5ea10cc6c305a16174755ebd187e64ec2b4efc3eef58281dcd" + digest = "1:dcefbadf4534c5ecac8573698fba6e6e601157bfa8f96aafe29df31ae582ef2a" name = "github.com/evanphx/json-patch" packages = ["."] pruneopts = "" - revision = "5858425f75500d40c52783dce87d085a483ce135" - version = "v4.2.0" + revision = "afac545df32f2287a079e2dfb7ba2745a643747e" + version = "v3.0.0" [[projects]] digest = "1:b13707423743d41665fd23f0c36b2f37bb49c30e94adb813319c44188a51ba22" @@ -179,6 +179,20 @@ revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" version = "v1.2.0" +[[projects]] + digest = "1:9fcb267c272bc5054564b392e3ff7e65e35400fd9914afb1d169f92b95e7dbc9" + name = "github.com/google/go-cmp" + packages = [ + "cmp", + "cmp/internal/diff", + "cmp/internal/flags", + "cmp/internal/function", + "cmp/internal/value", + ] + pruneopts = "" + revision = "2d0692c2e9617365a95b295612ac0d4415ba4627" + version = "v0.3.1" + [[projects]] branch = "master" digest = "1:754f77e9c839b24778a4b64422236d38515301d2baeb63113aa3edc42e6af692" @@ -294,14 +308,6 @@ revision = "279bed98673dd5bef374d3b6e4b09e2af76183bf" version = "v1.0.0-rc1" -[[projects]] - digest = "1:a5484d4fa43127138ae6e7b2299a6a52ae006c7f803d98d717f60abf3e97192e" - name = "github.com/pborman/uuid" - packages = ["."] - pruneopts = "" - revision = "adf5a7427709b9deb95d29d3fa8a2bf9cfd388f1" - version = "v1.2" - [[projects]] digest = "1:1d7e1867c49a6dd9856598ef7c3123604ea3daabf5b83f303ff457bcbc410b1d" name = "github.com/pkg/errors" @@ -572,10 +578,11 @@ version = "v2.2.1" [[projects]] - branch = "release-1.14" - digest = "1:d8a6f1ec98713e685346a2e4b46c6ec4a1792a5535f8b0dffe3b1c08c9d69b12" + branch = "release-1.16" + digest = "1:5e5cfbab57ea5444c1eb295a39fdc403f097f5ace592c829db7b3e0e3ea66903" name = "k8s.io/api" packages = [ + "admissionregistration/v1", "admissionregistration/v1beta1", "apps/v1", "apps/v1beta1", @@ -595,6 +602,7 @@ "coordination/v1", "coordination/v1beta1", "core/v1", + "discovery/v1alpha1", "events/v1beta1", "extensions/v1beta1", "networking/v1", @@ -614,11 +622,11 @@ "storage/v1beta1", ] pruneopts = "" - revision = "40a48860b5abbba9aa891b02b32da429b08d96a0" + revision = "195af9ec35214c6d98662c5791364285bf2e2cf2" [[projects]] - branch = "release-1.14" - digest = "1:32c3bbb0278417aa36d7600a0ef701f5d5eb3148830895c2634872bc55400be7" + branch = "release-1.16" + digest = "1:ea9d3d1bec3c3ecdfef0e0f92dc1c99468e9a13fedfb7f1bc297ae6c88968619" name = "k8s.io/apiextensions-apiserver" packages = [ "pkg/apis/apiextensions", @@ -626,11 +634,11 @@ "pkg/features", ] pruneopts = "" - revision = "53c4693659ed354d76121458fb819202dd1635fa" + revision = "59c675dd9926a891c040ac814ecea8dba8598c63" [[projects]] - branch = "release-1.14" - digest = "1:a802c91b189a31200cfb66744441fe62dac961ec7c5c58c47716570de7da195c" + branch = "release-1.16" + digest = "1:8ac118b8194fbc5d845ca59c3e3ca2e179ffe49a3f4db9093cd636f423f32f2d" name = "k8s.io/apimachinery" packages = [ "pkg/api/equality", @@ -683,11 +691,11 @@ "third_party/forked/golang/reflect", ] pruneopts = "" - revision = "6a84e37a896db9780c75367af8d2ed2bb944022e" + revision = "a2eda9f80ab8a454a81bdde16d62a1afe5f931c0" [[projects]] - branch = "release-1.14" - digest = "1:dc7380b6c7f3c47834f9cb51f4c66a2d2153eaddc90ebced5c49ba058581136a" + branch = "release-1.16" + digest = "1:e077a9d0f91972dd98d17b570a7d2f9dc45bf1104a9fd836ca727f193e4c617c" name = "k8s.io/apiserver" packages = [ "pkg/authentication/authenticator", @@ -698,17 +706,18 @@ "pkg/util/feature", ] pruneopts = "" - revision = "24fd0f18bc214a0cb443ed20cf287ef5af1a6b73" + revision = "3fdfe2c6555525ae54a58d22cd7f014a25ce749d" [[projects]] - branch = "release-11.0" - digest = "1:794140b3ac07405646ea3d4a57e1f6155186e672aed8aa0c996779381cd92fe6" + branch = "release-13.0" + digest = "1:9e7a28fb6a57b9eb2e7730a2d152a5618a0e913415a13bca76607e799d39fd85" name = "k8s.io/client-go" packages = [ "discovery", "discovery/fake", "informers", "informers/admissionregistration", + "informers/admissionregistration/v1", "informers/admissionregistration/v1beta1", "informers/apps", "informers/apps/v1", @@ -731,6 +740,8 @@ "informers/coordination/v1beta1", "informers/core", "informers/core/v1", + "informers/discovery", + "informers/discovery/v1alpha1", "informers/events", "informers/events/v1beta1", "informers/extensions", @@ -761,6 +772,8 @@ "kubernetes", "kubernetes/fake", "kubernetes/scheme", + "kubernetes/typed/admissionregistration/v1", + "kubernetes/typed/admissionregistration/v1/fake", "kubernetes/typed/admissionregistration/v1beta1", "kubernetes/typed/admissionregistration/v1beta1/fake", "kubernetes/typed/apps/v1", @@ -799,6 +812,8 @@ "kubernetes/typed/coordination/v1beta1/fake", "kubernetes/typed/core/v1", "kubernetes/typed/core/v1/fake", + "kubernetes/typed/discovery/v1alpha1", + "kubernetes/typed/discovery/v1alpha1/fake", "kubernetes/typed/events/v1beta1", "kubernetes/typed/events/v1beta1/fake", "kubernetes/typed/extensions/v1beta1", @@ -833,6 +848,7 @@ "kubernetes/typed/storage/v1alpha1/fake", "kubernetes/typed/storage/v1beta1", "kubernetes/typed/storage/v1beta1/fake", + "listers/admissionregistration/v1", "listers/admissionregistration/v1beta1", "listers/apps/v1", "listers/apps/v1beta1", @@ -848,6 +864,7 @@ "listers/coordination/v1", "listers/coordination/v1beta1", "listers/core/v1", + "listers/discovery/v1alpha1", "listers/events/v1beta1", "listers/extensions/v1beta1", "listers/networking/v1", @@ -865,6 +882,9 @@ "listers/storage/v1", "listers/storage/v1alpha1", "listers/storage/v1beta1", + "metadata", + "metadata/metadatainformer", + "metadata/metadatalister", "pkg/apis/clientauthentication", "pkg/apis/clientauthentication/v1alpha1", "pkg/apis/clientauthentication/v1beta1", @@ -899,30 +919,23 @@ "util/workqueue", ] pruneopts = "" - revision = "11646d1007e006f6f24995cb905c68bc62901c81" - -[[projects]] - branch = "release-1.14" - digest = "1:99567730769aa02ba05c7eac2479a8b10c85f93047558e3889b2d7f569387547" - name = "k8s.io/cloud-provider" - packages = ["features"] - pruneopts = "" - revision = "c892ea32361a3655e7bd8c06f2d02dd8ce73dd78" + revision = "f06fe3961ca9f09ba2f23c3c83decd95186d71c2" [[projects]] branch = "master" - digest = "1:149d53e237a376151d1be4a23eb3eb743182c299cd9c8c59ce3ea2ba3cc42755" + digest = "1:2929909e6a506832aa3924522331d43aab91d17c85399802bd960e428cef5d6d" name = "k8s.io/cluster-bootstrap" packages = [ "token/api", "token/util", + "util/secrets", ] pruneopts = "" - revision = "ffdb6fd27ea48736d044c7ad42d2a2d4015fd78b" + revision = "f632ced2d31d86dd39523c0625e3b52642d5289f" [[projects]] - branch = "release-1.14" - digest = "1:742ce70d2c6de0f02b5331a25d4d549f55de6b214af22044455fd6e6b451cad9" + branch = "release-1.16" + digest = "1:254da4cb69b3776686b730a206e081e6f8898bb64760619d1895c25c407e718f" name = "k8s.io/code-generator" packages = [ "cmd/client-gen", @@ -937,13 +950,16 @@ "pkg/util", ] pruneopts = "" - revision = "50b561225d70b3eb79a1faafd3dfe7b1a62cbe73" + revision = "8e001e5d18949be7e823ccb9cfe9b60026e7bda0" [[projects]] branch = "master" digest = "1:727faf154ba5437cba7957d087b3e9f330f6ee0e15f91e2eba4dbba491bb53ff" name = "k8s.io/component-base" - packages = ["config"] + packages = [ + "config", + "featuregate", + ] pruneopts = "" revision = "4062e14deebed23a9af22e52b675e89cb753b99e" @@ -987,13 +1003,14 @@ revision = "0317810137be915b9cf888946c6e115c1bfac693" [[projects]] - branch = "release-1.14" - digest = "1:30a624b97c52cc9830e4f3f24ec3038ca5374d551846cd0e0b17a77bd3efb343" + branch = "release-1.16" + digest = "1:985440fa37318b73e722b1d50d75635e08e2ed76aac87e7362fadcad4a9d8fa3" name = "k8s.io/kubernetes" packages = [ "cmd/kubeadm/app/apis/kubeadm", "cmd/kubeadm/app/constants", "cmd/kubeadm/app/util", + "cmd/kubeadm/app/version", "pkg/api/legacyscheme", "pkg/api/service", "pkg/api/v1/pod", @@ -1023,14 +1040,13 @@ "pkg/util/labels", "pkg/util/parsers", "pkg/util/taints", - "pkg/version", ] pruneopts = "" - revision = "d1c99590f4557a409f377236f044847a35b4a7af" + revision = "a2ff5d71deafff1d9688eb6f7533dd239980c420" [[projects]] branch = "master" - digest = "1:4c5d39f7ca1c940d7e74dbc62d2221e2c59b3d35c54f1fa9c77f3fd3113bbcb1" + digest = "1:874afa816ece04beefd8724c8d397fdccc80c5d6d72ed8567e9af47b928887c9" name = "k8s.io/utils" packages = [ "buffer", @@ -1042,7 +1058,7 @@ "trace", ] pruneopts = "" - revision = "c55fbcfc754a5b2ec2fbae8fb9dcac36bdba6a12" + revision = "69764acb6e8e900b7c05296c5d3c9c19545475f9" [[projects]] digest = "1:321081b4a44256715f2b68411d8eda9a17f17ebfe6f0cc61d2cc52d11c08acfa" diff --git a/Gopkg.toml b/Gopkg.toml index c12f32b74f..eeec132a75 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -7,38 +7,31 @@ required = [ [[constraint]] name = "k8s.io/client-go" - branch = "release-11.0" + branch = "release-13.0" [[constraint]] name = "k8s.io/code-generator" - branch = "release-1.14" + branch = "release-1.16" [[constraint]] - branch = "release-1.14" + branch = "release-1.16" name = "k8s.io/api" - -# To use reference package: -# vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go:36:16: undefined: reference.ParseNormalizedNamed -[[override]] - name = "github.com/docker/distribution" - branch = "master" - [[constraint]] name = "k8s.io/apiserver" - branch = "release-1.14" + branch = "release-1.16" [[constraint]] name = "k8s.io/apimachinery" - branch = "release-1.14" + branch = "release-1.16" [[constraint]] name = "k8s.io/kubernetes" - branch = "release-1.14" + branch = "release-1.16" [[constraint]] name = "k8s.io/apiextensions-apiserver" - branch = "release-1.14" + branch = "release-1.16" [[constraint]] name = "github.com/bouk/monkey" diff --git a/hack/gen-crd-spec/main.go b/hack/gen-crd-spec/main.go index 326967533f..7704231442 100644 --- a/hack/gen-crd-spec/main.go +++ b/hack/gen-crd-spec/main.go @@ -14,12 +14,12 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) -const ( - rolloutCrdPath = "manifests/crds/rollout-crd.yaml" - experimentCrdPath = "manifests/crds/experiment-crd.yaml" - analysisRunCrdPath = "manifests/crds/analysis-run-crd.yaml" - analysisTemplateCrdPath = "manifests/crds/analysis-template-crd.yaml" -) +var crdPaths = map[string]string{ + "Rollout": "manifests/crds/rollout-crd.yaml", + "Experiment": "manifests/crds/experiment-crd.yaml", + "AnalysisTemplate": "manifests/crds/analysis-template-crd.yaml", + "AnalysisRun": "manifests/crds/analysis-run-crd.yaml", +} func NewCustomResourceDefinition() []*extensionsobj.CustomResourceDefinition { crdYamlBytes, err := exec.Command( @@ -43,15 +43,9 @@ func NewCustomResourceDefinition() []*extensionsobj.CustomResourceDefinition { for i := range objs { obj := objs[i] - //We need to completely remove validation of problematic fields such as creationTimestamp, - //which get marshalled to `null`, but are typed as as a `string` during Open API validation - removeValidataion(obj, "metadata.creationTimestamp") - removeValidataion(obj, "spec.template.metadata.creationTimestamp") removeNestedItems(obj) removeDescriptions(obj) - if obj.GetKind() == "Rollout" { - removeRolloutResourceValidation(obj) - } + removeResourceValidation(obj) crd := toCRD(obj) crd.Spec.Scope = "Namespaced" crds = append(crds, crd) @@ -60,6 +54,15 @@ func NewCustomResourceDefinition() []*extensionsobj.CustomResourceDefinition { return crds } +func crdKind(crd *unstructured.Unstructured) string { + kind, found, err := unstructured.NestedFieldNoCopy(crd.Object, "spec", "names", "kind") + checkErr(err) + if !found { + panic("kind not found") + } + return kind.(string) +} + var diffSeparator = regexp.MustCompile(`\n---`) // splitYAML splits a YAML file into unstructured objects. Returns list of all unstructured objects @@ -90,10 +93,20 @@ func deleteFile(path string) { checkErr(os.Remove(path)) } -func removeValidataion(un *unstructured.Unstructured, path string) { +func removeValidation(un *unstructured.Unstructured, path string) { schemaPath := []string{"spec", "validation", "openAPIV3Schema"} for _, part := range strings.Split(path, ".") { - schemaPath = append(schemaPath, "properties", part) + if strings.HasSuffix(part, "[]") { + part = strings.TrimSuffix(part, "[]") + schemaPath = append(schemaPath, "properties", part, "items") + } else { + schemaPath = append(schemaPath, "properties", part) + } + } + _, ok, err := unstructured.NestedFieldNoCopy(un.Object, schemaPath...) + checkErr(err) + if !ok { + panic(fmt.Sprintf("%s not found for kind %s", schemaPath, crdKind(un))) } unstructured.RemoveNestedField(un.Object, schemaPath...) } @@ -141,26 +154,40 @@ func removeNestedItemsHelper(obj map[string]interface{}) { } } -var resourcesSchemaPath = []string{ - "spec", - "validation", - "openAPIV3Schema", "properties", - "spec", "properties", - "template", "properties", - "spec", "properties", - "containers", "items", "properties", - "resources", "properties", -} - -func removeRolloutResourceValidation(un *unstructured.Unstructured) { - containersFieldIf, ok, err := unstructured.NestedFieldNoCopy(un.Object, resourcesSchemaPath...) - checkErr(err) - if !ok { - panic(fmt.Sprintf("%s not found", resourcesSchemaPath)) +func removeResourceValidation(un *unstructured.Unstructured) { + kind := crdKind(un) + switch kind { + case "Rollout": + removeValidation(un, "spec.template.spec.containers[].resources.limits") + removeValidation(un, "spec.template.spec.containers[].resources.requests") + removeValidation(un, "spec.template.spec.initContainers[].resources.limits") + removeValidation(un, "spec.template.spec.initContainers[].resources.requests") + removeValidation(un, "spec.template.spec.ephemeralContainers[].resources.limits") + removeValidation(un, "spec.template.spec.ephemeralContainers[].resources.requests") + case "Experiment": + removeValidation(un, "spec.templates[].template.spec.containers[].resources.limits") + removeValidation(un, "spec.templates[].template.spec.containers[].resources.requests") + removeValidation(un, "spec.templates[].template.spec.initContainers[].resources.limits") + removeValidation(un, "spec.templates[].template.spec.initContainers[].resources.requests") + removeValidation(un, "spec.templates[].template.spec.ephemeralContainers[].resources.limits") + removeValidation(un, "spec.templates[].template.spec.ephemeralContainers[].resources.requests") + case "AnalysisTemplate": + removeValidation(un, "spec.metrics[].provider.job.spec.template.spec.containers[].resources.limits") + removeValidation(un, "spec.metrics[].provider.job.spec.template.spec.containers[].resources.requests") + removeValidation(un, "spec.metrics[].provider.job.spec.template.spec.initContainers[].resources.limits") + removeValidation(un, "spec.metrics[].provider.job.spec.template.spec.initContainers[].resources.requests") + removeValidation(un, "spec.metrics[].provider.job.spec.template.spec.ephemeralContainers[].resources.limits") + removeValidation(un, "spec.metrics[].provider.job.spec.template.spec.ephemeralContainers[].resources.requests") + case "AnalysisRun": + removeValidation(un, "spec.analysisSpec.metrics[].provider.job.spec.template.spec.containers[].resources.limits") + removeValidation(un, "spec.analysisSpec.metrics[].provider.job.spec.template.spec.containers[].resources.requests") + removeValidation(un, "spec.analysisSpec.metrics[].provider.job.spec.template.spec.initContainers[].resources.limits") + removeValidation(un, "spec.analysisSpec.metrics[].provider.job.spec.template.spec.initContainers[].resources.requests") + removeValidation(un, "spec.analysisSpec.metrics[].provider.job.spec.template.spec.ephemeralContainers[].resources.limits") + removeValidation(un, "spec.analysisSpec.metrics[].provider.job.spec.template.spec.ephemeralContainers[].resources.requests") + default: + panic(fmt.Sprintf("unknown kind: %s", kind)) } - containers := containersFieldIf.(map[string]interface{}) - unstructured.RemoveNestedField(containers, "limits") - unstructured.RemoveNestedField(containers, "requests") } func toCRD(un *unstructured.Unstructured) *extensionsobj.CustomResourceDefinition { @@ -196,26 +223,17 @@ func main() { // clean up crd yaml before marshalling unstructured.RemoveNestedField(r.Object, "status") unstructured.RemoveNestedField(r.Object, "metadata", "creationTimestamp") - if crdKind == "Rollout" { - removeRolloutResourceValidation(&r) - } jsonBytes, err = json.MarshalIndent(r.Object, "", " ") checkErr(err) yamlBytes, err := yaml.JSONToYAML(jsonBytes) checkErr(err) - path := rolloutCrdPath - switch crdKind { - case "Experiment": - path = experimentCrdPath - case "AnalysisTemplate": - path = analysisTemplateCrdPath - case "AnalysisRun": - path = analysisRunCrdPath + path := crdPaths[crdKind] + if path == "" { + panic(fmt.Sprintf("unknown kind: %s", crdKind)) } err = ioutil.WriteFile(path, yamlBytes, 0644) checkErr(err) } - } diff --git a/manifests/crds/analysis-run-crd.yaml b/manifests/crds/analysis-run-crd.yaml index 2b02cda17d..a4d9575ed8 100644 --- a/manifests/crds/analysis-run-crd.yaml +++ b/manifests/crds/analysis-run-crd.yaml @@ -704,15 +704,531 @@ spec: type: integer type: object resources: + type: object + securityContext: properties: - limits: - additionalProperties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + type: string + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array type: object - requests: - additionalProperties: - type: string + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: type: object securityContext: properties: @@ -754,11 +1270,85 @@ spec: user: type: string type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object stdin: type: boolean stdinOnce: type: boolean + targetContainerName: + type: string terminationMessagePath: type: string terminationMessagePolicy: @@ -803,30 +1393,6 @@ spec: - name type: object type: array - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean hostAliases: items: properties: @@ -1192,15 +1758,6 @@ spec: type: integer type: object resources: - properties: - limits: - additionalProperties: - type: string - type: object - requests: - additionalProperties: - type: string - type: object type: object securityContext: properties: @@ -1242,6 +1799,78 @@ spec: user: type: string type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object stdin: type: boolean @@ -1297,6 +1926,12 @@ spec: additionalProperties: type: string type: object + overhead: + additionalProperties: + type: string + type: object + preemptionPolicy: + type: string priority: format: int32 type: integer @@ -1358,6 +1993,15 @@ spec: - value type: object type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object type: object serviceAccount: type: string @@ -1386,6 +2030,45 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumes: items: properties: diff --git a/manifests/crds/analysis-template-crd.yaml b/manifests/crds/analysis-template-crd.yaml index 9efeed0777..d2f8da1735 100644 --- a/manifests/crds/analysis-template-crd.yaml +++ b/manifests/crds/analysis-template-crd.yaml @@ -702,15 +702,531 @@ spec: type: integer type: object resources: + type: object + securityContext: properties: - limits: - additionalProperties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + type: string + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array type: object - requests: - additionalProperties: - type: string + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: type: object securityContext: properties: @@ -752,11 +1268,85 @@ spec: user: type: string type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object stdin: type: boolean stdinOnce: type: boolean + targetContainerName: + type: string terminationMessagePath: type: string terminationMessagePolicy: @@ -801,30 +1391,6 @@ spec: - name type: object type: array - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean hostAliases: items: properties: @@ -1190,15 +1756,6 @@ spec: type: integer type: object resources: - properties: - limits: - additionalProperties: - type: string - type: object - requests: - additionalProperties: - type: string - type: object type: object securityContext: properties: @@ -1240,6 +1797,78 @@ spec: user: type: string type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object stdin: type: boolean @@ -1295,6 +1924,12 @@ spec: additionalProperties: type: string type: object + overhead: + additionalProperties: + type: string + type: object + preemptionPolicy: + type: string priority: format: int32 type: integer @@ -1356,6 +1991,15 @@ spec: - value type: object type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object type: object serviceAccount: type: string @@ -1384,6 +2028,45 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumes: items: properties: diff --git a/manifests/crds/experiment-crd.yaml b/manifests/crds/experiment-crd.yaml index bb71c47765..2db170f2c2 100644 --- a/manifests/crds/experiment-crd.yaml +++ b/manifests/crds/experiment-crd.yaml @@ -673,15 +673,531 @@ spec: type: integer type: object resources: + type: object + securityContext: properties: - limits: - additionalProperties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + type: string + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array type: object - requests: - additionalProperties: - type: string + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: type: object securityContext: properties: @@ -723,11 +1239,85 @@ spec: user: type: string type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object stdin: type: boolean stdinOnce: type: boolean + targetContainerName: + type: string terminationMessagePath: type: string terminationMessagePolicy: @@ -772,30 +1362,6 @@ spec: - name type: object type: array - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean hostAliases: items: properties: @@ -1161,15 +1727,6 @@ spec: type: integer type: object resources: - properties: - limits: - additionalProperties: - type: string - type: object - requests: - additionalProperties: - type: string - type: object type: object securityContext: properties: @@ -1211,6 +1768,78 @@ spec: user: type: string type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object stdin: type: boolean @@ -1266,6 +1895,12 @@ spec: additionalProperties: type: string type: object + overhead: + additionalProperties: + type: string + type: object + preemptionPolicy: + type: string priority: format: int32 type: integer @@ -1327,6 +1962,15 @@ spec: - value type: object type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object type: object serviceAccount: type: string @@ -1355,6 +1999,45 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumes: items: properties: diff --git a/manifests/crds/rollout-crd.yaml b/manifests/crds/rollout-crd.yaml index a3db4d7fca..628caed99c 100644 --- a/manifests/crds/rollout-crd.yaml +++ b/manifests/crds/rollout-crd.yaml @@ -829,7 +829,6 @@ spec: type: integer type: object resources: - properties: {} type: object securityContext: properties: @@ -871,11 +870,610 @@ spec: user: type: string type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + type: string + required: + - name + type: object + type: array + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + searches: + items: + type: string + type: array + type: object + dnsPolicy: + type: string + enableServiceLinks: + type: boolean + ephemeralContainers: + items: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + type: string + resource: + type: string + required: + - resource + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer + type: object + resources: + type: object + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object stdin: type: boolean stdinOnce: type: boolean + targetContainerName: + type: string terminationMessagePath: type: string terminationMessagePolicy: @@ -920,30 +1518,6 @@ spec: - name type: object type: array - dnsConfig: - properties: - nameservers: - items: - type: string - type: array - options: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - searches: - items: - type: string - type: array - type: object - dnsPolicy: - type: string - enableServiceLinks: - type: boolean hostAliases: items: properties: @@ -1309,15 +1883,6 @@ spec: type: integer type: object resources: - properties: - limits: - additionalProperties: - type: string - type: object - requests: - additionalProperties: - type: string - type: object type: object securityContext: properties: @@ -1359,6 +1924,78 @@ spec: user: type: string type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + path: + type: string + port: + anyOf: + - type: string + - type: integer + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: string + - type: integer + required: + - port + type: object + timeoutSeconds: + format: int32 + type: integer type: object stdin: type: boolean @@ -1414,6 +2051,12 @@ spec: additionalProperties: type: string type: object + overhead: + additionalProperties: + type: string + type: object + preemptionPolicy: + type: string priority: format: int32 type: integer @@ -1475,6 +2118,15 @@ spec: - value type: object type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + runAsUserName: + type: string + type: object type: object serviceAccount: type: string @@ -1503,6 +2155,45 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + maxSkew: + format: int32 + type: integer + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumes: items: properties: diff --git a/pkg/apis/rollouts/v1alpha1/openapi_generated.go b/pkg/apis/rollouts/v1alpha1/openapi_generated.go index f42be8a1a9..53538ab996 100644 --- a/pkg/apis/rollouts/v1alpha1/openapi_generated.go +++ b/pkg/apis/rollouts/v1alpha1/openapi_generated.go @@ -79,14 +79,14 @@ func schema_pkg_apis_rollouts_v1alpha1_AnalysisRun(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, @@ -158,14 +158,14 @@ func schema_pkg_apis_rollouts_v1alpha1_AnalysisRunList(ref common.ReferenceCallb Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, @@ -301,14 +301,14 @@ func schema_pkg_apis_rollouts_v1alpha1_AnalysisTemplate(ref common.ReferenceCall Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, @@ -340,14 +340,14 @@ func schema_pkg_apis_rollouts_v1alpha1_AnalysisTemplateList(ref common.Reference Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, @@ -704,14 +704,14 @@ func schema_pkg_apis_rollouts_v1alpha1_Experiment(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, @@ -803,14 +803,14 @@ func schema_pkg_apis_rollouts_v1alpha1_ExperimentList(ref common.ReferenceCallba Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, @@ -1307,14 +1307,14 @@ func schema_pkg_apis_rollouts_v1alpha1_Rollout(ref common.ReferenceCallback) com Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, @@ -1518,14 +1518,14 @@ func schema_pkg_apis_rollouts_v1alpha1_RolloutList(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, diff --git a/pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go index 993f427a54..880d9c4f3e 100644 --- a/pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go @@ -83,7 +83,7 @@ func (in *AnalysisRunArgument) DeepCopy() *AnalysisRunArgument { func (in *AnalysisRunList) DeepCopyInto(out *AnalysisRunList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]AnalysisRun, len(*in)) @@ -193,7 +193,7 @@ func (in *AnalysisTemplate) DeepCopyObject() runtime.Object { func (in *AnalysisTemplateList) DeepCopyInto(out *AnalysisTemplateList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]AnalysisTemplate, len(*in)) @@ -483,7 +483,7 @@ func (in *ExperimentCondition) DeepCopy() *ExperimentCondition { func (in *ExperimentList) DeepCopyInto(out *ExperimentList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Experiment, len(*in)) @@ -868,7 +868,7 @@ func (in *RolloutExperimentTemplate) DeepCopy() *RolloutExperimentTemplate { func (in *RolloutList) DeepCopyInto(out *RolloutList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Rollout, len(*in)) diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index f79657b37b..23b672d48d 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -19,6 +19,8 @@ limitations under the License. package versioned import ( + "fmt" + argoprojv1alpha1 "github.com/argoproj/argo-rollouts/pkg/client/clientset/versioned/typed/rollouts/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -51,9 +53,14 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } var cs Clientset diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 06ba81e4f1..0ce58818ea 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -41,7 +41,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - cs := &Clientset{} + cs := &Clientset{tracker: o} cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { @@ -63,12 +63,17 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { type Clientset struct { testing.Fake discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker } func (c *Clientset) Discovery() discovery.DiscoveryInterface { return c.discovery } +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + var _ clientset.Interface = &Clientset{} // ArgoprojV1alpha1 retrieves the ArgoprojV1alpha1Client diff --git a/pkg/client/clientset/versioned/typed/rollouts/v1alpha1/rollouts_client.go b/pkg/client/clientset/versioned/typed/rollouts/v1alpha1/rollouts_client.go index c7a8a3d071..533a412820 100644 --- a/pkg/client/clientset/versioned/typed/rollouts/v1alpha1/rollouts_client.go +++ b/pkg/client/clientset/versioned/typed/rollouts/v1alpha1/rollouts_client.go @@ -21,7 +21,6 @@ package v1alpha1 import ( v1alpha1 "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1" "github.com/argoproj/argo-rollouts/pkg/client/clientset/versioned/scheme" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" rest "k8s.io/client-go/rest" ) @@ -86,7 +85,7 @@ func setConfigDefaults(config *rest.Config) error { gv := v1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/client/informers/externalversions/rollouts/interface.go b/pkg/client/informers/externalversions/rollouts/interface.go index 484f79b75c..4b6082ac45 100644 --- a/pkg/client/informers/externalversions/rollouts/interface.go +++ b/pkg/client/informers/externalversions/rollouts/interface.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package argoproj +package rollouts import ( internalinterfaces "github.com/argoproj/argo-rollouts/pkg/client/informers/externalversions/internalinterfaces" diff --git a/rollout/controller_test.go b/rollout/controller_test.go index f297c22a65..ecbbad30d5 100644 --- a/rollout/controller_test.go +++ b/rollout/controller_test.go @@ -94,7 +94,8 @@ func (f *fixture) Close() { } const ( - defaultTestPodHash = "78574f5b57" + // update this value after every k8s library update + defaultTestPodHash = "56d899fbc4" ) func newRollout(name string, replicas int, revisionHistoryLimit *int32, selector map[string]string) *v1alpha1.Rollout { @@ -921,7 +922,9 @@ func TestSwitchInvalidSpecMessage(t *testing.T) { // variations made to the pod template in equivalent ways. func TestPodTemplateHashEquivalence(t *testing.T) { var err error - expectedReplicaSetName := "guestbook-75fc5957d4" + // NOTE: This test will fail on every k8s library upgrade. + // To fix it, update expectedReplicaSetName to match the new hash. + expectedReplicaSetName := "guestbook-7b5c4d46d9" r1 := newBlueGreenRollout("guestbook", 1, nil, "active", "") r1Resources := ` @@ -1027,7 +1030,9 @@ func TestComputeHashChangeTolerationBlueGreen(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r) f.run(getKey(r, t)) // this should only update observedGeneration and nothing else - expectedPatch := `{"status":{"observedGeneration":"779b98dbc5"}}` + // NOTE: This test will fail on every k8s library upgrade. + // To fix it, update expectedPatch to match the new hash. + expectedPatch := `{"status":{"observedGeneration":"85db9bf496"}}` patch := f.getPatchedRollout(patchIndex) assert.Equal(t, expectedPatch, patch) } @@ -1069,7 +1074,9 @@ func TestComputeHashChangeTolerationCanary(t *testing.T) { patchIndex := f.expectPatchRolloutAction(r) f.run(getKey(r, t)) // this should only update observedGeneration and nothing else - expectedPatch := `{"status":{"observedGeneration":"56c55d698f"}}` + // NOTE: This test will fail on every k8s library upgrade. + // To fix it, update expectedPatch to match the new hash. + expectedPatch := `{"status":{"observedGeneration":"546d577bb6"}}` patch := f.getPatchedRollout(patchIndex) assert.Equal(t, expectedPatch, patch) } diff --git a/utils/conditions/rollouts_test.go b/utils/conditions/rollouts_test.go index 14c9a6e539..f276f5860e 100644 --- a/utils/conditions/rollouts_test.go +++ b/utils/conditions/rollouts_test.go @@ -630,8 +630,9 @@ func TestRolloutComplete(t *testing.T) { expected bool }{ { - name: "BlueGreen complete", - r: blueGreenRollout(5, 5, 5, 5, true, "685bdb47d8", ""), + name: "BlueGreen complete", + // update hash to status.CurrentPodHash after k8s library update + r: blueGreenRollout(5, 5, 5, 5, true, "6cb88c6bcf", ""), expected: true, }, { diff --git a/utils/controller/controller.go b/utils/controller/controller.go index ade179c519..2b0c184ca3 100644 --- a/utils/controller/controller.go +++ b/utils/controller/controller.go @@ -143,7 +143,7 @@ func EnqueueParentObject(obj interface{}, ownerType string, enqueue func(obj int } namespace := object.GetNamespace() parent := cache.ExplicitKey(namespace + "/" + ownerRef.Name) - log.Infof("Enqueuing parent of %s %s/%s: %s", ownerType, namespace, object.GetName(), parent) + log.Infof("Enqueuing parent of %s %s/%s: %s %s", ownerType, namespace, object.GetName(), ownerRef.Kind, parent) enqueue(parent) } } diff --git a/utils/experiment/experiment_test.go b/utils/experiment/experiment_test.go index 8e7948ddae..fe33161ae8 100644 --- a/utils/experiment/experiment_test.go +++ b/utils/experiment/experiment_test.go @@ -3,15 +3,13 @@ package experiment import ( "sort" "testing" - - "k8s.io/apimachinery/pkg/util/uuid" + "time" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/utils/pointer" - "time" - "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1" ) @@ -97,14 +95,14 @@ func TestReplicaSetNameFromExperiment(t *testing.T) { Name: "foo", }, } - assert.Equal(t, "foo-template-685bdb47d8", ReplicasetNameFromExperiment(e, template)) + assert.Equal(t, "foo-template-6cb88c6bcf", ReplicasetNameFromExperiment(e, template)) newTemplateStatus := v1alpha1.TemplateStatus{ Name: templateName, CollisionCount: pointer.Int32Ptr(1), } e.Status.TemplateStatuses = append(e.Status.TemplateStatuses, newTemplateStatus) - assert.Equal(t, "foo-template-79bb7bdcbf", ReplicasetNameFromExperiment(e, template)) + assert.Equal(t, "foo-template-868df74786", ReplicasetNameFromExperiment(e, template)) } func TestGetExperiments(t *testing.T) { @@ -189,9 +187,9 @@ func TestExperimentNameFromRollout(t *testing.T) { }, } name := ExperimentNameFromRollout(&r) - assert.Equal(t, "foo-685bdb47d8-0", name) + assert.Equal(t, "foo-6cb88c6bcf-0", name) r.Status.CurrentStepIndex = pointer.Int32Ptr(1) name = ExperimentNameFromRollout(&r) - assert.Equal(t, "foo-685bdb47d8-1", name) + assert.Equal(t, "foo-6cb88c6bcf-1", name) }