Skip to content

Commit d645938

Browse files
committed
Move webhooks into pkg/webhooks
Moves webhooks from api to pkg/webhooks making only mechanical code changes except for the removal of the defaulting webhooks, because they weren't used. This results in there now being no mutating webhook configured. NOTE(stephenfin): There were a lot of conflicts here. These were mostly mitigated by faking the addition of v1alpha8, which moved the webhooks to the 'api/v1alpha8' package (commit 750b84d), followed by the subsequent rename of this package to v1beta1 (commit e9fb53c), for the webhook files and tests. This still resulted in some merge conflicts due the v1alpha8 changes such as 564b6bd and 4368c4f (which we obviously don't want to include here) but it made the backport much simpler. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> (cherry picked from commit 750b84d)
1 parent 0cd0798 commit d645938

18 files changed

+581
-605
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ include $(ROOT_DIR_RELATIVE)/common.mk
1919
# If you update this file, please follow
2020
# https://www.thapaliya.com/en/writings/well-documented-makefiles/
2121

22-
export GOTOOLCHAIN=go1.22.8
22+
# export GOTOOLCHAIN=go1.22.8
2323

2424
# Active module mode, as we use go modules to manage dependencies
2525
export GO111MODULE=on
@@ -267,7 +267,7 @@ generate-go: $(MOCKGEN)
267267
.PHONY: generate-manifests
268268
generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.
269269
$(CONTROLLER_GEN) \
270-
paths=./api/... \
270+
paths=./pkg/webhooks/... \
271271
crd:crdVersions=v1 \
272272
output:crd:dir=$(CRD_ROOT) \
273273
output:webhook:dir=$(WEBHOOK_ROOT) \

api/v1alpha7/identity_types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ limitations under the License.
1616

1717
package v1alpha7
1818

19-
const defaultIdentityRefKind = "Secret"
20-
2119
// OpenStackIdentityReference is a reference to an infrastructure
2220
// provider identity to be used to provision cluster resources.
2321
type OpenStackIdentityReference struct {

api/v1alpha7/openstackcluster_webhook.go

Lines changed: 0 additions & 153 deletions
This file was deleted.

api/v1alpha7/openstackclusterlist_webhook.go

Lines changed: 0 additions & 32 deletions
This file was deleted.

api/v1alpha7/openstackclustertemplate_webhook.go

Lines changed: 0 additions & 85 deletions
This file was deleted.

api/v1alpha7/openstackmachinetemplatelist_webhook.go

Lines changed: 0 additions & 32 deletions
This file was deleted.

api/v1alpha7/zz_generated.deepcopy.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)