From 3e1a7bbfb0802373e9e57a248bc7d397c2fbde11 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Mon, 4 Jul 2022 13:18:58 +0100 Subject: [PATCH 1/3] Update ControlPlaneMachineSet API from openshift/api --- go.mod | 2 +- go.sum | 15 +- hack/crds-sync.sh | 3 +- ...perator_00_controlplanemachineset.crd.yaml | 46 +-- ...ketplace-operator_01_operatorhub.crd.yaml} | 0 ...-operator_01_imagedigestmirrorset.crd.yaml | 71 ---- ...fig-operator_01_imagetagmirrorset.crd.yaml | 71 ---- ...config-operator_01_infrastructure.crd.yaml | 6 + ...000_10_config-operator_01_ingress.crd.yaml | 2 +- .../0000_10_config-operator_01_node.crd.yaml | 35 -- .../api/config/v1/types_cluster_version.go | 7 + .../openshift/api/config/v1/types_feature.go | 8 - .../api/config/v1/types_infrastructure.go | 8 + .../openshift/api/config/v1/types_ingress.go | 3 +- .../openshift/api/config/v1/types_node.go | 83 +---- .../api/config/v1/zz_generated.deepcopy.go | 43 +-- .../v1/zz_generated.swagger_doc_generated.go | 32 +- .../v1/0000_10_awsplacementgroup.crd.yaml | 187 ---------- .../0000_10_controlplanemachineset.crd.yaml | 46 +-- .../openshift/api/machine/v1/register.go | 15 +- .../openshift/api/machine/v1/types.go | 21 -- .../api/machine/v1/types_alibabaprovider.go | 1 - .../openshift/api/machine/v1/types_aws.go | 14 +- .../api/machine/v1/types_awsplacementgroup.go | 164 --------- .../v1/types_controlplanemachineset.go | 44 ++- .../api/machine/v1/types_nutanixprovider.go | 10 +- .../api/machine/v1/types_powervsprovider.go | 192 ++++++++++ .../api/machine/v1/zz_generated.deepcopy.go | 332 ++++++++---------- .../v1/zz_generated.swagger_doc_generated.go | 166 ++++----- .../machine/v1beta1/0000_10_machine.crd.yaml | 2 +- .../v1beta1/0000_10_machineset.crd.yaml | 4 +- .../api/machine/v1beta1/types_awsprovider.go | 52 +-- .../machine/v1beta1/types_azureprovider.go | 62 ++++ .../machine/v1beta1/types_vsphereprovider.go | 5 +- .../machine/v1beta1/zz_generated.deepcopy.go | 93 ++++- .../zz_generated.swagger_doc_generated.go | 80 +++-- vendor/modules.txt | 2 +- 37 files changed, 763 insertions(+), 1164 deletions(-) rename vendor/github.com/openshift/api/config/v1/{0000_03_config-operator_01_operatorhub.crd.yaml => 0000_03_marketplace-operator_01_operatorhub.crd.yaml} (100%) delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagedigestmirrorset.crd.yaml delete mode 100644 vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagetagmirrorset.crd.yaml delete mode 100644 vendor/github.com/openshift/api/machine/v1/0000_10_awsplacementgroup.crd.yaml delete mode 100644 vendor/github.com/openshift/api/machine/v1/types.go delete mode 100644 vendor/github.com/openshift/api/machine/v1/types_awsplacementgroup.go create mode 100644 vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go diff --git a/go.mod b/go.mod index 06e9c7ee0..5b82221be 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/golangci/golangci-lint v1.44.2 github.com/onsi/ginkgo/v2 v2.1.3 github.com/onsi/gomega v1.18.2-0.20220228162959-c8ba5823d8c2 - github.com/openshift/api v0.0.0-20220405142345-c689b3938fab + github.com/openshift/api v0.0.0-20220704153639-1d69d7990d92 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 k8s.io/client-go v0.24.1 diff --git a/go.sum b/go.sum index c32042b93..57d9c9128 100644 --- a/go.sum +++ b/go.sum @@ -449,8 +449,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= @@ -753,8 +751,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.2-0.20220228162959-c8ba5823d8c2 h1:vondSjoVjo5NyDsFOg1wb8FKbcQpHQkVmGvolpFHFzE= github.com/onsi/gomega v1.18.2-0.20220228162959-c8ba5823d8c2/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/openshift/api v0.0.0-20220405142345-c689b3938fab h1:MsYztxyvEtg+QQm13HOKjm5Bl/j93xa+licUxqmbzYk= -github.com/openshift/api v0.0.0-20220405142345-c689b3938fab/go.mod h1:F/eU6jgr6Q2VhMu1mSpMmygxAELd7+BUxs3NHZ25jV4= +github.com/openshift/api v0.0.0-20220704153639-1d69d7990d92 h1:/1OPckwz0egYa7igLlQ0tcMyeUFF4NXpG178kFBB9ME= +github.com/openshift/api v0.0.0-20220704153639-1d69d7990d92/go.mod h1:LEnw1IVscIxyDnltE3Wi7bQb/QzIM8BfPNKoGA1Qlxw= github.com/openshift/build-machinery-go v0.0.0-20211213093930-7e33a7eb4ce3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/library-go v0.0.0-20220419144511-5b7d3d77b85e h1:3It5BG+6ik9UJRrwFytR3Canr6js2k1FhaL95X/p5eg= github.com/openshift/library-go v0.0.0-20220419144511-5b7d3d77b85e/go.mod h1:QGr0pban45i4G7e1Z1yH1tcUrceok6QXrqqjSDb2q8M= @@ -1410,7 +1408,6 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= @@ -1636,13 +1633,11 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.2.2 h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk= honnef.co/go/tools v0.2.2/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= -k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= k8s.io/api v0.24.1 h1:BjCMRDcyEYz03joa3K1+rbshwh1Ay6oB53+iUx2H8UY= k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ= k8s.io/apiextensions-apiserver v0.24.0 h1:JfgFqbA8gKJ/uDT++feAqk9jBIwNnL9YGdQvaI9DLtY= k8s.io/apiextensions-apiserver v0.24.0/go.mod h1:iuVe4aEpe6827lvO6yWQVxiPSpPoSKVjkq+MIdg84cM= -k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.24.1 h1:ShD4aDxTQKN5zNf8K1RQ2u98ELLdIW7jEnlO9uAMX/I= k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= @@ -1650,7 +1645,6 @@ k8s.io/apiserver v0.24.0/go.mod h1:WFx2yiOMawnogNToVvUYT9nn1jaIkMKj41ZYCVycsBA= k8s.io/client-go v0.24.0/go.mod h1:VFPQET+cAFpYxh6Bq6f4xyMY80G6jKKktU6G0m00VDw= k8s.io/client-go v0.24.1 h1:w1hNdI9PFrzu3OlovVeTnf4oHDt+FJLd9Ndluvnb42E= k8s.io/client-go v0.24.1/go.mod h1:f1kIDqcEYmwXS/vTbbhopMUbhKp2JhOeVTfxgaCIlF8= -k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/code-generator v0.24.0/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= k8s.io/component-base v0.24.0 h1:h5jieHZQoHrY/lHG+HyrSbJeyfuitheBvqvKwKHVC0g= k8s.io/component-base v0.24.0/go.mod h1:Dgazgon0i7KYUsS8krG8muGiMVtUZxG037l1MKyXgrA= @@ -1658,14 +1652,11 @@ k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAE k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= mvdan.cc/gofumpt v0.2.1 h1:7jakRGkQcLAJdT+C8Bwc9d0BANkVPSkHZkzNv07pJAs= @@ -1686,11 +1677,9 @@ sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220525144126-196828e sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220525144126-196828e54e42/go.mod h1:nLkMD2WB4Jcix1qfVuJeOF4j5y/VfyeOIlTxG5Wj9co= sigs.k8s.io/controller-tools v0.9.0 h1:b/vSEPpA8hiMiyzDfLbZdCn3hoAcy3/868OHhYtHY9w= sigs.k8s.io/controller-tools v0.9.0/go.mod h1:NUkn8FTV3Sad3wWpSK7dt/145qfuQ8CKJV6j4jHC5rM= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/hack/crds-sync.sh b/hack/crds-sync.sh index e231f4b53..bc18b89ef 100755 --- a/hack/crds-sync.sh +++ b/hack/crds-sync.sh @@ -2,5 +2,4 @@ set -euo pipefail -cp "vendor/github.com/openshift/api/machine/v1/0000_10_controlplanemachineset.crd.yaml" "manifests/0000_31_controlplanemachineset.crd.yaml" - +cp "vendor/github.com/openshift/api/machine/v1/0000_10_controlplanemachineset.crd.yaml" "manifests/0000_31_control-plane-machine-set-operator_00_controlplanemachineset.crd.yaml" diff --git a/manifests/0000_31_control-plane-machine-set-operator_00_controlplanemachineset.crd.yaml b/manifests/0000_31_control-plane-machine-set-operator_00_controlplanemachineset.crd.yaml index b9e8e8a2e..1ef687e5d 100644 --- a/manifests/0000_31_control-plane-machine-set-operator_00_controlplanemachineset.crd.yaml +++ b/manifests/0000_31_control-plane-machine-set-operator_00_controlplanemachineset.crd.yaml @@ -134,37 +134,39 @@ spec: - spec properties: failureDomains: - description: FailureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information, eg OpenStack. + description: FailureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information. type: object + required: + - platform properties: aws: - description: AWS configures failure domain information for the AWS platform + description: AWS configures failure domain information for the AWS platform. type: array items: - description: AWSFailureDomain configures failure domain information for the AWS platform + description: AWSFailureDomain configures failure domain information for the AWS platform. type: object minProperties: 1 properties: placement: - description: Placement configures the placement information for this instance + description: Placement configures the placement information for this instance. type: object required: - availabilityZone properties: availabilityZone: - description: AvailabilityZone is the availability zone of the instance + description: AvailabilityZone is the availability zone of the instance. type: string subnet: - description: Subnet is a reference to the subnet to use for this instance + description: Subnet is a reference to the subnet to use for this instance. type: object required: - type properties: arn: - description: ARN of resource + description: ARN of resource. type: string filters: - description: Filters is a set of filters used to identify a resource + description: Filters is a set of filters used to identify a resource. type: array items: description: AWSResourceFilter is a filter used to identify an AWS resource @@ -181,29 +183,29 @@ spec: items: type: string id: - description: ID of resource + description: ID of resource. type: string type: description: Type determines how the reference will fetch the AWS resource. type: string enum: - - id - - arn - - filters + - ID + - ARN + - Filters azure: - description: Azure configures failure domain information for the Azure platform + description: Azure configures failure domain information for the Azure platform. type: array items: - description: AzureFailureDomain configures failure domain information for the Azure platform + description: AzureFailureDomain configures failure domain information for the Azure platform. type: object required: - zone properties: zone: - description: Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone + description: Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone. type: string gcp: - description: GCP configures failure domain information for the GCP platform + description: GCP configures failure domain information for the GCP platform. type: array items: description: GCPFailureDomain configures failure domain information for the GCP platform @@ -215,7 +217,7 @@ spec: description: Zone is the zone in which the GCP machine provider will create the VM. type: string openstack: - description: OpenStack configures failure domain information for the OpenStack platform + description: OpenStack configures failure domain information for the OpenStack platform. type: array items: description: OpenStackFailureDomain configures failure domain information for the OpenStack platform @@ -227,7 +229,7 @@ spec: description: The availability zone from which to launch the server. type: string platform: - description: Platform identifies the platform for which the FailureDomain represents + description: Platform identifies the platform for which the FailureDomain represents. Currently supported values are AWS, Azure, GCP and OpenStack. type: string enum: - "" @@ -355,7 +357,7 @@ spec: description: API version of the referent. type: string blockOwnerDeletion: - description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. + description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. type: boolean controller: description: If true, this reference points to the managing controller. @@ -408,7 +410,7 @@ spec: type: object properties: conditions: - description: 'Conditions represents the observations of the ControlPlaneMachineSet''s current state. Known .status.conditions.type are: (TODO) TODO: Identify different condition types/reasons that will be needed.' + description: 'Conditions represents the observations of the ControlPlaneMachineSet''s current state. Known .status.conditions.type are: Available, Degraded and Progressing.' type: array items: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" @@ -470,6 +472,10 @@ spec: description: UnavailableReplicas is the number of Control Plane Machines that are still required before the ControlPlaneMachineSet reaches the desired available capacity. When this value is non-zero, the number of ReadyReplicas is less than the desired Replicas. type: integer format: int32 + updatedReadyReplicas: + description: UpdatedReadyReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec and are ready. + type: integer + format: int32 updatedReplicas: description: UpdatedReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec. type: integer diff --git a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_operatorhub.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_03_marketplace-operator_01_operatorhub.crd.yaml similarity index 100% rename from vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_operatorhub.crd.yaml rename to vendor/github.com/openshift/api/config/v1/0000_03_marketplace-operator_01_operatorhub.crd.yaml diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagedigestmirrorset.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagedigestmirrorset.crd.yaml deleted file mode 100644 index 29ce33c8b..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagedigestmirrorset.crd.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1126 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: imagedigestmirrorsets.config.openshift.io -spec: - group: config.openshift.io - names: - kind: ImageDigestMirrorSet - listKind: ImageDigestMirrorSetList - plural: imagedigestmirrorsets - singular: imagedigestmirrorset - shortNames: - - idms - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "ImageDigestMirrorSet holds cluster-wide information about how to handle registry mirror rules on using digest pull specification. When multiple policies are defined, the outcome of the behavior is defined on each field. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - imageDigestMirrors: - description: "imageDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in imageDigestMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To use mirrors to pull images using tag specification, users should configure a list of mirrors using \"ImageTagMirrorSet\" CRD. \n If the image pull specification matches the repository of \"source\" in multiple imagedigestmirrorset objects, only the objects which define the most specific namespace match will be used. For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as the \"source\", only the objects using quay.io/libpod/busybox are going to apply for pull specification quay.io/libpod/busybox. Each “source” repository is treated independently; configurations for different “source” repositories don’t interact. \n If the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec. \n When multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. Users who want to use a specific order of mirrors, should configure them into one list of mirrors using the expected order." - type: array - items: - description: ImageDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. - type: object - required: - - source - properties: - mirrorSourcePolicy: - description: mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. If unset, the image will continue to be pulled from the the repository in the pull spec. sourcePolicy is valid configuration only when one or more mirrors are in the mirror list. - type: string - enum: - - NeverContactSource - - AllowContactingSource - mirrors: - description: 'mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. Images can be pulled from these mirrors only if they are referenced by their digests. The mirrored location is obtained by replacing the part of the input reference that matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo repository to be used. The order of mirrors in this list is treated as the user''s desired priority, while source is by default considered lower priority than all mirrors. If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy" Other cluster configuration, including (but not limited to) other imageDigestMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. "mirrors" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table' - type: array - items: - type: string - pattern: ^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ - x-kubernetes-list-type: set - source: - description: 'source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. "source" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo [*.]host for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table' - type: string - pattern: ^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ - x-kubernetes-list-type: atomic - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagetagmirrorset.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagetagmirrorset.crd.yaml deleted file mode 100644 index 8471f50fc..000000000 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_imagetagmirrorset.crd.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/1126 - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: imagetagmirrorsets.config.openshift.io -spec: - group: config.openshift.io - names: - kind: ImageTagMirrorSet - listKind: ImageTagMirrorSetList - plural: imagetagmirrorsets - singular: imagetagmirrorset - shortNames: - - itms - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: "ImageTagMirrorSet holds cluster-wide information about how to handle registry mirror rules on using tag pull specification. When multiple policies are defined, the outcome of the behavior is defined on each field. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." - type: object - required: - - spec - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - description: spec holds user settable values for configuration - type: object - properties: - imageTagMirrors: - description: "imageTagMirrors allows images referenced by image tags in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in imageTagMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. To use mirrors to pull images using digest specification only, users should configure a list of mirrors using \"ImageDigestMirrorSet\" CRD. \n If the image pull specification matches the repository of \"source\" in multiple imagetagmirrorset objects, only the objects which define the most specific namespace match will be used. For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as the \"source\", only the objects using quay.io/libpod/busybox are going to apply for pull specification quay.io/libpod/busybox. Each “source” repository is treated independently; configurations for different “source” repositories don’t interact. \n If the \"mirrors\" is not specified, the image will continue to be pulled from the specified repository in the pull spec. \n When multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. Users who want to use a deterministic order of mirrors, should configure them into one list of mirrors using the expected order." - type: array - items: - description: ImageTagMirrors holds cluster-wide information about how to handle mirrors in the registries config. - type: object - required: - - source - properties: - mirrorSourcePolicy: - description: mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. If unset, the image will continue to be pulled from the repository in the pull spec. sourcePolicy is valid configuration only when one or more mirrors are in the mirror list. - type: string - enum: - - NeverContactSource - - AllowContactingSource - mirrors: - description: 'mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. Images can be pulled from these mirrors only if they are referenced by their tags. The mirrored location is obtained by replacing the part of the input reference that matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo repository to be used. Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. Configuring a list of mirrors using "ImageDigestMirrorSet" CRD and forcing digest-pulls for mirrors avoids that issue. The order of mirrors in this list is treated as the user''s desired priority, while source is by default considered lower priority than all mirrors. If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy". Other cluster configuration, including (but not limited to) other imageTagMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering. "mirrors" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table' - type: array - items: - type: string - pattern: ^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ - x-kubernetes-list-type: set - source: - description: 'source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. "source" uses one of the following formats: host[:port] host[:port]/namespace[/namespace…] host[:port]/namespace[/namespace…]/repo [*.]host for more information about the format, see the document about the location field: https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table' - type: string - pattern: ^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$ - x-kubernetes-list-type: atomic - served: true - storage: true - subresources: - status: {} diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml index 7db041fba..e3d3d4af0 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml @@ -403,6 +403,9 @@ spec: cisInstanceCRN: description: CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain type: string + dnsInstanceCRN: + description: DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain + type: string location: description: Location is where the cluster has been deployed type: string @@ -468,6 +471,9 @@ spec: cisInstanceCRN: description: CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain type: string + dnsInstanceCRN: + description: DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain + type: string region: description: region holds the default Power VS region for new Power VS resources created by the cluster. type: string diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml index d4e3571b6..ffc366607 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_ingress.crd.yaml @@ -271,10 +271,10 @@ spec: defaultPlacement: description: "defaultPlacement is set at installation time to control which nodes will host the ingress router pods by default. The options are control-plane nodes or worker nodes. \n This field works by dictating how the Cluster Ingress Operator will consider unset replicas and nodePlacement fields in IngressController resources when creating the corresponding Deployments. \n See the documentation for the IngressController replicas and nodePlacement fields for more information. \n When omitted, the default value is Workers" type: string - default: Workers enum: - ControlPlane - Workers + - "" served: true storage: true subresources: diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_node.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_node.crd.yaml index 0ca54736d..a4ef368c2 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_node.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_node.crd.yaml @@ -53,41 +53,6 @@ spec: status: description: status holds observed values. type: object - properties: - workerLatencyProfileStatus: - description: WorkerLatencyProfileStatus provides the current status of WorkerLatencyProfile - type: object - properties: - conditions: - description: conditions describes the state of the WorkerLatencyProfile and related components (Kubelet or Controller Manager or Kube API Server) - type: array - items: - type: object - required: - - lastTransitionTime - - owner - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the time of the last update to the current status property. - type: string - format: date-time - message: - description: message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines. - type: string - owner: - description: Owner specifies the operator that is updating this condition - type: string - reason: - description: reason is the CamelCase reason for the condition's current status. - type: string - status: - description: status of the condition, one of True, False, Unknown. - type: string - type: - description: type specifies the aspect reported by this condition. - type: string served: true storage: true subresources: diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go index 52248a68e..95264eec6 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go @@ -247,6 +247,13 @@ const ( ClusterVersionCapabilityMarketplace ClusterVersionCapability = "marketplace" ) +// KnownClusterVersionCapabilities includes all known optional, core cluster components. +var KnownClusterVersionCapabilities = []ClusterVersionCapability{ + ClusterVersionCapabilityBaremetal, + ClusterVersionCapabilityMarketplace, + ClusterVersionCapabilityOpenShiftSamples, +} + // ClusterVersionCapabilitySet defines sets of cluster version capabilities. // +kubebuilder:validation:Enum=None;v4.11;vCurrent type ClusterVersionCapabilitySet string diff --git a/vendor/github.com/openshift/api/config/v1/types_feature.go b/vendor/github.com/openshift/api/config/v1/types_feature.go index 7c34a1ef1..21fc4f9a6 100644 --- a/vendor/github.com/openshift/api/config/v1/types_feature.go +++ b/vendor/github.com/openshift/api/config/v1/types_feature.go @@ -40,9 +40,6 @@ var ( // TopologyManager enables ToplogyManager support. Upgrades are enabled with this feature. LatencySensitive FeatureSet = "LatencySensitive" - - // IPv6DualStackNoUpgrade enables dual-stack. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. - IPv6DualStackNoUpgrade FeatureSet = "IPv6DualStackNoUpgrade" ) type FeatureGateSpec struct { @@ -126,11 +123,6 @@ var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ "TopologyManager", // sig-pod, sjenning ). toFeatures(), - IPv6DualStackNoUpgrade: newDefaultFeatures(). - with( - "IPv6DualStack", // sig-network, danwinship - ). - toFeatures(), } var defaultFeatures = &FeatureGateEnabledDisabled{ diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index 5cfa463f0..d2abace7c 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -574,6 +574,10 @@ type IBMCloudPlatformStatus struct { // CISInstanceCRN is the CRN of the Cloud Internet Services instance managing // the DNS zone for the cluster's base domain CISInstanceCRN string `json:"cisInstanceCRN,omitempty"` + + // DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone + // for the cluster's base domain + DNSInstanceCRN string `json:"dnsInstanceCRN,omitempty"` } // KubevirtPlatformSpec holds the desired state of the kubevirt infrastructure provider. @@ -662,6 +666,10 @@ type PowerVSPlatformStatus struct { // CISInstanceCRN is the CRN of the Cloud Internet Services instance managing // the DNS zone for the cluster's base domain CISInstanceCRN string `json:"cisInstanceCRN,omitempty"` + + // DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone + // for the cluster's base domain + DNSInstanceCRN string `json:"dnsInstanceCRN,omitempty"` } // AlibabaCloudPlatformSpec holds the desired state of the Alibaba Cloud infrastructure provider. diff --git a/vendor/github.com/openshift/api/config/v1/types_ingress.go b/vendor/github.com/openshift/api/config/v1/types_ingress.go index 223b822f6..c7fec9c03 100644 --- a/vendor/github.com/openshift/api/config/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/config/v1/types_ingress.go @@ -126,8 +126,7 @@ type IngressStatus struct { // // When omitted, the default value is Workers // - // +kubebuilder:validation:Enum:="ControlPlane";"Workers" - // +kubebuilder:default:="Workers" + // +kubebuilder:validation:Enum:="ControlPlane";"Workers";"" // +optional DefaultPlacement DefaultPlacement `json:"defaultPlacement"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_node.go b/vendor/github.com/openshift/api/config/v1/types_node.go index 573a98cf6..10a805902 100644 --- a/vendor/github.com/openshift/api/config/v1/types_node.go +++ b/vendor/github.com/openshift/api/config/v1/types_node.go @@ -41,11 +41,7 @@ type NodeSpec struct { WorkerLatencyProfile WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` } -type NodeStatus struct { - // WorkerLatencyProfileStatus provides the current status of WorkerLatencyProfile - // +optional - WorkerLatencyProfileStatus WorkerLatencyProfileStatus `json:"workerLatencyProfileStatus,omitempty"` -} +type NodeStatus struct{} // +kubebuilder:validation:Enum=v1;v2;"" type CgroupMode string @@ -100,83 +96,6 @@ const ( LowUnreachableTolerationSeconds = 60 ) -// WorkerLatencyProfileStatus provides status information about the WorkerLatencyProfile rollout -type WorkerLatencyProfileStatus struct { - // conditions describes the state of the WorkerLatencyProfile and related components - // (Kubelet or Controller Manager or Kube API Server) - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Conditions []WorkerLatencyStatusCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` -} - -// WorkerLatencyStatusConditionType is an aspect of WorkerLatencyProfile state. -type WorkerLatencyStatusConditionType string - -const ( - // Progressing indicates that the updates to component (Kubelet or Controller - // Manager or Kube API Server) is actively rolling out, propagating changes to the - // respective arguments. - WorkerLatencyProfileProgressing WorkerLatencyStatusConditionType = "Progressing" - - // Complete indicates whether the component (Kubelet or Controller Manager or Kube API Server) - // is successfully updated the respective arguments. - WorkerLatencyProfileComplete WorkerLatencyStatusConditionType = "Complete" - - // Degraded indicates that the component (Kubelet or Controller Manager or Kube API Server) - // does not reach the state 'Complete' over a period of time - // resulting in either a lower quality or absence of service. - // If the component enters in this state, "Default" WorkerLatencyProfileType - // rollout will be initiated to restore the respective default arguments of all - // components. - WorkerLatencyProfileDegraded WorkerLatencyStatusConditionType = "Degraded" -) - -type WorkerLatencyStatusConditionOwner string - -const ( - // Machine Config Operator will update condition status by setting this as owner - MachineConfigOperator WorkerLatencyStatusConditionOwner = "MachineConfigOperator" - - // Kube Controller Manager Operator will update condition status by setting this as owner - KubeControllerManagerOperator WorkerLatencyStatusConditionOwner = "KubeControllerManagerOperator" - - // Kube API Server Operator will update condition status by setting this as owner - KubeAPIServerOperator WorkerLatencyStatusConditionOwner = "KubeAPIServerOperator" -) - -type WorkerLatencyStatusCondition struct { - // Owner specifies the operator that is updating this condition - // +kubebuilder:validation:Required - // +required - Owner WorkerLatencyStatusConditionOwner `json:"owner"` - - // type specifies the aspect reported by this condition. - // +kubebuilder:validation:Required - // +required - Type WorkerLatencyStatusConditionType `json:"type"` - - // status of the condition, one of True, False, Unknown. - // +kubebuilder:validation:Required - // +required - Status ConditionStatus `json:"status"` - - // lastTransitionTime is the time of the last update to the current status property. - // +kubebuilder:validation:Required - // +required - LastTransitionTime metav1.Time `json:"lastTransitionTime"` - - // reason is the CamelCase reason for the condition's current status. - // +optional - Reason string `json:"reason,omitempty"` - - // message provides additional information about the current condition. - // This is only to be consumed by humans. It may contain Line Feed - // characters (U+000A), which should be rendered as new lines. - // +optional - Message string `json:"message,omitempty"` -} - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index a0b2829e8..e3f6c3c68 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go @@ -3259,7 +3259,7 @@ func (in *Node) DeepCopyInto(out *Node) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) + out.Status = in.Status return } @@ -3333,7 +3333,6 @@ func (in *NodeSpec) DeepCopy() *NodeSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { *out = *in - in.WorkerLatencyProfileStatus.DeepCopyInto(&out.WorkerLatencyProfileStatus) return } @@ -4800,43 +4799,3 @@ func (in *WebhookTokenAuthenticator) DeepCopy() *WebhookTokenAuthenticator { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkerLatencyProfileStatus) DeepCopyInto(out *WorkerLatencyProfileStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]WorkerLatencyStatusCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerLatencyProfileStatus. -func (in *WorkerLatencyProfileStatus) DeepCopy() *WorkerLatencyProfileStatus { - if in == nil { - return nil - } - out := new(WorkerLatencyProfileStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkerLatencyStatusCondition) DeepCopyInto(out *WorkerLatencyStatusCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerLatencyStatusCondition. -func (in *WorkerLatencyStatusCondition) DeepCopy() *WorkerLatencyStatusCondition { - if in == nil { - return nil - } - out := new(WorkerLatencyStatusCondition) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index 6c1a698b6..6515653c9 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -1136,6 +1136,7 @@ var map_IBMCloudPlatformStatus = map[string]string{ "resourceGroupName": "ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster.", "providerType": "ProviderType indicates the type of cluster that was created", "cisInstanceCRN": "CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", + "dnsInstanceCRN": "DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain", } func (IBMCloudPlatformStatus) SwaggerDoc() map[string]string { @@ -1342,6 +1343,7 @@ var map_PowerVSPlatformStatus = map[string]string{ "zone": "zone holds the default zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported", "serviceEndpoints": "serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service.", "cisInstanceCRN": "CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", + "dnsInstanceCRN": "DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain", } func (PowerVSPlatformStatus) SwaggerDoc() map[string]string { @@ -1573,36 +1575,6 @@ func (NodeSpec) SwaggerDoc() map[string]string { return map_NodeSpec } -var map_NodeStatus = map[string]string{ - "workerLatencyProfileStatus": "WorkerLatencyProfileStatus provides the current status of WorkerLatencyProfile", -} - -func (NodeStatus) SwaggerDoc() map[string]string { - return map_NodeStatus -} - -var map_WorkerLatencyProfileStatus = map[string]string{ - "": "WorkerLatencyProfileStatus provides status information about the WorkerLatencyProfile rollout", - "conditions": "conditions describes the state of the WorkerLatencyProfile and related components (Kubelet or Controller Manager or Kube API Server)", -} - -func (WorkerLatencyProfileStatus) SwaggerDoc() map[string]string { - return map_WorkerLatencyProfileStatus -} - -var map_WorkerLatencyStatusCondition = map[string]string{ - "owner": "Owner specifies the operator that is updating this condition", - "type": "type specifies the aspect reported by this condition.", - "status": "status of the condition, one of True, False, Unknown.", - "lastTransitionTime": "lastTransitionTime is the time of the last update to the current status property.", - "reason": "reason is the CamelCase reason for the condition's current status.", - "message": "message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines.", -} - -func (WorkerLatencyStatusCondition) SwaggerDoc() map[string]string { - return map_WorkerLatencyStatusCondition -} - var map_BasicAuthIdentityProvider = map[string]string{ "": "BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials", } diff --git a/vendor/github.com/openshift/api/machine/v1/0000_10_awsplacementgroup.crd.yaml b/vendor/github.com/openshift/api/machine/v1/0000_10_awsplacementgroup.crd.yaml deleted file mode 100644 index e6031e160..000000000 --- a/vendor/github.com/openshift/api/machine/v1/0000_10_awsplacementgroup.crd.yaml +++ /dev/null @@ -1,187 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - exclude.release.openshift.io/internal-openshift-hosted: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - api-approved.openshift.io: https://github.com/openshift/api/pull/1091 - name: awsplacementgroups.machine.openshift.io -spec: - group: machine.openshift.io - names: - kind: AWSPlacementGroup - listKind: AWSPlacementGroupList - plural: awsplacementgroups - singular: awsplacementgroup - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Placement Group Type - jsonPath: .status.observedConfiguration.groupType - name: Type - type: string - - description: Management State - jsonPath: .spec.managementSpec.managementState - name: Management - type: string - - description: EC2 Replicas within the Placement Group - jsonPath: .status.replicas - name: Replicas - type: integer - - description: AWSPlacementGroup age - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: 'AWSPlacementGroup ensures that a placement group matching the given configuration exists within AWS Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).' - type: object - properties: - apiVersion: - 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 - kind: - 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 - metadata: - type: object - spec: - type: object - required: - - managementSpec - properties: - credentialsSecret: - description: CredentialsSecret is a reference to the secret with AWS credentials. The secret must reside in the same namespace as the AWSPlacementGroup resource. Otherwise, the controller will leverage the EC2 instance assigned IAM Role, in OpenShift this will always be the Control Plane Machine IAM Role. - type: object - properties: - name: - description: Name of the Secret. - type: string - managementSpec: - description: AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group. - type: object - required: - - managementState - properties: - managed: - description: Managed defines the configuration for the placement groups to be created. Updates to the configuration will not be observed as placement groups are immutable after creation. - type: object - required: - - groupType - properties: - groupType: - description: 'GroupType specifies the type of AWS placement group to use for this Machine. This parameter is only used when a Machine is being created and the named placement group does not exist. Valid values are "Cluster", "Partition", "Spread". This value is required and, in case a placement group already exists, will be validated against the existing placement group. Note: If the value of this field is "Spread", Machines created within the group may no have placement.tenancy set to "dedicated".' - type: string - enum: - - Cluster - - Partition - - Spread - partition: - description: Partition defines the configuration of a partition placement group. - type: object - properties: - count: - description: 'Count specifies the number of partitions for a Partition placement group. This value is only observed when creating a placement group and only when the `groupType` is set to `Partition`. Note the partition count of a placement group cannot be changed after creation. If unset, AWS will provide a default partition count. This default is currently 2. Note: When using more than 2 partitions, the "dedicated" tenancy option on Machines created within the group is unavailable.' - type: integer - format: int32 - maximum: 7 - minimum: 1 - managementState: - description: ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed. - type: string - status: - type: object - properties: - conditions: - description: 'Conditions represents the observations of the AWSPlacementGroup''s current state. Known .status.conditions.type are: Ready, Deleting' - type: array - items: - description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - type: object - required: - - lastTransitionTime - - message - - reason - - status - - type - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - type: string - format: date-time - message: - description: message is a human readable message indicating details about the transition. This may be an empty string. - type: string - maxLength: 32768 - observedGeneration: - description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. - type: integer - format: int64 - minimum: 0 - reason: - description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. - type: string - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - status: - description: status of the condition, one of True, False, Unknown. - type: string - enum: - - "True" - - "False" - - Unknown - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - type: string - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - expiresAt: - description: ExpiresAt identifies when the observed configuration is valid until. The observed configuration should not be trusted if this time has passed. The AWSPlacementGroup controller will attempt to update the status before it expires. - type: string - format: date-time - managementState: - description: ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed. This value is owned by the controller and may differ from the spec in cases when a user attempts to manage a previously unmanaged placement group. - type: string - observedConfiguration: - description: ObservedConfiguration represents the configuration present on the placement group on AWS. - type: object - required: - - groupType - properties: - groupType: - description: 'GroupType specifies the type of AWS placement group to use for this Machine. This parameter is only used when a Machine is being created and the named placement group does not exist. Valid values are "Cluster", "Partition", "Spread". This value is required and, in case a placement group already exists, will be validated against the existing placement group. Note: If the value of this field is "Spread", Machines created within the group may no have placement.tenancy set to "dedicated".' - type: string - enum: - - Cluster - - Partition - - Spread - partition: - description: Partition defines the configuration of a partition placement group. - type: object - properties: - count: - description: 'Count specifies the number of partitions for a Partition placement group. This value is only observed when creating a placement group and only when the `groupType` is set to `Partition`. Note the partition count of a placement group cannot be changed after creation. If unset, AWS will provide a default partition count. This default is currently 2. Note: When using more than 2 partitions, the "dedicated" tenancy option on Machines created within the group is unavailable.' - type: integer - format: int32 - maximum: 7 - minimum: 1 - replicas: - description: 'Replicas counts how many AWS EC2 instances are present within the placement group. Note: This is a pointer to be able to distinguish between an empty placement group and the status having not yet been observed.' - type: integer - format: int32 - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/vendor/github.com/openshift/api/machine/v1/0000_10_controlplanemachineset.crd.yaml b/vendor/github.com/openshift/api/machine/v1/0000_10_controlplanemachineset.crd.yaml index b9e8e8a2e..529346a85 100644 --- a/vendor/github.com/openshift/api/machine/v1/0000_10_controlplanemachineset.crd.yaml +++ b/vendor/github.com/openshift/api/machine/v1/0000_10_controlplanemachineset.crd.yaml @@ -134,37 +134,39 @@ spec: - spec properties: failureDomains: - description: FailureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information, eg OpenStack. + description: FailureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information. type: object + required: + - platform properties: aws: - description: AWS configures failure domain information for the AWS platform + description: AWS configures failure domain information for the AWS platform. type: array items: - description: AWSFailureDomain configures failure domain information for the AWS platform + description: AWSFailureDomain configures failure domain information for the AWS platform. type: object minProperties: 1 properties: placement: - description: Placement configures the placement information for this instance + description: Placement configures the placement information for this instance. type: object required: - availabilityZone properties: availabilityZone: - description: AvailabilityZone is the availability zone of the instance + description: AvailabilityZone is the availability zone of the instance. type: string subnet: - description: Subnet is a reference to the subnet to use for this instance + description: Subnet is a reference to the subnet to use for this instance. type: object required: - type properties: arn: - description: ARN of resource + description: ARN of resource. type: string filters: - description: Filters is a set of filters used to identify a resource + description: Filters is a set of filters used to identify a resource. type: array items: description: AWSResourceFilter is a filter used to identify an AWS resource @@ -181,29 +183,29 @@ spec: items: type: string id: - description: ID of resource + description: ID of resource. type: string type: description: Type determines how the reference will fetch the AWS resource. type: string enum: - - id - - arn - - filters + - ID + - ARN + - Filters azure: - description: Azure configures failure domain information for the Azure platform + description: Azure configures failure domain information for the Azure platform. type: array items: - description: AzureFailureDomain configures failure domain information for the Azure platform + description: AzureFailureDomain configures failure domain information for the Azure platform. type: object required: - zone properties: zone: - description: Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone + description: Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone. type: string gcp: - description: GCP configures failure domain information for the GCP platform + description: GCP configures failure domain information for the GCP platform. type: array items: description: GCPFailureDomain configures failure domain information for the GCP platform @@ -215,7 +217,7 @@ spec: description: Zone is the zone in which the GCP machine provider will create the VM. type: string openstack: - description: OpenStack configures failure domain information for the OpenStack platform + description: OpenStack configures failure domain information for the OpenStack platform. type: array items: description: OpenStackFailureDomain configures failure domain information for the OpenStack platform @@ -227,7 +229,7 @@ spec: description: The availability zone from which to launch the server. type: string platform: - description: Platform identifies the platform for which the FailureDomain represents + description: Platform identifies the platform for which the FailureDomain represents. Currently supported values are AWS, Azure, GCP and OpenStack. type: string enum: - "" @@ -355,7 +357,7 @@ spec: description: API version of the referent. type: string blockOwnerDeletion: - description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. + description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. type: boolean controller: description: If true, this reference points to the managing controller. @@ -408,7 +410,7 @@ spec: type: object properties: conditions: - description: 'Conditions represents the observations of the ControlPlaneMachineSet''s current state. Known .status.conditions.type are: (TODO) TODO: Identify different condition types/reasons that will be needed.' + description: 'Conditions represents the observations of the ControlPlaneMachineSet''s current state. Known .status.conditions.type are: Available, Degraded and Progressing.' type: array items: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" @@ -459,7 +461,7 @@ spec: type: integer format: int64 readyReplicas: - description: ReadyReplicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller which are ready. + description: ReadyReplicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller which are ready. Note that this value may be higher than the desired number of replicas while rolling updates are in-progress. type: integer format: int32 replicas: @@ -471,7 +473,7 @@ spec: type: integer format: int32 updatedReplicas: - description: UpdatedReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec. + description: UpdatedReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec and are ready. This value is set to 0 when a change is detected to the desired spec. When the update strategy is RollingUpdate, this will also coincide with starting the process of updating the Machines. When the update strategy is OnDelete, this value will remain at 0 until a user deletes an existing replica and its replacement has become ready. type: integer format: int32 served: true diff --git a/vendor/github.com/openshift/api/machine/v1/register.go b/vendor/github.com/openshift/api/machine/v1/register.go index 9e5890693..b950169bf 100644 --- a/vendor/github.com/openshift/api/machine/v1/register.go +++ b/vendor/github.com/openshift/api/machine/v1/register.go @@ -12,15 +12,26 @@ var ( schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // Install is a function which adds this version to a scheme Install = schemeBuilder.AddToScheme + + // SchemeGroupVersion generated code relies on this name + // Deprecated + SchemeGroupVersion = GroupVersion + // AddToScheme exists solely to keep the old generators creating valid code + // DEPRECATED + AddToScheme = schemeBuilder.AddToScheme ) +// Resource generated code relies on this being here, but it logically belongs to the group +// DEPRECATED +func Resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: GroupName, Resource: resource} +} + // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { metav1.AddToGroupVersion(scheme, GroupVersion) scheme.AddKnownTypes(GroupVersion, - &AWSPlacementGroup{}, - &AWSPlacementGroupList{}, &ControlPlaneMachineSet{}, &ControlPlaneMachineSetList{}, ) diff --git a/vendor/github.com/openshift/api/machine/v1/types.go b/vendor/github.com/openshift/api/machine/v1/types.go deleted file mode 100644 index 98c2e17b0..000000000 --- a/vendor/github.com/openshift/api/machine/v1/types.go +++ /dev/null @@ -1,21 +0,0 @@ -package v1 - -// ManagementState denotes whether the resource is expected to be managed by the controller or by the user. -type ManagementState string - -const ( - // ManagedManagementState denotes that the resource is expected to be managed by the controller. - ManagedManagementState ManagementState = "Managed" - - // UnmanagedManagementState denotes that the resource is expected to be managed by the user. - UnmanagedManagementState ManagementState = "Unmanaged" -) - -// LocalSecretReference contains enough information to let you locate the -// referenced Secret inside the same namespace. -// +structType=atomic -type LocalSecretReference struct { - // Name of the Secret. - // +kubebuilder:validation:=Required - Name string `json:"name"` -} diff --git a/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go b/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go index dc5d5b274..9c73280fb 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go +++ b/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go @@ -73,7 +73,6 @@ const ( AlibabaResourceReferenceTypeTags AlibabaResourceReferenceType = "Tags" ) -// +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // AlibabaCloudMachineProviderConfig is the Schema for the alibabacloudmachineproviderconfig API diff --git a/vendor/github.com/openshift/api/machine/v1/types_aws.go b/vendor/github.com/openshift/api/machine/v1/types_aws.go index 8435ed066..37e97b0e3 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_aws.go +++ b/vendor/github.com/openshift/api/machine/v1/types_aws.go @@ -7,32 +7,32 @@ package v1 type AWSResourceReference struct { // Type determines how the reference will fetch the AWS resource. // +unionDiscriminator - // +kubebuilder:validation:Enum:="id";"arn";"filters" // +kubebuilder:validation:Required Type AWSResourceReferenceType `json:"type"` - // ID of resource + // ID of resource. // +optional ID *string `json:"id,omitempty"` - // ARN of resource + // ARN of resource. // +optional ARN *string `json:"arn,omitempty"` - // Filters is a set of filters used to identify a resource + // Filters is a set of filters used to identify a resource. // +optional Filters *[]AWSResourceFilter `json:"filters,omitempty"` } // AWSResourceReferenceType is an enumeration of different resource reference types. +// +kubebuilder:validation:Enum:="ID";"ARN";"Filters" type AWSResourceReferenceType string const ( // AWSIDReferenceType is a resource reference based on the object ID. - AWSIDReferenceType AWSResourceReferenceType = "id" + AWSIDReferenceType AWSResourceReferenceType = "ID" // AWSARNReferenceType is a resource reference based on the object ARN. - AWSARNReferenceType AWSResourceReferenceType = "arn" + AWSARNReferenceType AWSResourceReferenceType = "ARN" // AWSFiltersReferenceType is a resource reference based on filters. - AWSFiltersReferenceType AWSResourceReferenceType = "filters" + AWSFiltersReferenceType AWSResourceReferenceType = "Filters" ) // AWSResourceFilter is a filter used to identify an AWS resource diff --git a/vendor/github.com/openshift/api/machine/v1/types_awsplacementgroup.go b/vendor/github.com/openshift/api/machine/v1/types_awsplacementgroup.go deleted file mode 100644 index 4a091aec1..000000000 --- a/vendor/github.com/openshift/api/machine/v1/types_awsplacementgroup.go +++ /dev/null @@ -1,164 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AWSPlacementGroup ensures that a placement group matching the given configuration exists within AWS -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:openapi-gen=true -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".status.observedConfiguration.groupType",description="Placement Group Type" -// +kubebuilder:printcolumn:name="Management",type="string",JSONPath=".spec.managementSpec.managementState",description="Management State" -// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".status.replicas",description="EC2 Replicas within the Placement Group" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="AWSPlacementGroup age" -type AWSPlacementGroup struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AWSPlacementGroupSpec `json:"spec,omitempty"` - Status AWSPlacementGroupStatus `json:"status,omitempty"` -} - -type AWSPlacementGroupSpec struct { - // AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group. - // +kubebuilder:validation:Required - ManagementSpec AWSPlacementGroupManagementSpec `json:"managementSpec"` - - // CredentialsSecret is a reference to the secret with AWS credentials. The secret must reside in the same namespace - // as the AWSPlacementGroup resource. Otherwise, the controller will leverage the EC2 instance assigned IAM Role, - // in OpenShift this will always be the Control Plane Machine IAM Role. - // +optional - CredentialsSecret *LocalSecretReference `json:"credentialsSecret,omitempty"` -} - -// AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group. -// +union -type AWSPlacementGroupManagementSpec struct { - // ManagementState determines whether the placement group is expected - // to be managed by this CRD or whether it is user managed. - // A managed placement group may be moved to unmanaged, however an unmanaged - // group may not be moved back to managed. - // +kubebuilder:validation:Required - // +unionDiscriminator - ManagementState ManagementState `json:"managementState"` - - // Managed defines the configuration for the placement groups to be created. - // Updates to the configuration will not be observed as placement groups are immutable - // after creation. - // +optional - Managed *ManagedAWSPlacementGroup `json:"managed,omitempty"` -} - -// AWSPlacementGroupType represents the valid values for the Placement GroupType field. -type AWSPlacementGroupType string - -const ( - // AWSClusterPlacementGroupType is the "Cluster" placement group type. - // Cluster placement groups place instances close together to improve network latency and throughput. - AWSClusterPlacementGroupType AWSPlacementGroupType = "Cluster" - // AWSPartitionPlacementGroupType is the "Partition" placement group type. - // Partition placement groups reduce the likelihood of hardware failures - // disrupting your application's availability. - // Partition placement groups are recommended for use with large scale - // distributed and replicated workloads. - AWSPartitionPlacementGroupType AWSPlacementGroupType = "Partition" - // AWSSpreadPlacementGroupType is the "Spread" placement group type. - // Spread placement groups place instances on distinct racks within the availability - // zone. This ensures instances each have their own networking and power source - // for maximum hardware fault tolerance. - // Spread placement groups are recommended for a small number of critical instances - // which must be kept separate from one another. - // Using a Spread placement group imposes a limit of seven instances within - // the placement group within a single availability zone. - AWSSpreadPlacementGroupType AWSPlacementGroupType = "Spread" -) - -// ManagedAWSPlacementGroup is a discriminated union of placement group configuration. -// +union -type ManagedAWSPlacementGroup struct { - // GroupType specifies the type of AWS placement group to use for this Machine. - // This parameter is only used when a Machine is being created and the named - // placement group does not exist. - // Valid values are "Cluster", "Partition", "Spread". - // This value is required and, in case a placement group already exists, will be - // validated against the existing placement group. - // Note: If the value of this field is "Spread", Machines created within the group - // may no have placement.tenancy set - // to "dedicated". - // +kubebuilder:validation:Enum:="Cluster";"Partition";"Spread" - // +unionDiscriminator - // +kubebuilder:validation:Required - GroupType AWSPlacementGroupType `json:"groupType,omitempty"` - - // Partition defines the configuration of a partition placement group. - // +optional - Partition *AWSPartitionPlacement `json:"partition,omitempty"` -} - -// AWSPartitionPlacement defines the configuration for partition placement groups. -type AWSPartitionPlacement struct { - // Count specifies the number of partitions for a Partition placement - // group. This value is only observed when creating a placement group and - // only when the `groupType` is set to `Partition`. - // Note the partition count of a placement group cannot be changed after creation. - // If unset, AWS will provide a default partition count. - // This default is currently 2. - // Note: When using more than 2 partitions, the "dedicated" tenancy option on Machines - // created within the group is unavailable. - // +kubebuilder:validation:Minimum:=1 - // +kubebuilder:validation:Maximum:=7 - // +optional - Count int32 `json:"count,omitempty"` -} - -type AWSPlacementGroupStatus struct { - // Conditions represents the observations of the AWSPlacementGroup's current state. - // Known .status.conditions.type are: Ready, Deleting - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // ExpiresAt identifies when the observed configuration is valid until. - // The observed configuration should not be trusted if this time has passed. - // The AWSPlacementGroup controller will attempt to update the status before it expires. - // +optional - ExpiresAt *metav1.Time `json:"expiresAt,omitempty"` - - // Replicas counts how many AWS EC2 instances are present within the placement group. - // Note: This is a pointer to be able to distinguish between an empty placement group - // and the status having not yet been observed. - // +optional - Replicas *int32 `json:"replicas,omitempty"` - - // ManagementState determines whether the placement group is expected - // to be managed by this CRD or whether it is user managed. - // A managed placement group may be moved to unmanaged, however an unmanaged - // group may not be moved back to managed. - // This value is owned by the controller and may differ from the spec in cases - // when a user attempts to manage a previously unmanaged placement group. - // +optional - ManagementState ManagementState `json:"managementState,omitempty"` - - // ObservedConfiguration represents the configuration present on the placement group on AWS. - // +optional - ObservedConfiguration ManagedAWSPlacementGroup `json:"observedConfiguration,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AWSPlacementGroupList contains a list of AWSPlacementGroup -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type AWSPlacementGroupList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AWSPlacementGroup `json:"items"` -} diff --git a/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go b/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go index af3bbaa62..3fc49674a 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go +++ b/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go @@ -101,8 +101,7 @@ type OpenShiftMachineV1Beta1MachineTemplate struct { // availability zones) in which the ControlPlaneMachineSet should balance // the Control Plane Machines. // This will be merged into the ProviderSpec given in the template. - // This field is optional on platforms that do not require placement - // information, eg OpenStack. + // This field is optional on platforms that do not require placement information. // +optional FailureDomains FailureDomains `json:"failureDomains,omitempty"` @@ -188,51 +187,52 @@ const ( // across failure domains on different platforms. // +union type FailureDomains struct { - // Platform identifies the platform for which the FailureDomain represents + // Platform identifies the platform for which the FailureDomain represents. + // Currently supported values are AWS, Azure, GCP and OpenStack. // +unionDiscriminator - // +optional - Platform configv1.PlatformType `json:"platform,omitempty"` + // +kubebuilder:validation:Required + Platform configv1.PlatformType `json:"platform"` - // AWS configures failure domain information for the AWS platform + // AWS configures failure domain information for the AWS platform. // +optional AWS *[]AWSFailureDomain `json:"aws,omitempty"` - // Azure configures failure domain information for the Azure platform + // Azure configures failure domain information for the Azure platform. // +optional Azure *[]AzureFailureDomain `json:"azure,omitempty"` - // GCP configures failure domain information for the GCP platform + // GCP configures failure domain information for the GCP platform. // +optional GCP *[]GCPFailureDomain `json:"gcp,omitempty"` - // OpenStack configures failure domain information for the OpenStack platform + // OpenStack configures failure domain information for the OpenStack platform. // +optional OpenStack *[]OpenStackFailureDomain `json:"openstack,omitempty"` } -// AWSFailureDomain configures failure domain information for the AWS platform +// AWSFailureDomain configures failure domain information for the AWS platform. // +kubebuilder:validation:MinProperties:=1 type AWSFailureDomain struct { - // Subnet is a reference to the subnet to use for this instance + // Subnet is a reference to the subnet to use for this instance. // +optional Subnet *AWSResourceReference `json:"subnet,omitempty"` - // Placement configures the placement information for this instance + // Placement configures the placement information for this instance. // +optional Placement AWSFailureDomainPlacement `json:"placement,omitempty"` } -// AWSFailureDomainPlacement configures the placement information for the AWSFailureDomain +// AWSFailureDomainPlacement configures the placement information for the AWSFailureDomain. type AWSFailureDomainPlacement struct { - // AvailabilityZone is the availability zone of the instance + // AvailabilityZone is the availability zone of the instance. // +kubebuilder:validation:Required AvailabilityZone string `json:"availabilityZone"` } -// AzureFailureDomain configures failure domain information for the Azure platform +// AzureFailureDomain configures failure domain information for the Azure platform. type AzureFailureDomain struct { // Availability Zone for the virtual machine. - // If nil, the virtual machine should be deployed to no zone + // If nil, the virtual machine should be deployed to no zone. // +kubebuilder:validation:Required Zone string `json:"zone"` } @@ -254,8 +254,7 @@ type OpenStackFailureDomain struct { // ControlPlaneMachineSetStatus represents the status of the ControlPlaneMachineSet CRD. type ControlPlaneMachineSetStatus struct { // Conditions represents the observations of the ControlPlaneMachineSet's current state. - // Known .status.conditions.type are: (TODO) - // TODO: Identify different condition types/reasons that will be needed. + // Known .status.conditions.type are: Available, Degraded and Progressing. // +patchMergeKey=type // +patchStrategy=merge // +listType=map @@ -278,12 +277,19 @@ type ControlPlaneMachineSetStatus struct { // ReadyReplicas is the number of Control Plane Machines created by the // ControlPlaneMachineSet controller which are ready. + // Note that this value may be higher than the desired number of replicas + // while rolling updates are in-progress. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` // UpdatedReplicas is the number of non-terminated Control Plane Machines // created by the ControlPlaneMachineSet controller that have the desired - // provider spec. + // provider spec and are ready. + // This value is set to 0 when a change is detected to the desired spec. + // When the update strategy is RollingUpdate, this will also coincide + // with starting the process of updating the Machines. + // When the update strategy is OnDelete, this value will remain at 0 until + // a user deletes an existing replica and its replacement has become ready. // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` diff --git a/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go b/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go index 0f8ec7321..5781e614c 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go +++ b/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go @@ -6,7 +6,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // NutanixMachineProviderConfig is the Schema for the nutanixmachineproviderconfigs API @@ -30,11 +29,12 @@ type NutanixMachineProviderConfig struct { // +kubebuilder:validation:Required Image NutanixResourceIdentifier `json:"image"` - // subnet is to identify the cluster's network subnet to use for the Machine's VM - // The cluster identifier (uuid or name) can be obtained from the Prism Central console - // or using the prism_central API. + // subnets holds a list of identifiers (one or more) of the cluster's network subnets + // for the Machine's VM to connect to. The subnet identifiers (uuid or name) can be + // obtained from the Prism Central console or using the prism_central API. // +kubebuilder:validation:Required - Subnet NutanixResourceIdentifier `json:"subnet"` + // +kubebuilder:validation:MinItems=1 + Subnets []NutanixResourceIdentifier `json:"subnets"` // vcpusPerSocket is the number of vCPUs per socket of the VM // +kubebuilder:validation:Required diff --git a/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go b/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go new file mode 100644 index 000000000..7c0ffbe9b --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go @@ -0,0 +1,192 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// PowerVSResourceType enum attribute to identify the type of resource reference +type PowerVSResourceType string + +// PowerVSProcessorType enum attribute to identify the PowerVS instance processor type +type PowerVSProcessorType string + +const ( + // PowerVSResourceTypeID enum property to identify an ID type resource reference + PowerVSResourceTypeID PowerVSResourceType = "ID" + // PowerVSResourceTypeName enum property to identify a Name type resource reference + PowerVSResourceTypeName PowerVSResourceType = "Name" + // PowerVSResourceTypeRegEx enum property to identify a tags type resource reference + PowerVSResourceTypeRegEx PowerVSResourceType = "RegEx" + // PowerVSProcessorTypeDedicated enum property to identify a Dedicated Power VS processor type + PowerVSProcessorTypeDedicated PowerVSProcessorType = "Dedicated" + // PowerVSProcessorTypeShared enum property to identify a Shared Power VS processor type + PowerVSProcessorTypeShared PowerVSProcessorType = "Shared" + // PowerVSProcessorTypeCapped enum property to identify a Capped Power VS processor type + PowerVSProcessorTypeCapped PowerVSProcessorType = "Capped" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PowerVSMachineProviderConfig is the type that will be embedded in a Machine.Spec.ProviderSpec field +// for a PowerVS virtual machine. It is used by the PowerVS machine actuator to create a single Machine. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +// +k8s:openapi-gen=true +type PowerVSMachineProviderConfig struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + + // userDataSecret contains a local reference to a secret that contains the + // UserData to apply to the instance. + // +optional + UserDataSecret *PowerVSSecretReference `json:"userDataSecret,omitempty"` + + // credentialsSecret is a reference to the secret with IBM Cloud credentials. + // +optional + CredentialsSecret *PowerVSSecretReference `json:"credentialsSecret,omitempty"` + + // serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created. + // Power VS service is a container for all Power VS instances at a specific geographic region. + // serviceInstance can be created via IBM Cloud catalog or CLI. + // supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli. + // More detail about Power VS service instance. + // https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server + // +kubebuilder:validation:=Required + ServiceInstance PowerVSResource `json:"serviceInstance"` + + // image is to identify the rhcos image uploaded to IBM COS bucket which is used to create the instance. + // supported image identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli. + // +kubebuilder:validation:=Required + Image PowerVSResource `json:"image"` + + // network is the reference to the Network to use for this instance. + // supported network identifier in PowerVSResource are Name, ID and RegEx and that can be obtained from IBM Cloud UI or IBM Cloud cli. + // +kubebuilder:validation:=Required + Network PowerVSResource `json:"network"` + + // keyPairName is the name of the KeyPair to use for SSH. + // The key pair will be exposed to the instance via the instance metadata service. + // On boot, the OS will copy the public keypair into the authorized keys for the core user. + // +kubebuilder:validation:=Required + KeyPairName string `json:"keyPairName"` + + // systemType is the System type used to host the instance. + // systemType determines the number of cores and memory that is available. + // Few of the supported SystemTypes are s922,e880,e980. + // e880 systemType available only in Dallas Datacenters. + // e980 systemType available in Datacenters except Dallas and Washington. + // When omitted, this means that the user has no opinion and the platform is left to choose a + // reasonable default, which is subject to change over time. The current default is s922 which is generally available. + // + This is not an enum because we expect other values to be added later which should be supported implicitly. + // +optional + SystemType string `json:"systemType,omitempty"` + + // processorType is the VM instance processor type. + // It must be set to one of the following values: Dedicated, Capped or Shared. + // Dedicated: resources are allocated for a specific client, The hypervisor makes a 1:1 binding of a partition’s processor to a physical processor core. + // Shared: Shared among other clients. + // Capped: Shared, but resources do not expand beyond those that are requested, the amount of CPU time is Capped to the value specified for the entitlement. + // if the processorType is selected as Dedicated, then processors value cannot be fractional. + // When omitted, this means that the user has no opinion and the platform is left to choose a + // reasonable default, which is subject to change over time. The current default is Shared. + // +kubebuilder:validation:Enum:="Dedicated";"Shared";"Capped";"" + // +optional + ProcessorType PowerVSProcessorType `json:"processorType,omitempty"` + + // processors is the number of virtual processors in a virtual machine. + // when the processorType is selected as Dedicated the processors value cannot be fractional. + // maximum value for the Processors depends on the selected SystemType. + // when SystemType is set to e880 or e980 maximum Processors value is 143. + // when SystemType is set to s922 maximum Processors value is 15. + // minimum value for Processors depends on the selected ProcessorType. + // when ProcessorType is set as Shared or Capped, The minimum processors is 0.5. + // when ProcessorType is set as Dedicated, The minimum processors is 1. + // When omitted, this means that the user has no opinion and the platform is left to choose a + // reasonable default, which is subject to change over time. The default is set based on the selected ProcessorType. + // when ProcessorType selected as Dedicated, the default is set to 1. + // when ProcessorType selected as Shared or Capped, the default is set to 0.5. + // +optional + Processors intstr.IntOrString `json:"processors,omitempty"` + + // memoryGiB is the size of a virtual machine's memory, in GiB. + // maximum value for the MemoryGiB depends on the selected SystemType. + // when SystemType is set to e880 maximum MemoryGiB value is 7463 GiB. + // when SystemType is set to e980 maximum MemoryGiB value is 15307 GiB. + // when SystemType is set to s922 maximum MemoryGiB value is 942 GiB. + // The minimum memory is 32 GiB. + // When omitted, this means the user has no opinion and the platform is left to choose a reasonable + // default, which is subject to change over time. The current default is 32. + // +optional + MemoryGiB int32 `json:"memoryGiB,omitempty"` +} + +// PowerVSResource is a reference to a specific PowerVS resource by ID, Name or RegEx +// Only one of ID, Name or RegEx may be specified. Specifying more than one will result in +// a validation error. +// +union +type PowerVSResource struct { + // Type identifies the resource type for this entry. + // Valid values are ID, Name and RegEx + // +kubebuilder:validation:Enum:=ID;Name;RegEx + // +optional + Type PowerVSResourceType `json:"type,omitempty"` + // ID of resource + // +optional + ID *string `json:"id,omitempty"` + // Name of resource + // +optional + Name *string `json:"name,omitempty"` + // Regex to find resource + // Regex contains the pattern to match to find a resource + // +optional + RegEx *string `json:"regex,omitempty"` +} + +// PowerVSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. +// It contains PowerVS-specific status information. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type PowerVSMachineProviderStatus struct { + metav1.TypeMeta `json:",inline"` + + // conditions is a set of conditions associated with the Machine to indicate + // errors or other status + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + + // instanceId is the instance ID of the machine created in PowerVS + // instanceId uniquely identifies a Power VS server instance(VM) under a Power VS service. + // This will help in updating or deleting a VM in Power VS Cloud + // +optional + InstanceID *string `json:"instanceId,omitempty"` + + // serviceInstanceID is the reference to the Power VS ServiceInstance on which the machine instance will be created. + // serviceInstanceID uniquely identifies the Power VS service + // By setting serviceInstanceID it will become easy and efficient to fetch a server instance(VM) within Power VS Cloud. + // +optional + ServiceInstanceID *string `json:"serviceInstanceID,omitempty"` + + // instanceState is the state of the PowerVS instance for this machine + // Possible instance states are Active, Build, ShutOff, Reboot + // This is used to display additional information to user regarding instance current state + // +optional + InstanceState *string `json:"instanceState,omitempty"` +} + +// PowerVSSecretReference contains enough information to locate the +// referenced secret inside the same namespace. +// +structType=atomic +type PowerVSSecretReference struct { + // Name of the secret. + // +optional + Name string `json:"name,omitempty"` +} diff --git a/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go index 3f7384024..bba3d3b8e 100644 --- a/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go @@ -49,159 +49,6 @@ func (in *AWSFailureDomainPlacement) DeepCopy() *AWSFailureDomainPlacement { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSPartitionPlacement) DeepCopyInto(out *AWSPartitionPlacement) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPartitionPlacement. -func (in *AWSPartitionPlacement) DeepCopy() *AWSPartitionPlacement { - if in == nil { - return nil - } - out := new(AWSPartitionPlacement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSPlacementGroup) DeepCopyInto(out *AWSPlacementGroup) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroup. -func (in *AWSPlacementGroup) DeepCopy() *AWSPlacementGroup { - if in == nil { - return nil - } - out := new(AWSPlacementGroup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AWSPlacementGroup) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSPlacementGroupList) DeepCopyInto(out *AWSPlacementGroupList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AWSPlacementGroup, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroupList. -func (in *AWSPlacementGroupList) DeepCopy() *AWSPlacementGroupList { - if in == nil { - return nil - } - out := new(AWSPlacementGroupList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AWSPlacementGroupList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSPlacementGroupManagementSpec) DeepCopyInto(out *AWSPlacementGroupManagementSpec) { - *out = *in - if in.Managed != nil { - in, out := &in.Managed, &out.Managed - *out = new(ManagedAWSPlacementGroup) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroupManagementSpec. -func (in *AWSPlacementGroupManagementSpec) DeepCopy() *AWSPlacementGroupManagementSpec { - if in == nil { - return nil - } - out := new(AWSPlacementGroupManagementSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSPlacementGroupSpec) DeepCopyInto(out *AWSPlacementGroupSpec) { - *out = *in - in.ManagementSpec.DeepCopyInto(&out.ManagementSpec) - if in.CredentialsSecret != nil { - in, out := &in.CredentialsSecret, &out.CredentialsSecret - *out = new(LocalSecretReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroupSpec. -func (in *AWSPlacementGroupSpec) DeepCopy() *AWSPlacementGroupSpec { - if in == nil { - return nil - } - out := new(AWSPlacementGroupSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSPlacementGroupStatus) DeepCopyInto(out *AWSPlacementGroupStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ExpiresAt != nil { - in, out := &in.ExpiresAt, &out.ExpiresAt - *out = (*in).DeepCopy() - } - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - in.ObservedConfiguration.DeepCopyInto(&out.ObservedConfiguration) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroupStatus. -func (in *AWSPlacementGroupStatus) DeepCopy() *AWSPlacementGroupStatus { - if in == nil { - return nil - } - out := new(AWSPlacementGroupStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AWSResourceFilter) DeepCopyInto(out *AWSResourceFilter) { *out = *in @@ -721,43 +568,6 @@ func (in *GCPFailureDomain) DeepCopy() *GCPFailureDomain { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalSecretReference) DeepCopyInto(out *LocalSecretReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSecretReference. -func (in *LocalSecretReference) DeepCopy() *LocalSecretReference { - if in == nil { - return nil - } - out := new(LocalSecretReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedAWSPlacementGroup) DeepCopyInto(out *ManagedAWSPlacementGroup) { - *out = *in - if in.Partition != nil { - in, out := &in.Partition, &out.Partition - *out = new(AWSPartitionPlacement) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedAWSPlacementGroup. -func (in *ManagedAWSPlacementGroup) DeepCopy() *ManagedAWSPlacementGroup { - if in == nil { - return nil - } - out := new(ManagedAWSPlacementGroup) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NutanixMachineProviderConfig) DeepCopyInto(out *NutanixMachineProviderConfig) { *out = *in @@ -765,7 +575,13 @@ func (in *NutanixMachineProviderConfig) DeepCopyInto(out *NutanixMachineProvider in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Cluster.DeepCopyInto(&out.Cluster) in.Image.DeepCopyInto(&out.Image) - in.Subnet.DeepCopyInto(&out.Subnet) + if in.Subnets != nil { + in, out := &in.Subnets, &out.Subnets + *out = make([]NutanixResourceIdentifier, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } out.MemorySize = in.MemorySize.DeepCopy() out.SystemDiskSize = in.SystemDiskSize.DeepCopy() if in.UserDataSecret != nil { @@ -897,6 +713,140 @@ func (in *OpenStackFailureDomain) DeepCopy() *OpenStackFailureDomain { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSMachineProviderConfig) DeepCopyInto(out *PowerVSMachineProviderConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.UserDataSecret != nil { + in, out := &in.UserDataSecret, &out.UserDataSecret + *out = new(PowerVSSecretReference) + **out = **in + } + if in.CredentialsSecret != nil { + in, out := &in.CredentialsSecret, &out.CredentialsSecret + *out = new(PowerVSSecretReference) + **out = **in + } + in.ServiceInstance.DeepCopyInto(&out.ServiceInstance) + in.Image.DeepCopyInto(&out.Image) + in.Network.DeepCopyInto(&out.Network) + out.Processors = in.Processors + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderConfig. +func (in *PowerVSMachineProviderConfig) DeepCopy() *PowerVSMachineProviderConfig { + if in == nil { + return nil + } + out := new(PowerVSMachineProviderConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PowerVSMachineProviderConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSMachineProviderStatus) DeepCopyInto(out *PowerVSMachineProviderStatus) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.ServiceInstanceID != nil { + in, out := &in.ServiceInstanceID, &out.ServiceInstanceID + *out = new(string) + **out = **in + } + if in.InstanceState != nil { + in, out := &in.InstanceState, &out.InstanceState + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderStatus. +func (in *PowerVSMachineProviderStatus) DeepCopy() *PowerVSMachineProviderStatus { + if in == nil { + return nil + } + out := new(PowerVSMachineProviderStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PowerVSMachineProviderStatus) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSResource) DeepCopyInto(out *PowerVSResource) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.RegEx != nil { + in, out := &in.RegEx, &out.RegEx + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSResource. +func (in *PowerVSResource) DeepCopy() *PowerVSResource { + if in == nil { + return nil + } + out := new(PowerVSResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PowerVSSecretReference) DeepCopyInto(out *PowerVSSecretReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSSecretReference. +func (in *PowerVSSecretReference) DeepCopy() *PowerVSSecretReference { + if in == nil { + return nil + } + out := new(PowerVSSecretReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SystemDiskProperties) DeepCopyInto(out *SystemDiskProperties) { *out = *in diff --git a/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go index b20712b7f..22cb83983 100644 --- a/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go @@ -11,15 +11,6 @@ package v1 // Those methods can be generated by using hack/update-swagger-docs.sh // AUTO-GENERATED FUNCTIONS START HERE -var map_LocalSecretReference = map[string]string{ - "": "LocalSecretReference contains enough information to let you locate the referenced Secret inside the same namespace.", - "name": "Name of the Secret.", -} - -func (LocalSecretReference) SwaggerDoc() map[string]string { - return map_LocalSecretReference -} - var map_AlibabaCloudMachineProviderConfig = map[string]string{ "": "AlibabaCloudMachineProviderConfig is the Schema for the alibabacloudmachineproviderconfig API Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "instanceType": "The instance type of the instance.", @@ -136,85 +127,19 @@ func (AWSResourceFilter) SwaggerDoc() map[string]string { var map_AWSResourceReference = map[string]string{ "": "AWSResourceReference is a reference to a specific AWS resource by ID, ARN, or filters. Only one of ID, ARN or Filters may be specified. Specifying more than one will result in a validation error.", "type": "Type determines how the reference will fetch the AWS resource.", - "id": "ID of resource", - "arn": "ARN of resource", - "filters": "Filters is a set of filters used to identify a resource", + "id": "ID of resource.", + "arn": "ARN of resource.", + "filters": "Filters is a set of filters used to identify a resource.", } func (AWSResourceReference) SwaggerDoc() map[string]string { return map_AWSResourceReference } -var map_AWSPartitionPlacement = map[string]string{ - "": "AWSPartitionPlacement defines the configuration for partition placement groups.", - "count": "Count specifies the number of partitions for a Partition placement group. This value is only observed when creating a placement group and only when the `groupType` is set to `Partition`. Note the partition count of a placement group cannot be changed after creation. If unset, AWS will provide a default partition count. This default is currently 2. Note: When using more than 2 partitions, the \"dedicated\" tenancy option on Machines created within the group is unavailable.", -} - -func (AWSPartitionPlacement) SwaggerDoc() map[string]string { - return map_AWSPartitionPlacement -} - -var map_AWSPlacementGroup = map[string]string{ - "": "AWSPlacementGroup ensures that a placement group matching the given configuration exists within AWS Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", -} - -func (AWSPlacementGroup) SwaggerDoc() map[string]string { - return map_AWSPlacementGroup -} - -var map_AWSPlacementGroupList = map[string]string{ - "": "AWSPlacementGroupList contains a list of AWSPlacementGroup Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", -} - -func (AWSPlacementGroupList) SwaggerDoc() map[string]string { - return map_AWSPlacementGroupList -} - -var map_AWSPlacementGroupManagementSpec = map[string]string{ - "": "AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group.", - "managementState": "ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed.", - "managed": "Managed defines the configuration for the placement groups to be created. Updates to the configuration will not be observed as placement groups are immutable after creation.", -} - -func (AWSPlacementGroupManagementSpec) SwaggerDoc() map[string]string { - return map_AWSPlacementGroupManagementSpec -} - -var map_AWSPlacementGroupSpec = map[string]string{ - "managementSpec": "AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group.", - "credentialsSecret": "CredentialsSecret is a reference to the secret with AWS credentials. The secret must reside in the same namespace as the AWSPlacementGroup resource. Otherwise, the controller will leverage the EC2 instance assigned IAM Role, in OpenShift this will always be the Control Plane Machine IAM Role.", -} - -func (AWSPlacementGroupSpec) SwaggerDoc() map[string]string { - return map_AWSPlacementGroupSpec -} - -var map_AWSPlacementGroupStatus = map[string]string{ - "conditions": "Conditions represents the observations of the AWSPlacementGroup's current state. Known .status.conditions.type are: Ready, Deleting", - "expiresAt": "ExpiresAt identifies when the observed configuration is valid until. The observed configuration should not be trusted if this time has passed. The AWSPlacementGroup controller will attempt to update the status before it expires.", - "replicas": "Replicas counts how many AWS EC2 instances are present within the placement group. Note: This is a pointer to be able to distinguish between an empty placement group and the status having not yet been observed.", - "managementState": "ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed. This value is owned by the controller and may differ from the spec in cases when a user attempts to manage a previously unmanaged placement group.", - "observedConfiguration": "ObservedConfiguration represents the configuration present on the placement group on AWS.", -} - -func (AWSPlacementGroupStatus) SwaggerDoc() map[string]string { - return map_AWSPlacementGroupStatus -} - -var map_ManagedAWSPlacementGroup = map[string]string{ - "": "ManagedAWSPlacementGroup is a discriminated union of placement group configuration.", - "groupType": "GroupType specifies the type of AWS placement group to use for this Machine. This parameter is only used when a Machine is being created and the named placement group does not exist. Valid values are \"Cluster\", \"Partition\", \"Spread\". This value is required and, in case a placement group already exists, will be validated against the existing placement group. Note: If the value of this field is \"Spread\", Machines created within the group may no have placement.tenancy set to \"dedicated\".", - "partition": "Partition defines the configuration of a partition placement group.", -} - -func (ManagedAWSPlacementGroup) SwaggerDoc() map[string]string { - return map_ManagedAWSPlacementGroup -} - var map_AWSFailureDomain = map[string]string{ - "": "AWSFailureDomain configures failure domain information for the AWS platform", - "subnet": "Subnet is a reference to the subnet to use for this instance", - "placement": "Placement configures the placement information for this instance", + "": "AWSFailureDomain configures failure domain information for the AWS platform.", + "subnet": "Subnet is a reference to the subnet to use for this instance.", + "placement": "Placement configures the placement information for this instance.", } func (AWSFailureDomain) SwaggerDoc() map[string]string { @@ -222,8 +147,8 @@ func (AWSFailureDomain) SwaggerDoc() map[string]string { } var map_AWSFailureDomainPlacement = map[string]string{ - "": "AWSFailureDomainPlacement configures the placement information for the AWSFailureDomain", - "availabilityZone": "AvailabilityZone is the availability zone of the instance", + "": "AWSFailureDomainPlacement configures the placement information for the AWSFailureDomain.", + "availabilityZone": "AvailabilityZone is the availability zone of the instance.", } func (AWSFailureDomainPlacement) SwaggerDoc() map[string]string { @@ -231,8 +156,8 @@ func (AWSFailureDomainPlacement) SwaggerDoc() map[string]string { } var map_AzureFailureDomain = map[string]string{ - "": "AzureFailureDomain configures failure domain information for the Azure platform", - "zone": "Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone", + "": "AzureFailureDomain configures failure domain information for the Azure platform.", + "zone": "Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone.", } func (AzureFailureDomain) SwaggerDoc() map[string]string { @@ -269,11 +194,11 @@ func (ControlPlaneMachineSetSpec) SwaggerDoc() map[string]string { var map_ControlPlaneMachineSetStatus = map[string]string{ "": "ControlPlaneMachineSetStatus represents the status of the ControlPlaneMachineSet CRD.", - "conditions": "Conditions represents the observations of the ControlPlaneMachineSet's current state. Known .status.conditions.type are: (TODO)", + "conditions": "Conditions represents the observations of the ControlPlaneMachineSet's current state. Known .status.conditions.type are: Available, Degraded and Progressing.", "observedGeneration": "ObservedGeneration is the most recent generation observed for this ControlPlaneMachineSet. It corresponds to the ControlPlaneMachineSets's generation, which is updated on mutation by the API Server.", "replicas": "Replicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller. Note that during update operations this value may differ from the desired replica count.", - "readyReplicas": "ReadyReplicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller which are ready.", - "updatedReplicas": "UpdatedReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec.", + "readyReplicas": "ReadyReplicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller which are ready. Note that this value may be higher than the desired number of replicas while rolling updates are in-progress.", + "updatedReplicas": "UpdatedReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec and are ready. This value is set to 0 when a change is detected to the desired spec. When the update strategy is RollingUpdate, this will also coincide with starting the process of updating the Machines. When the update strategy is OnDelete, this value will remain at 0 until a user deletes an existing replica and its replacement has become ready.", "unavailableReplicas": "UnavailableReplicas is the number of Control Plane Machines that are still required before the ControlPlaneMachineSet reaches the desired available capacity. When this value is non-zero, the number of ReadyReplicas is less than the desired Replicas.", } @@ -312,11 +237,11 @@ func (ControlPlaneMachineSetTemplateObjectMeta) SwaggerDoc() map[string]string { var map_FailureDomains = map[string]string{ "": "FailureDomain represents the different configurations required to spread Machines across failure domains on different platforms.", - "platform": "Platform identifies the platform for which the FailureDomain represents", - "aws": "AWS configures failure domain information for the AWS platform", - "azure": "Azure configures failure domain information for the Azure platform", - "gcp": "GCP configures failure domain information for the GCP platform", - "openstack": "OpenStack configures failure domain information for the OpenStack platform", + "platform": "Platform identifies the platform for which the FailureDomain represents. Currently supported values are AWS, Azure, GCP and OpenStack.", + "aws": "AWS configures failure domain information for the AWS platform.", + "azure": "Azure configures failure domain information for the Azure platform.", + "gcp": "GCP configures failure domain information for the GCP platform.", + "openstack": "OpenStack configures failure domain information for the OpenStack platform.", } func (FailureDomains) SwaggerDoc() map[string]string { @@ -334,7 +259,7 @@ func (GCPFailureDomain) SwaggerDoc() map[string]string { var map_OpenShiftMachineV1Beta1MachineTemplate = map[string]string{ "": "OpenShiftMachineV1Beta1MachineTemplate is a template for the ControlPlaneMachineSet to create Machines from the v1beta1.machine.openshift.io API group.", - "failureDomains": "FailureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information, eg OpenStack.", + "failureDomains": "FailureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information.", "metadata": "ObjectMeta is the standard object metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Labels are required to match the ControlPlaneMachineSet selector.", "spec": "Spec contains the desired configuration of the Control Plane Machines. The ProviderSpec within contains platform specific details for creating the Control Plane Machines. The ProviderSe should be complete apart from the platform specific failure domain field. This will be overriden when the Machines are created based on the FailureDomains field.", } @@ -356,7 +281,7 @@ var map_NutanixMachineProviderConfig = map[string]string{ "": "NutanixMachineProviderConfig is the Schema for the nutanixmachineproviderconfigs API Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "cluster": "cluster is to identify the cluster (the Prism Element under management of the Prism Central), in which the Machine's VM will be created. The cluster identifier (uuid or name) can be obtained from the Prism Central console or using the prism_central API.", "image": "image is to identify the rhcos image uploaded to the Prism Central (PC) The image identifier (uuid or name) can be obtained from the Prism Central console or using the prism_central API.", - "subnet": "subnet is to identify the cluster's network subnet to use for the Machine's VM The cluster identifier (uuid or name) can be obtained from the Prism Central console or using the prism_central API.", + "subnets": "subnets holds a list of identifiers (one or more) of the cluster's network subnets for the Machine's VM to connect to. The subnet identifiers (uuid or name) can be obtained from the Prism Central console or using the prism_central API.", "vcpusPerSocket": "vcpusPerSocket is the number of vCPUs per socket of the VM", "vcpuSockets": "vcpuSockets is the number of vCPU sockets of the VM", "memorySize": "memorySize is the memory size (in Quantity format) of the VM The minimum memorySize is 2Gi bytes", @@ -390,4 +315,55 @@ func (NutanixResourceIdentifier) SwaggerDoc() map[string]string { return map_NutanixResourceIdentifier } +var map_PowerVSMachineProviderConfig = map[string]string{ + "": "PowerVSMachineProviderConfig is the type that will be embedded in a Machine.Spec.ProviderSpec field for a PowerVS virtual machine. It is used by the PowerVS machine actuator to create a single Machine.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "userDataSecret": "userDataSecret contains a local reference to a secret that contains the UserData to apply to the instance.", + "credentialsSecret": "credentialsSecret is a reference to the secret with IBM Cloud credentials.", + "serviceInstance": "serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created. Power VS service is a container for all Power VS instances at a specific geographic region. serviceInstance can be created via IBM Cloud catalog or CLI. supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli. More detail about Power VS service instance. https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server", + "image": "image is to identify the rhcos image uploaded to IBM COS bucket which is used to create the instance. supported image identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli.", + "network": "network is the reference to the Network to use for this instance. supported network identifier in PowerVSResource are Name, ID and RegEx and that can be obtained from IBM Cloud UI or IBM Cloud cli.", + "keyPairName": "keyPairName is the name of the KeyPair to use for SSH. The key pair will be exposed to the instance via the instance metadata service. On boot, the OS will copy the public keypair into the authorized keys for the core user.", + "systemType": "systemType is the System type used to host the instance. systemType determines the number of cores and memory that is available. Few of the supported SystemTypes are s922,e880,e980. e880 systemType available only in Dallas Datacenters. e980 systemType available in Datacenters except Dallas and Washington. When omitted, this means that the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is s922 which is generally available.", + "processorType": "processorType is the VM instance processor type. It must be set to one of the following values: Dedicated, Capped or Shared. Dedicated: resources are allocated for a specific client, The hypervisor makes a 1:1 binding of a partition’s processor to a physical processor core. Shared: Shared among other clients. Capped: Shared, but resources do not expand beyond those that are requested, the amount of CPU time is Capped to the value specified for the entitlement. if the processorType is selected as Dedicated, then processors value cannot be fractional. When omitted, this means that the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is Shared.", + "processors": "processors is the number of virtual processors in a virtual machine. when the processorType is selected as Dedicated the processors value cannot be fractional. maximum value for the Processors depends on the selected SystemType. when SystemType is set to e880 or e980 maximum Processors value is 143. when SystemType is set to s922 maximum Processors value is 15. minimum value for Processors depends on the selected ProcessorType. when ProcessorType is set as Shared or Capped, The minimum processors is 0.5. when ProcessorType is set as Dedicated, The minimum processors is 1. When omitted, this means that the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default is set based on the selected ProcessorType. when ProcessorType selected as Dedicated, the default is set to 1. when ProcessorType selected as Shared or Capped, the default is set to 0.5.", + "memoryGiB": "memoryGiB is the size of a virtual machine's memory, in GiB. maximum value for the MemoryGiB depends on the selected SystemType. when SystemType is set to e880 maximum MemoryGiB value is 7463 GiB. when SystemType is set to e980 maximum MemoryGiB value is 15307 GiB. when SystemType is set to s922 maximum MemoryGiB value is 942 GiB. The minimum memory is 32 GiB. When omitted, this means the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is 32.", +} + +func (PowerVSMachineProviderConfig) SwaggerDoc() map[string]string { + return map_PowerVSMachineProviderConfig +} + +var map_PowerVSMachineProviderStatus = map[string]string{ + "": "PowerVSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains PowerVS-specific status information.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", + "instanceId": "instanceId is the instance ID of the machine created in PowerVS instanceId uniquely identifies a Power VS server instance(VM) under a Power VS service. This will help in updating or deleting a VM in Power VS Cloud", + "serviceInstanceID": "serviceInstanceID is the reference to the Power VS ServiceInstance on which the machine instance will be created. serviceInstanceID uniquely identifies the Power VS service By setting serviceInstanceID it will become easy and efficient to fetch a server instance(VM) within Power VS Cloud.", + "instanceState": "instanceState is the state of the PowerVS instance for this machine Possible instance states are Active, Build, ShutOff, Reboot This is used to display additional information to user regarding instance current state", +} + +func (PowerVSMachineProviderStatus) SwaggerDoc() map[string]string { + return map_PowerVSMachineProviderStatus +} + +var map_PowerVSResource = map[string]string{ + "": "PowerVSResource is a reference to a specific PowerVS resource by ID, Name or RegEx Only one of ID, Name or RegEx may be specified. Specifying more than one will result in a validation error.", + "type": "Type identifies the resource type for this entry. Valid values are ID, Name and RegEx", + "id": "ID of resource", + "name": "Name of resource", + "regex": "Regex to find resource Regex contains the pattern to match to find a resource", +} + +func (PowerVSResource) SwaggerDoc() map[string]string { + return map_PowerVSResource +} + +var map_PowerVSSecretReference = map[string]string{ + "": "PowerVSSecretReference contains enough information to locate the referenced secret inside the same namespace.", + "name": "Name of the secret.", +} + +func (PowerVSSecretReference) SwaggerDoc() map[string]string { + return map_PowerVSSecretReference +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/machine/v1beta1/0000_10_machine.crd.yaml b/vendor/github.com/openshift/api/machine/v1beta1/0000_10_machine.crd.yaml index 0b5cab53a..180831bb4 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/0000_10_machine.crd.yaml +++ b/vendor/github.com/openshift/api/machine/v1beta1/0000_10_machine.crd.yaml @@ -161,7 +161,7 @@ spec: description: API version of the referent. type: string blockOwnerDeletion: - description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. + description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. type: boolean controller: description: If true, this reference points to the managing controller. diff --git a/vendor/github.com/openshift/api/machine/v1beta1/0000_10_machineset.crd.yaml b/vendor/github.com/openshift/api/machine/v1beta1/0000_10_machineset.crd.yaml index de27d2323..8a7b1b628 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/0000_10_machineset.crd.yaml +++ b/vendor/github.com/openshift/api/machine/v1beta1/0000_10_machineset.crd.yaml @@ -145,7 +145,7 @@ spec: description: API version of the referent. type: string blockOwnerDeletion: - description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. + description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. type: boolean controller: description: If true, this reference points to the managing controller. @@ -254,7 +254,7 @@ spec: description: API version of the referent. type: string blockOwnerDeletion: - description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. + description: If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. type: boolean controller: description: If true, this reference points to the managing controller. diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go index 75c81f37f..e2eec1a6a 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go @@ -74,6 +74,11 @@ type AWSMachineProviderConfig struct { // SpotMarketOptions allows users to configure instances to be run using AWS Spot instances. // +optional SpotMarketOptions *SpotMarketOptions `json:"spotMarketOptions,omitempty"` + // MetadataServiceOptions allows users to configure instance metadata service interaction options. + // If nothing specified, default AWS IMDS settings will be applied. + // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html + // +optional + MetadataServiceOptions MetadataServiceOptions `json:"metadataServiceOptions,omitempty"` } // BlockDeviceMappingSpec describes a block device mapping @@ -160,6 +165,30 @@ type SpotMarketOptions struct { MaxPrice *string `json:"maxPrice,omitempty"` } +type MetadataServiceAuthentication string + +const ( + // MetadataServiceAuthenticationRequired enforces sending of a signed token header with any instance metadata retrieval (GET) requests. + // Enforces IMDSv2 usage. + MetadataServiceAuthenticationRequired = "Required" + // MetadataServiceAuthenticationOptional allows IMDSv1 usage along with IMDSv2 + MetadataServiceAuthenticationOptional = "Optional" +) + +// MetadataServiceOptions defines the options available to a user when configuring +// Instance Metadata Service (IMDS) Options. +type MetadataServiceOptions struct { + // Authentication determines whether or not the host requires the use of authentication when interacting with the metadata service. + // When using authentication, this enforces v2 interaction method (IMDSv2) with the metadata service. + // When omitted, this means the user has no opinion and the value is left to the platform to choose a good + // default, which is subject to change over time. The current default is optional. + // At this point this field represents `HttpTokens` parameter from `InstanceMetadataOptionsRequest` structure in AWS EC2 API + // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html + // +kubebuilder:validation:Enum=Required;Optional + // +optional + Authentication MetadataServiceAuthentication `json:"authentication,omitempty"` +} + // AWSResourceReference is a reference to a specific AWS resource by ID, ARN, or filters. // Only one of ID, ARN or Filters may be specified. Specifying more than one will result in // a validation error. @@ -187,29 +216,6 @@ type Placement struct { // supported 3 options: default, dedicated and host. // +optional Tenancy InstanceTenancy `json:"tenancy,omitempty"` - // Group specifies a reference to an AWSPlacementGroup resource to create the Machine within. - // If the group specified does not exist, the Machine will not be created and will enter the failed phase. - // +optional - Group LocalAWSPlacementGroupReference `json:"group,omitempty"` - // PartitionNumber specifies the numbered partition in which instances should be launched. - // It is recommended to only use this value if multiple MachineSets share - // a single Placement Group, in which case, each MachineSet should represent an individual partition number. - // If unset, when a Partition placement group is used, AWS will attempt to - // distribute instances evenly between partitions. - // If PartitionNumber is set when used with a non Partition type Placement Group, this will be considered an error. - // +kubebuilder:validation:Minimum:=1 - // +kubebuilder:validation:Maximum:=7 - // +optional - PartitionNumber int32 `json:"partitionNumber,omitempty"` -} - -// LocalAWSPlacementGroupReference contains enough information to let you locate the -// referenced AWSPlacementGroup inside the same namespace. -// +structType=atomic -type LocalAWSPlacementGroupReference struct { - // Name of the AWSPlacementGroup. - // +kubebuilder:validation:=Required - Name string `json:"name"` } // Filter is a filter used to identify an AWS resource diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go index 914e73478..547da1af7 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go @@ -117,6 +117,12 @@ type AzureMachineProviderSpec struct { // Availability set should be precreated, before using this field. // +optional AvailabilitySet string `json:"availabilitySet,omitempty"` + // Diagnostics configures the diagnostics settings for the virtual machine. + // This allows you to configure boot diagnostics such as capturing serial output from + // the virtual machine on boot. + // This is useful for debugging software based launch issues. + // +optional + Diagnostics AzureDiagnostics `json:"diagnostics,omitempty"` } // SpotVMOptions defines the options relevant to running the Machine on Spot VMs @@ -126,6 +132,62 @@ type SpotVMOptions struct { MaxPrice *resource.Quantity `json:"maxPrice,omitempty"` } +// AzureDiagnostics is used to configure the diagnostic settings of the virtual machine. +type AzureDiagnostics struct { + // AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. + // This allows you to configure capturing serial output from the virtual machine on boot. + // This is useful for debugging software based launch issues. + // + This is a pointer so that we can validate required fields only when the structure is + // + configured by the user. + // +optional + Boot *AzureBootDiagnostics `json:"boot,omitempty"` +} + +// AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. +// This allows you to configure capturing serial output from the virtual machine on boot. +// This is useful for debugging software based launch issues. +// +union +type AzureBootDiagnostics struct { + // StorageAccountType determines if the storage account for storing the diagnostics data + // should be provisioned by Azure (AzureManaged) or by the customer (CustomerManaged). + // +kubebuilder:validation:Required + // +unionDiscriminator + StorageAccountType AzureBootDiagnosticsStorageAccountType `json:"storageAccountType"` + + // CustomerManaged provides reference to the customer manager storage account. + // +optional + CustomerManaged *AzureCustomerManagedBootDiagnostics `json:"customerManaged,omitempty"` +} + +// AzureCustomerManagedBootDiagnostics provides reference to a customer managed +// storage account. +type AzureCustomerManagedBootDiagnostics struct { + // StorageAccountURI is the URI of the customer managed storage account. + // The URI typically will be `https://.blob.core.windows.net/` + // but may differ if you are using Azure DNS zone endpoints. + // You can find the correct endpoint by looking for the Blob Primary Endpoint in the + // endpoints tab in the Azure console. + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^https://` + // +kubebuilder:validation:MaxLength=1024 + StorageAccountURI string `json:"storageAccountURI"` +} + +// AzureBootDiagnosticsStorageAccountType defines the list of valid storage account types +// for the boot diagnostics. +// +kubebuilder:validation:Enum:="AzureManaged";"CustomerManaged" +type AzureBootDiagnosticsStorageAccountType string + +const ( + // AzureManagedAzureDiagnosticsStorage is used to determine that the diagnostics storage account + // should be provisioned by Azure. + AzureManagedAzureDiagnosticsStorage AzureBootDiagnosticsStorageAccountType = "AzureManaged" + + // CustomerManagedAzureDiagnosticsStorage is used to determine that the diagnostics storage account + // should be provisioned by the Customer. + CustomerManagedAzureDiagnosticsStorage AzureBootDiagnosticsStorageAccountType = "CustomerManaged" +) + // AzureMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. // It contains Azure-specific status information. // Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go index 2cf75675d..c1ba1af01 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go @@ -48,6 +48,7 @@ type VSphereMachineProviderSpec struct { // DiskGiB is the size of a virtual machine's disk, in GiB. // Defaults to the analogue property value in the template from which this // machine is cloned. + // This parameter will be ignored if 'LinkedClone' CloneMode is set. // +optional DiskGiB int32 `json:"diskGiB,omitempty"` // Snapshot is the name of the snapshot from which the VM was cloned @@ -59,8 +60,8 @@ type VSphereMachineProviderSpec struct { // to FullClone. // When LinkedClone mode is enabled the DiskGiB field is ignored as it is // not possible to expand disks of linked clones. - // Defaults to LinkedClone, but fails gracefully to FullClone if the source - // of the clone operation has no snapshots. + // Defaults to FullClone. + // When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone. // +optional CloneMode CloneMode `json:"cloneMode,omitempty"` } diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go index f9f13cebb..6ca7a45ca 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go @@ -74,6 +74,7 @@ func (in *AWSMachineProviderConfig) DeepCopyInto(out *AWSMachineProviderConfig) *out = new(SpotMarketOptions) (*in).DeepCopyInto(*out) } + out.MetadataServiceOptions = in.MetadataServiceOptions return } @@ -187,6 +188,64 @@ func (in *AWSResourceReference) DeepCopy() *AWSResourceReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureBootDiagnostics) DeepCopyInto(out *AzureBootDiagnostics) { + *out = *in + if in.CustomerManaged != nil { + in, out := &in.CustomerManaged, &out.CustomerManaged + *out = new(AzureCustomerManagedBootDiagnostics) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureBootDiagnostics. +func (in *AzureBootDiagnostics) DeepCopy() *AzureBootDiagnostics { + if in == nil { + return nil + } + out := new(AzureBootDiagnostics) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureCustomerManagedBootDiagnostics) DeepCopyInto(out *AzureCustomerManagedBootDiagnostics) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureCustomerManagedBootDiagnostics. +func (in *AzureCustomerManagedBootDiagnostics) DeepCopy() *AzureCustomerManagedBootDiagnostics { + if in == nil { + return nil + } + out := new(AzureCustomerManagedBootDiagnostics) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AzureDiagnostics) DeepCopyInto(out *AzureDiagnostics) { + *out = *in + if in.Boot != nil { + in, out := &in.Boot, &out.Boot + *out = new(AzureBootDiagnostics) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureDiagnostics. +func (in *AzureDiagnostics) DeepCopy() *AzureDiagnostics { + if in == nil { + return nil + } + out := new(AzureDiagnostics) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzureMachineProviderSpec) DeepCopyInto(out *AzureMachineProviderSpec) { *out = *in @@ -243,6 +302,7 @@ func (in *AzureMachineProviderSpec) DeepCopyInto(out *AzureMachineProviderSpec) *out = new(SecurityProfile) (*in).DeepCopyInto(*out) } + in.Diagnostics.DeepCopyInto(&out.Diagnostics) return } @@ -888,22 +948,6 @@ func (in *LoadBalancerReference) DeepCopy() *LoadBalancerReference { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LocalAWSPlacementGroupReference) DeepCopyInto(out *LocalAWSPlacementGroupReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalAWSPlacementGroupReference. -func (in *LocalAWSPlacementGroupReference) DeepCopy() *LocalAWSPlacementGroupReference { - if in == nil { - return nil - } - out := new(LocalAWSPlacementGroupReference) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Machine) DeepCopyInto(out *Machine) { *out = *in @@ -1317,6 +1361,22 @@ func (in *MachineTemplateSpec) DeepCopy() *MachineTemplateSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MetadataServiceOptions) DeepCopyInto(out *MetadataServiceOptions) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataServiceOptions. +func (in *MetadataServiceOptions) DeepCopy() *MetadataServiceOptions { + if in == nil { + return nil + } + out := new(MetadataServiceOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NetworkDeviceSpec) DeepCopyInto(out *NetworkDeviceSpec) { *out = *in @@ -1433,7 +1493,6 @@ func (in *ObjectMeta) DeepCopy() *ObjectMeta { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Placement) DeepCopyInto(out *Placement) { *out = *in - out.Group = in.Group return } diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go index 5016a6999..4a0688319 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go @@ -12,23 +12,24 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE var map_AWSMachineProviderConfig = map[string]string{ - "": "AWSMachineProviderConfig is the Schema for the awsmachineproviderconfigs API Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "ami": "AMI is the reference to the AMI from which to create the machine instance.", - "instanceType": "InstanceType is the type of instance to create. Example: m4.xlarge", - "tags": "Tags is the set of tags to add to apply to an instance, in addition to the ones added by default by the actuator. These tags are additive. The actuator will ensure these tags are present, but will not remove any other tags that may exist on the instance.", - "iamInstanceProfile": "IAMInstanceProfile is a reference to an IAM role to assign to the instance", - "userDataSecret": "UserDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", - "credentialsSecret": "CredentialsSecret is a reference to the secret with AWS credentials. Otherwise, defaults to permissions provided by attached IAM role where the actuator is running.", - "keyName": "KeyName is the name of the KeyPair to use for SSH", - "deviceIndex": "DeviceIndex is the index of the device on the instance for the network interface attachment. Defaults to 0.", - "publicIp": "PublicIP specifies whether the instance should get a public IP. If not present, it should use the default of its subnet.", - "networkInterfaceType": "NetworkInterfaceType specifies the type of network interface to be used for the primary network interface. Valid values are \"ENA\", \"EFA\", and omitted, which means no opinion and the platform chooses a good default which may change over time. The current default value is \"ENA\". Please visit https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html to learn more about the AWS Elastic Fabric Adapter interface option.", - "securityGroups": "SecurityGroups is an array of references to security groups that should be applied to the instance.", - "subnet": "Subnet is a reference to the subnet to use for this instance", - "placement": "Placement specifies where to create the instance in AWS", - "loadBalancers": "LoadBalancers is the set of load balancers to which the new instance should be added once it is created.", - "blockDevices": "BlockDevices is the set of block device mapping associated to this instance, block device without a name will be used as a root device and only one device without a name is allowed https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html", - "spotMarketOptions": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "": "AWSMachineProviderConfig is the Schema for the awsmachineproviderconfigs API Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", + "ami": "AMI is the reference to the AMI from which to create the machine instance.", + "instanceType": "InstanceType is the type of instance to create. Example: m4.xlarge", + "tags": "Tags is the set of tags to add to apply to an instance, in addition to the ones added by default by the actuator. These tags are additive. The actuator will ensure these tags are present, but will not remove any other tags that may exist on the instance.", + "iamInstanceProfile": "IAMInstanceProfile is a reference to an IAM role to assign to the instance", + "userDataSecret": "UserDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", + "credentialsSecret": "CredentialsSecret is a reference to the secret with AWS credentials. Otherwise, defaults to permissions provided by attached IAM role where the actuator is running.", + "keyName": "KeyName is the name of the KeyPair to use for SSH", + "deviceIndex": "DeviceIndex is the index of the device on the instance for the network interface attachment. Defaults to 0.", + "publicIp": "PublicIP specifies whether the instance should get a public IP. If not present, it should use the default of its subnet.", + "networkInterfaceType": "NetworkInterfaceType specifies the type of network interface to be used for the primary network interface. Valid values are \"ENA\", \"EFA\", and omitted, which means no opinion and the platform chooses a good default which may change over time. The current default value is \"ENA\". Please visit https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html to learn more about the AWS Elastic Fabric Adapter interface option.", + "securityGroups": "SecurityGroups is an array of references to security groups that should be applied to the instance.", + "subnet": "Subnet is a reference to the subnet to use for this instance", + "placement": "Placement specifies where to create the instance in AWS", + "loadBalancers": "LoadBalancers is the set of load balancers to which the new instance should be added once it is created.", + "blockDevices": "BlockDevices is the set of block device mapping associated to this instance, block device without a name will be used as a root device and only one device without a name is allowed https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html", + "spotMarketOptions": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "metadataServiceOptions": "MetadataServiceOptions allows users to configure instance metadata service interaction options. If nothing specified, default AWS IMDS settings will be applied. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html", } func (AWSMachineProviderConfig) SwaggerDoc() map[string]string { @@ -109,13 +110,13 @@ func (LoadBalancerReference) SwaggerDoc() map[string]string { return map_LoadBalancerReference } -var map_LocalAWSPlacementGroupReference = map[string]string{ - "": "LocalAWSPlacementGroupReference contains enough information to let you locate the referenced AWSPlacementGroup inside the same namespace.", - "name": "Name of the AWSPlacementGroup.", +var map_MetadataServiceOptions = map[string]string{ + "": "MetadataServiceOptions defines the options available to a user when configuring Instance Metadata Service (IMDS) Options.", + "authentication": "Authentication determines whether or not the host requires the use of authentication when interacting with the metadata service. When using authentication, this enforces v2 interaction method (IMDSv2) with the metadata service. When omitted, this means the user has no opinion and the value is left to the platform to choose a good default, which is subject to change over time. The current default is optional. At this point this field represents `HttpTokens` parameter from `InstanceMetadataOptionsRequest` structure in AWS EC2 API https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html", } -func (LocalAWSPlacementGroupReference) SwaggerDoc() map[string]string { - return map_LocalAWSPlacementGroupReference +func (MetadataServiceOptions) SwaggerDoc() map[string]string { + return map_MetadataServiceOptions } var map_Placement = map[string]string{ @@ -123,8 +124,6 @@ var map_Placement = map[string]string{ "region": "Region is the region to use to create the instance", "availabilityZone": "AvailabilityZone is the availability zone of the instance", "tenancy": "Tenancy indicates if instance should run on shared or single-tenant hardware. There are supported 3 options: default, dedicated and host.", - "group": "Group specifies a reference to an AWSPlacementGroup resource to create the Machine within. If the group specified does not exist, the Machine will not be created and will enter the failed phase.", - "partitionNumber": "PartitionNumber specifies the numbered partition in which instances should be launched. It is recommended to only use this value if multiple MachineSets share a single Placement Group, in which case, each MachineSet should represent an individual partition number. If unset, when a Partition placement group is used, AWS will attempt to distribute instances evenly between partitions. If PartitionNumber is set when used with a non Partition type Placement Group, this will be considered an error.", } func (Placement) SwaggerDoc() map[string]string { @@ -150,6 +149,34 @@ func (TagSpecification) SwaggerDoc() map[string]string { return map_TagSpecification } +var map_AzureBootDiagnostics = map[string]string{ + "": "AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. This allows you to configure capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", + "storageAccountType": "StorageAccountType determines if the storage account for storing the diagnostics data should be provisioned by Azure (AzureManaged) or by the customer (CustomerManaged).", + "customerManaged": "CustomerManaged provides reference to the customer manager storage account.", +} + +func (AzureBootDiagnostics) SwaggerDoc() map[string]string { + return map_AzureBootDiagnostics +} + +var map_AzureCustomerManagedBootDiagnostics = map[string]string{ + "": "AzureCustomerManagedBootDiagnostics provides reference to a customer managed storage account.", + "storageAccountURI": "StorageAccountURI is the URI of the customer managed storage account. The URI typically will be `https://.blob.core.windows.net/` but may differ if you are using Azure DNS zone endpoints. You can find the correct endpoint by looking for the Blob Primary Endpoint in the endpoints tab in the Azure console.", +} + +func (AzureCustomerManagedBootDiagnostics) SwaggerDoc() map[string]string { + return map_AzureCustomerManagedBootDiagnostics +} + +var map_AzureDiagnostics = map[string]string{ + "": "AzureDiagnostics is used to configure the diagnostic settings of the virtual machine.", + "boot": "AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. This allows you to configure capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", +} + +func (AzureDiagnostics) SwaggerDoc() map[string]string { + return map_AzureDiagnostics +} + var map_AzureMachineProviderSpec = map[string]string{ "": "AzureMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an Azure virtual machine. It is used by the Azure machine actuator to create a single Machine. Required parameters such as location that are not specified by this configuration, will be defaulted by the actuator. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", "userDataSecret": "UserDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", @@ -178,6 +205,7 @@ var map_AzureMachineProviderSpec = map[string]string{ "ultraSSDCapability": "UltraSSDCapability enables or disables Azure UltraSSD capability for a virtual machine. This can be used to allow/disallow binding of Azure UltraSSD to the Machine both as Data Disks or via Persistent Volumes. This Azure feature is subject to a specific scope and certain limitations. More informations on this can be found in the official Azure documentation for Ultra Disks: (https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd?tabs=azure-portal#ga-scope-and-limitations).\n\nWhen omitted, if at least one Data Disk of type UltraSSD is specified, the platform will automatically enable the capability. If a Perisistent Volume backed by an UltraSSD is bound to a Pod on the Machine, when this field is ommitted, the platform will *not* automatically enable the capability (unless already enabled by the presence of an UltraSSD as Data Disk). This may manifest in the Pod being stuck in `ContainerCreating` phase. This defaulting behaviour may be subject to change in future.\n\nWhen set to \"Enabled\", if the capability is available for the Machine based on the scope and limitations described above, the capability will be set on the Machine. This will thus allow UltraSSD both as Data Disks and Persistent Volumes. If set to \"Enabled\" when the capability can't be available due to scope and limitations, the Machine will go into \"Failed\" state.\n\nWhen set to \"Disabled\", UltraSSDs will not be allowed either as Data Disks nor as Persistent Volumes. In this case if any UltraSSDs are specified as Data Disks on a Machine, the Machine will go into a \"Failed\" state. If instead any UltraSSDs are backing the volumes (via Persistent Volumes) of any Pods scheduled on a Node which is backed by the Machine, the Pod may get stuck in `ContainerCreating` phase.", "acceleratedNetworking": "AcceleratedNetworking enables or disables Azure accelerated networking feature. Set to false by default. If true, then this will depend on whether the requested VMSize is supported. If set to true with an unsupported VMSize, Azure will return an error.", "availabilitySet": "AvailabilitySet specifies the availability set to use for this instance. Availability set should be precreated, before using this field.", + "diagnostics": "Diagnostics configures the diagnostics settings for the virtual machine. This allows you to configure boot diagnostics such as capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", } func (AzureMachineProviderSpec) SwaggerDoc() map[string]string { @@ -656,9 +684,9 @@ var map_VSphereMachineProviderSpec = map[string]string{ "numCPUs": "NumCPUs is the number of virtual processors in a virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", "numCoresPerSocket": "NumCPUs is the number of cores among which to distribute CPUs in this virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", "memoryMiB": "MemoryMiB is the size of a virtual machine's memory, in MiB. Defaults to the analogue property value in the template from which this machine is cloned.", - "diskGiB": "DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned.", + "diskGiB": "DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned. This parameter will be ignored if 'LinkedClone' CloneMode is set.", "snapshot": "Snapshot is the name of the snapshot from which the VM was cloned", - "cloneMode": "CloneMode specifies the type of clone operation. The LinkedClone mode is only support for templates that have at least one snapshot. If the template has no snapshots, then CloneMode defaults to FullClone. When LinkedClone mode is enabled the DiskGiB field is ignored as it is not possible to expand disks of linked clones. Defaults to LinkedClone, but fails gracefully to FullClone if the source of the clone operation has no snapshots.", + "cloneMode": "CloneMode specifies the type of clone operation. The LinkedClone mode is only support for templates that have at least one snapshot. If the template has no snapshots, then CloneMode defaults to FullClone. When LinkedClone mode is enabled the DiskGiB field is ignored as it is not possible to expand disks of linked clones. Defaults to FullClone. When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone.", } func (VSphereMachineProviderSpec) SwaggerDoc() map[string]string { diff --git a/vendor/modules.txt b/vendor/modules.txt index 8ac002ece..6182ec2ef 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -511,7 +511,7 @@ github.com/onsi/gomega/matchers/support/goraph/edge github.com/onsi/gomega/matchers/support/goraph/node github.com/onsi/gomega/matchers/support/goraph/util github.com/onsi/gomega/types -# github.com/openshift/api v0.0.0-20220405142345-c689b3938fab +# github.com/openshift/api v0.0.0-20220704153639-1d69d7990d92 ## explicit; go 1.16 github.com/openshift/api/config/v1 github.com/openshift/api/machine/v1 From 271a72ccd2190c0bbd5e3ce21ab1a731f3c6fb1f Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Mon, 4 Jul 2022 13:28:48 +0100 Subject: [PATCH 2/3] Update tests after changes to AWS resource reference discriminator --- .../failuredomain/failuredomain_test.go | 12 +++---- .../controlplanemachineset/webhooks.go | 4 +-- .../controlplanemachineset/webhooks_test.go | 34 +++++++++---------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/pkg/machineproviders/providers/openshift/machine/v1beta1/failuredomain/failuredomain_test.go b/pkg/machineproviders/providers/openshift/machine/v1beta1/failuredomain/failuredomain_test.go index 6560f27ea..6fbde03e4 100644 --- a/pkg/machineproviders/providers/openshift/machine/v1beta1/failuredomain/failuredomain_test.go +++ b/pkg/machineproviders/providers/openshift/machine/v1beta1/failuredomain/failuredomain_test.go @@ -60,9 +60,9 @@ var _ = Describe("FailureDomains", func() { It("should construct a list of failure domains", func() { Expect(failureDomains).To(ConsistOf( - HaveField("String()", "AWSFailureDomain{AvailabilityZone:us-east-1a, Subnet:{Type:id, Value:subenet-us-east-1a}}"), - HaveField("String()", "AWSFailureDomain{AvailabilityZone:us-east-1b, Subnet:{Type:id, Value:subenet-us-east-1b}}"), - HaveField("String()", "AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:id, Value:subenet-us-east-1c}}"), + HaveField("String()", "AWSFailureDomain{AvailabilityZone:us-east-1a, Subnet:{Type:ID, Value:subenet-us-east-1a}}"), + HaveField("String()", "AWSFailureDomain{AvailabilityZone:us-east-1b, Subnet:{Type:ID, Value:subenet-us-east-1b}}"), + HaveField("String()", "AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:ID, Value:subenet-us-east-1c}}"), )) }) }) @@ -269,7 +269,7 @@ var _ = Describe("FailureDomains", func() { }) It("returns the subnet for String()", func() { - Expect(fd.String()).To(Equal("AWSFailureDomain{Subnet:{Type:arn, Value:subnet-us-east-1a}}")) + Expect(fd.String()).To(Equal("AWSFailureDomain{Subnet:{Type:ARN, Value:subnet-us-east-1a}}")) }) }) @@ -287,7 +287,7 @@ var _ = Describe("FailureDomains", func() { }) It("returns the subnet for String()", func() { - Expect(fd.String()).To(Equal("AWSFailureDomain{Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[subnet-us-east-1b]}]}}")) + Expect(fd.String()).To(Equal("AWSFailureDomain{Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[subnet-us-east-1b]}]}}")) }) }) @@ -302,7 +302,7 @@ var _ = Describe("FailureDomains", func() { }) It("returns the subnet for String()", func() { - Expect(fd.String()).To(Equal("AWSFailureDomain{Subnet:{Type:id, Value:subnet-us-east-1c}}")) + Expect(fd.String()).To(Equal("AWSFailureDomain{Subnet:{Type:ID, Value:subnet-us-east-1c}}")) }) }) }) diff --git a/pkg/webhooks/controlplanemachineset/webhooks.go b/pkg/webhooks/controlplanemachineset/webhooks.go index 177fe6697..4170545d0 100644 --- a/pkg/webhooks/controlplanemachineset/webhooks.go +++ b/pkg/webhooks/controlplanemachineset/webhooks.go @@ -444,9 +444,7 @@ func validateDiscriminatedUnion(parentPath *field.Path, union interface{}, discr continue } - // TODO: Once the AWSResourceReference is updated, remove the second clause here. - // The names _should_ match on the field name, not on the json name. - if fieldType.Name == discriminantValue || fieldJSONName == discriminantValue { + if fieldType.Name == discriminantValue { if fieldValue.IsNil() { errs = append(errs, field.Required(parentPath.Child(fieldJSONName), fmt.Sprintf("value required when %s is %q", discriminantJSONName, discriminantValue))) } diff --git a/pkg/webhooks/controlplanemachineset/webhooks_test.go b/pkg/webhooks/controlplanemachineset/webhooks_test.go index 57e2f7fbe..2883360c9 100644 --- a/pkg/webhooks/controlplanemachineset/webhooks_test.go +++ b/pkg/webhooks/controlplanemachineset/webhooks_test.go @@ -273,8 +273,8 @@ var _ = Describe("Webhooks", func() { } Expect(k8sClient.Create(ctx, cpms)).To(MatchError(SatisfyAll( - ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains.aws[0].subnet.arn: Required value: value required when type is \"arn\""), - ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains.aws[0].subnet.id: Forbidden: value not allowed when type is \"arn\""), + ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains.aws[0].subnet.arn: Required value: value required when type is \"ARN\""), + ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains.aws[0].subnet.id: Forbidden: value not allowed when type is \"ARN\""), ))) }) }) @@ -372,8 +372,8 @@ var _ = Describe("Webhooks", func() { )).Build() Expect(k8sClient.Create(ctx, cpms)).To(MatchError(SatisfyAll( - ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: control plane machines are using unspecified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), - ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: no control plane machine is using specified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-different]}]}}"), + ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: control plane machines are using unspecified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: no control plane machine is using specified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-different]}]}}"), ))) }) @@ -387,8 +387,8 @@ var _ = Describe("Webhooks", func() { )).Build() Expect(k8sClient.Create(ctx, cpms)).To(MatchError(SatisfyAll( - ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: control plane machines are using unspecified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}]"), - ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: no control plane machine is using specified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:id, Value:subnet-us-east-1c}}]"), + ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: control plane machines are using unspecified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}]"), + ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: no control plane machine is using specified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:ID, Value:subnet-us-east-1c}}]"), ))) }) @@ -401,8 +401,8 @@ var _ = Describe("Webhooks", func() { Expect(k8sClient.Create(ctx, cpms)).To(MatchError(SatisfyAll( ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: control plane machines are using unspecified failure domain(s)"), - ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1b, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), - ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1b, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), ))) }) @@ -416,7 +416,7 @@ var _ = Describe("Webhooks", func() { ), )).Build() - Expect(apierrors.ReasonForError(k8sClient.Create(ctx, cpms))).To(BeEquivalentTo("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: no control plane machine is using specified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1d, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}]")) + Expect(apierrors.ReasonForError(k8sClient.Create(ctx, cpms))).To(BeEquivalentTo("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: no control plane machine is using specified failure domain(s) [AWSFailureDomain{AvailabilityZone:us-east-1d, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}]")) }) It("when the availability zones don't match", func() { @@ -430,13 +430,13 @@ var _ = Describe("Webhooks", func() { Expect(k8sClient.Create(ctx, cpms)).To(MatchError(SatisfyAll( ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: control plane machines are using unspecified failure domain(s)"), - ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1a, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), - ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1b, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), - ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1a, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1b, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1c, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Forbidden: no control plane machine is using specified failure domain(s)"), - ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1d, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), - ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1e, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), - ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1f, Subnet:{Type:filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1d, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1e, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), + ContainSubstring("AWSFailureDomain{AvailabilityZone:us-east-1f, Subnet:{Type:Filters, Value:&[{Name:tag:Name Values:[aws-subnet-12345678]}]}}"), ))) }) }) @@ -543,8 +543,8 @@ var _ = Describe("Webhooks", func() { }, } })()).To(MatchError(SatisfyAll( - ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains.aws[0].subnet.arn: Required value: value required when type is \"arn\""), - ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains.aws[0].subnet.id: Forbidden: value not allowed when type is \"arn\""), + ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains.aws[0].subnet.arn: Required value: value required when type is \"ARN\""), + ContainSubstring("spec.template.machines_v1beta1_machine_openshift_io.failureDomains.aws[0].subnet.id: Forbidden: value not allowed when type is \"ARN\""), ))) }) }) From 9aa7364d2fbed901477c3a3eeb9758a35ef83fb2 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Mon, 4 Jul 2022 17:22:30 +0100 Subject: [PATCH 3/3] Rename healthy machines to updated machines This is to be consistent with the status fields --- .../controlplanemachineset/controller_test.go | 22 +- .../controlplanemachineset/status_test.go | 44 ++-- .../controlplanemachineset/updates_test.go | 216 +++++++++--------- 3 files changed, 141 insertions(+), 141 deletions(-) diff --git a/pkg/controllers/controlplanemachineset/controller_test.go b/pkg/controllers/controlplanemachineset/controller_test.go index e17c5d99b..c30ee66de 100644 --- a/pkg/controllers/controlplanemachineset/controller_test.go +++ b/pkg/controllers/controlplanemachineset/controller_test.go @@ -748,7 +748,7 @@ var _ = Describe("validateClusterState", func() { machineGVR := machinev1beta1.GroupVersion.WithResource("machines") nodeGVR := corev1.SchemeGroupVersion.WithResource("nodes") - healthyMachineBuilder := resourcebuilder.MachineInfo(). + updatedMachineBuilder := resourcebuilder.MachineInfo(). WithMachineGVR(machineGVR). WithNodeGVR(nodeGVR). WithReady(true). @@ -813,9 +813,9 @@ var _ = Describe("validateClusterState", func() { progressingConditionBuilder.WithStatus(metav1.ConditionFalse).Build(), }), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("master-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("master-1").Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("master-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("master-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("master-1").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("master-2").Build()}, }, nodes: []*corev1.Node{ masterNodeBuilder.WithName("master-0").Build(), @@ -838,9 +838,9 @@ var _ = Describe("validateClusterState", func() { progressingConditionBuilder.WithStatus(metav1.ConditionFalse).WithReason(reasonOperatorDegraded).Build(), }), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("master-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("master-1").Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("master-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("master-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("master-1").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("master-2").Build()}, }, nodes: []*corev1.Node{ masterNodeBuilder.WithName("master-0").Build(), @@ -897,7 +897,7 @@ var _ = Describe("validateClusterState", func() { }), machineInfos: map[int32][]machineproviders.MachineInfo{ 0: {pendingMachineBuilder.WithIndex(0).WithMachineName("machine-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("master-1").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("master-1").Build()}, 2: {pendingMachineBuilder.WithIndex(2).WithMachineName("machine-2").Build()}, }, nodes: []*corev1.Node{ @@ -929,9 +929,9 @@ var _ = Describe("validateClusterState", func() { progressingConditionBuilder.WithStatus(metav1.ConditionTrue).Build(), }), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("master-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("master-1").Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("master-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("master-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("master-1").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("master-2").Build()}, }, nodes: []*corev1.Node{ masterNodeBuilder.WithName("master-0").Build(), diff --git a/pkg/controllers/controlplanemachineset/status_test.go b/pkg/controllers/controlplanemachineset/status_test.go index 7639c0cd0..5f77d8f22 100644 --- a/pkg/controllers/controlplanemachineset/status_test.go +++ b/pkg/controllers/controlplanemachineset/status_test.go @@ -155,7 +155,7 @@ var _ = Describe("Status", func() { machineGVR := machinev1beta1.GroupVersion.WithResource("machines") nodeGVR := corev1.SchemeGroupVersion.WithResource("nodes") - healthyMachineBuilder := resourcebuilder.MachineInfo(). + updatedMachineBuilder := resourcebuilder.MachineInfo(). WithMachineGVR(machineGVR). WithNodeGVR(nodeGVR). WithReady(true). @@ -194,9 +194,9 @@ var _ = Describe("Status", func() { PEntry("with up to date Machines", &reconcileStatusTableInput{ cpmsBuilder: resourcebuilder.ControlPlaneMachineSet().WithGeneration(1), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, expectedError: nil, expectedStatus: machinev1.ControlPlaneMachineSetStatus{ @@ -243,9 +243,9 @@ var _ = Describe("Status", func() { PEntry("when Machines need updates", &reconcileStatusTableInput{ cpmsBuilder: resourcebuilder.ControlPlaneMachineSet().WithGeneration(2), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").WithNeedsUpdate(true).Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").WithNeedsUpdate(true).Build()}, }, expectedError: nil, expectedStatus: machinev1.ControlPlaneMachineSetStatus{ @@ -293,13 +293,13 @@ var _ = Describe("Status", func() { PEntry("with pending replacement replicas", &reconcileStatusTableInput{ cpmsBuilder: resourcebuilder.ControlPlaneMachineSet().WithGeneration(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), pendingMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").Build(), }, 2: { - healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").WithNeedsUpdate(true).Build(), pendingMachineBuilder.WithIndex(2).WithMachineName("machine-replacement-2").Build(), }, }, @@ -349,14 +349,14 @@ var _ = Describe("Status", func() { PEntry("with ready replacement replicas", &reconcileStatusTableInput{ cpmsBuilder: resourcebuilder.ControlPlaneMachineSet().WithGeneration(4), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, 2: { - healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").WithNeedsUpdate(true).Build(), - healthyMachineBuilder.WithIndex(2).WithMachineName("machine-replacement-2").WithNodeName("node-replacement-2").Build(), + updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(2).WithMachineName("machine-replacement-2").WithNodeName("node-replacement-2").Build(), }, }, expectedError: nil, @@ -456,8 +456,8 @@ var _ = Describe("Status", func() { PEntry("with an unhealthy Machine", &reconcileStatusTableInput{ cpmsBuilder: resourcebuilder.ControlPlaneMachineSet().WithGeneration(7), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, 2: {missingNodeBuilder.WithIndex(2).WithMachineName("machine-2").Build()}, }, expectedError: nil, @@ -507,10 +507,10 @@ var _ = Describe("Status", func() { PEntry("with an unhealthy index (failure domain)", &reconcileStatusTableInput{ cpmsBuilder: resourcebuilder.ControlPlaneMachineSet().WithGeneration(8), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, 2: { missingNodeBuilder.WithIndex(2).WithMachineName("machine-2").WithNeedsUpdate(true).Build(), @@ -564,8 +564,8 @@ var _ = Describe("Status", func() { PEntry("with an empty index", &reconcileStatusTableInput{ cpmsBuilder: resourcebuilder.ControlPlaneMachineSet().WithGeneration(9), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, 2: {}, }, expectedError: nil, diff --git a/pkg/controllers/controlplanemachineset/updates_test.go b/pkg/controllers/controlplanemachineset/updates_test.go index 9f2ee25a5..85ae871da 100644 --- a/pkg/controllers/controlplanemachineset/updates_test.go +++ b/pkg/controllers/controlplanemachineset/updates_test.go @@ -73,7 +73,7 @@ var _ = Describe("reconcileMachineUpdates", func() { machineGVR := machinev1beta1.GroupVersion.WithResource("machines") nodeGVR := corev1.SchemeGroupVersion.WithResource("nodes") - healthyMachineBuilder := resourcebuilder.MachineInfo(). + updatedMachineBuilder := resourcebuilder.MachineInfo(). WithMachineGVR(machineGVR). WithNodeGVR(nodeGVR). WithReady(true). @@ -124,9 +124,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with no updates required", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -147,9 +147,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in a single index", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 1).Return(nil).Times(1) @@ -174,9 +174,9 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), expectedErrorBuilder: func() error { return fmt.Errorf("error creating new Machine for index %d: %w", 1, transientError) }, machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 1).Return(transientError).Times(1) @@ -200,12 +200,12 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in a single index, but the replacement machine is pending", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), pendingMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -229,18 +229,18 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in a single index, and the replacement machine is ready", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) // We expect this particular machine to be called for deletion. - machineInfo := healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build() + machineInfo := updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build() mockMachineProvider.EXPECT().DeleteMachine(gomock.Any(), gomock.Any(), machineInfo.MachineRef).Return(nil).Times(1) }, expectedLogsBuilder: func() []test.LogEntry { @@ -264,18 +264,18 @@ var _ = Describe("reconcileMachineUpdates", func() { return fmt.Errorf("error deleting Machine %s/%s: %w", namespaceName, "machine-1", transientError) }, machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) // We expect this particular machine to be called for deletion. - machineInfo := healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build() + machineInfo := updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build() mockMachineProvider.EXPECT().DeleteMachine(gomock.Any(), gomock.Any(), machineInfo.MachineRef).Return(transientError).Times(1) }, expectedLogsBuilder: func() []test.LogEntry { @@ -296,12 +296,12 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in a single index, and the replacement machine is ready, and the old machine is already deleted", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -324,9 +324,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates are required in multiple indexes", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { // Note, in this case it should only create a single machine. @@ -351,11 +351,11 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ 0: { - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build(), pendingMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").Build(), }, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { // Note, in this case it should not create anything new because we are at surge capacity. @@ -381,18 +381,18 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ 0: { - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build(), - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").WithNodeName("node-replacement-0").Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").WithNodeName("node-replacement-0").Build(), }, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { // Note, in this case, it should wait for the old Machine to go away before starting a new update. mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) // We expect this particular machine to be called for deletion. - machineInfo := healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build() + machineInfo := updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build() mockMachineProvider.EXPECT().DeleteMachine(gomock.Any(), gomock.Any(), machineInfo.MachineRef).Return(nil).Times(1) }, @@ -414,11 +414,11 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ 0: { - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").WithNodeName("node-replacement-0").Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").WithNodeName("node-replacement-0").Build(), }, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -441,8 +441,8 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with an empty index", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, 2: {}, }, setupMock: func() { @@ -466,8 +466,8 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with a pending machine in an index", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, 2: {pendingMachineBuilder.WithIndex(2).WithMachineName("machine-replacement-2").Build()}, }, setupMock: func() { @@ -491,8 +491,8 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with a missing index, and other indexes needing updates", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, 2: {}, }, setupMock: func() { @@ -517,8 +517,8 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with a pending machine in an index, and other indexes needing updates", rollingUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, 2: {pendingMachineBuilder.WithIndex(2).WithMachineName("machine-replacement-2").Build()}, }, setupMock: func() { @@ -577,9 +577,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with no updates required", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -600,9 +600,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in a single index, and the machine is not yet deleted", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -625,9 +625,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in a single index, and the machine has been deleted", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 1).Return(nil).Times(0) @@ -651,9 +651,9 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), expectedErrorBuilder: func() error { return fmt.Errorf("error creating new Machine for index %d: %w", 1, transientError) }, machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 1).Return(nil).Times(0) @@ -676,12 +676,12 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in a single index, and replacement machine is pending", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), pendingMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 0).Times(0) @@ -705,12 +705,12 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in a single index, and replacement machine is ready", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 0).Times(0) @@ -733,9 +733,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in multiple indexes, and the machines are not yet deleted", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -769,9 +769,9 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), expectedErrorBuilder: func() error { return fmt.Errorf("error creating new Machine for index %d: %w", 1, transientError) }, machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 1).Return(nil).Times(0) @@ -804,9 +804,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in multiple indexes, and a machine has been deleted", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 1).Return(nil).Times(0) @@ -839,9 +839,9 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in multiple indexes, and multiple machines have been deleted", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), 0).Return(nil).Times(0) @@ -875,12 +875,12 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in multiple indexes, and a single machine has been deleted, and the replacement machine is pending", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), pendingMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -915,14 +915,14 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ 0: { - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), pendingMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").Build(), }, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), pendingMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -957,12 +957,12 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with updates required in multiple indexes, and a single machine has been deleted, and the replacement machine is ready", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).Build()}, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -996,14 +996,14 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ 0: { - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), pendingMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").Build(), }, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -1038,14 +1038,14 @@ var _ = Describe("reconcileMachineUpdates", func() { cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ 0: { - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), - healthyMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").WithNodeName("node-replacement-0").Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(0).WithMachineName("machine-replacement-0").WithNodeName("node-replacement-0").Build(), }, 1: { - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), - healthyMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).WithMachineDeletionTimestamp(metav1.Now()).Build(), + updatedMachineBuilder.WithIndex(1).WithMachineName("machine-replacement-1").WithNodeName("node-replacement-1").Build(), }, - 2: {healthyMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, + 2: {updatedMachineBuilder.WithIndex(2).WithMachineName("machine-2").WithNodeName("node-2").Build()}, }, setupMock: func() { mockMachineProvider.EXPECT().CreateMachine(gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -1078,8 +1078,8 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with an empty index", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, 2: {}, }, setupMock: func() { @@ -1103,8 +1103,8 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with a pending machine in an index", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").Build()}, 2: {pendingMachineBuilder.WithIndex(2).WithMachineName("machine-replacement-2").Build()}, }, setupMock: func() { @@ -1128,8 +1128,8 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with a missing index, and other indexes need updating", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, 2: {}, }, setupMock: func() { @@ -1163,8 +1163,8 @@ var _ = Describe("reconcileMachineUpdates", func() { PEntry("with a pending machine in an index, and other indexes need updating", onDeleteUpdateTableInput{ cpmsBuilder: cpmsBuilder.WithReplicas(3), machineInfos: map[int32][]machineproviders.MachineInfo{ - 0: {healthyMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, - 1: {healthyMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, + 0: {updatedMachineBuilder.WithIndex(0).WithMachineName("machine-0").WithNodeName("node-0").Build()}, + 1: {updatedMachineBuilder.WithIndex(1).WithMachineName("machine-1").WithNodeName("node-1").WithNeedsUpdate(true).Build()}, 2: {pendingMachineBuilder.WithIndex(2).WithMachineName("machine-replacement-2").Build()}, }, setupMock: func() {