Skip to content

Commit e5c34fe

Browse files
Merge pull request #1234 from anirudhAgniRedhat/anirudhAgniRedhat/capacityReservationGroupIDWebhookValidation
CFE-1051: Add the webhook validation for "CapacityReservationGroupID" to "AzureMachineProviderSpec" in openshift/machine-api-operator
2 parents dcf1387 + 31e2a4b commit e5c34fe

File tree

440 files changed

+27236
-43730
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+27236
-43730
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ endif
5555
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
5656
ENVTEST = go run ${PROJECT_DIR}/vendor/sigs.k8s.io/controller-runtime/tools/setup-envtest
5757
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
58-
ENVTEST_K8S_VERSION = 1.29
58+
ENVTEST_K8S_VERSION = 1.29.1
5959

6060
.PHONY: vendor
6161
vendor:
@@ -103,7 +103,7 @@ test-sec:
103103
test: unit
104104

105105
unit:
106-
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path --bin-dir $(PROJECT_DIR)/bin)" ./hack/ci-test.sh
106+
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path --bin-dir $(PROJECT_DIR)/bin --remote-bucket openshift-kubebuilder-tools)" ./hack/ci-test.sh
107107

108108
.PHONY: image
109109
image: ## Build docker image

cmd/vsphere/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"time"
99

1010
configv1 "github.com/openshift/api/config/v1"
11+
apifeatures "github.com/openshift/api/features"
1112
machinev1 "github.com/openshift/api/machine/v1beta1"
1213
configv1client "github.com/openshift/client-go/config/clientset/versioned"
1314
configinformers "github.com/openshift/client-go/config/informers/externalversions"
@@ -173,7 +174,7 @@ func main() {
173174
klog.Fatalf("unable to retrieve current feature gates: %v", err)
174175
}
175176
// read featuregate read and usage to set a variable to pass to a controller
176-
staticIPFeatureGateEnabled := featureGates.Enabled(configv1.FeatureGateVSphereStaticIPs)
177+
staticIPFeatureGateEnabled := featureGates.Enabled(apifeatures.FeatureGateVSphereStaticIPs)
177178

178179
// Initialize machine actuator.
179180
machineActuator := machine.NewActuator(machine.ActuatorParams{

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
github.com/google/uuid v1.4.0
1111
github.com/onsi/ginkgo/v2 v2.14.0
1212
github.com/onsi/gomega v1.30.0
13-
github.com/openshift/api v0.0.0-20240124164020-e2ce40831f2e
13+
github.com/openshift/api v0.0.0-20240521141249-8af21b7ed3e3
1414
github.com/openshift/client-go v0.0.0-20240115204758-e6bf7d631d5e
1515
github.com/openshift/library-go v0.0.0-20240116081341-964bcb3f545c
1616
github.com/prometheus/client_golang v1.18.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY
479479
github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw=
480480
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
481481
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
482-
github.com/openshift/api v0.0.0-20240124164020-e2ce40831f2e h1:cxgCNo/R769CO23AK5TCh45H9SMUGZ8RukiF2/Qif3o=
483-
github.com/openshift/api v0.0.0-20240124164020-e2ce40831f2e/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4=
482+
github.com/openshift/api v0.0.0-20240521141249-8af21b7ed3e3 h1:fxqjG8C/fU1UfUalZhNB01jqIQDlBsCVsFnWZ1V17Rg=
483+
github.com/openshift/api v0.0.0-20240521141249-8af21b7ed3e3/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4=
484484
github.com/openshift/client-go v0.0.0-20240115204758-e6bf7d631d5e h1:qGjfKX8i0h4efMNEnhgTdxcdx6gwwOwhTfBJ20WFqA8=
485485
github.com/openshift/client-go v0.0.0-20240115204758-e6bf7d631d5e/go.mod h1:2am3qrggh9LlDCf/MDGzcFWMhdaushxFQi0+ZZDhdVk=
486486
github.com/openshift/library-go v0.0.0-20240116081341-964bcb3f545c h1:gLylEQQryG+A6nqWYIwE1wUzn1eFUmthjADvflMWKnM=

hack/crds-sync.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
set -euo pipefail
44

55
# map names of CRD files between the vendored openshift/api repository and the ./install directory
6-
CRDS_MAPPING=( "vendor/github.com/openshift/api/machine/v1beta1/0000_10_machine.crd.yaml:0000_30_machine-api-operator_02_machine.crd.yaml"
7-
"vendor/github.com/openshift/api/machine/v1beta1/0000_10_machineset.crd.yaml:0000_30_machine-api-operator_03_machineset.crd.yaml"
8-
"vendor/github.com/openshift/api/machine/v1beta1/0000_10_machinehealthcheck.yaml:0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml")
6+
CRDS_MAPPING=( "vendor/github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machines.crd.yaml:0000_30_machine-api-operator_02_machine.crd.yaml"
7+
"vendor/github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinesets.crd.yaml:0000_30_machine-api-operator_03_machineset.crd.yaml"
8+
"vendor/github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests/0000_10_machine-api_01_machinehealthchecks.crd.yaml:0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml")
99

1010
for crd in "${CRDS_MAPPING[@]}" ; do
1111
SRC="${crd%%:*}"

install/0000_30_machine-api-operator_02_machine.crd.yaml

Lines changed: 447 additions & 290 deletions
Large diffs are not rendered by default.

install/0000_30_machine-api-operator_03_machineset.crd.yaml

Lines changed: 522 additions & 318 deletions
Large diffs are not rendered by default.

install/0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml

Lines changed: 236 additions & 168 deletions
Large diffs are not rendered by default.

pkg/controller/vsphere/actuator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func TestMachineEvents(t *testing.T) {
6262
testEnv := &envtest.Environment{
6363
CRDDirectoryPaths: []string{
6464
filepath.Join("..", "..", "..", "install"),
65-
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1"),
65+
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests"),
6666
filepath.Join("..", "..", "..", "third_party", "cluster-api", "crd")},
6767
}
6868

pkg/controller/vsphere/machine_scope_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func TestPatchMachine(t *testing.T) {
287287
testEnv := &envtest.Environment{
288288
CRDDirectoryPaths: []string{
289289
filepath.Join("..", "..", "..", "install"),
290-
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1")},
290+
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests")},
291291
}
292292

293293
cfg, err := testEnv.Start()
@@ -546,7 +546,7 @@ func TestNodeGetter(t *testing.T) {
546546
testEnv := &envtest.Environment{
547547
CRDDirectoryPaths: []string{
548548
filepath.Join("..", "..", "..", "install"),
549-
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1")},
549+
filepath.Join("..", "..", "..", "vendor", "github.com", "openshift", "api", "config", "v1", "zz_generated.crd-manifests")},
550550
}
551551

552552
cfg, err := testEnv.Start()

0 commit comments

Comments
 (0)