You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit migrates the openstack-baremetal-operator from Operator SDK
1.31.0 to 1.41.1, following the new project structure and best practices
introduced in the newer SDK version.
Major Changes:
Project Structure Reorganization:
- Moved entry point from root main.go to cmd/main.go
- Migrated pkg/ directory to internal/ structure
- Moved controllers from controllers/ to internal/controller/
- Created internal/webhook/v1beta1/ for webhook registration
- Reorganized internal packages: openstackbaremetalset/ and openstackprovisionserver/
Webhook Architecture Updates:
- Separated webhook registration (internal/webhook/v1beta1/) from webhook
logic (api/v1beta1/*_webhook.go)
- Removed kubebuilder:webhook annotations from API webhook files
- Updated webhook setup to use internal webhook registration functions
- Added SetupWebhookClient() function for proper client initialization
- Updated test files to use new webhook structure
Configuration Updates:
- Cert-Manager: Split certificate.yaml into certificate-webhook.yaml and
certificate-metrics.yaml, added issuer.yaml
- Metrics: Added metrics_service.yaml, manager_metrics_patch.yaml, and
cert_metrics_manager_patch.yaml
- RBAC: Added metrics_auth_role.yaml, metrics_auth_role_binding.yaml,
metrics_reader_role.yaml, and admin roles for CRs
- Network Policies: Added allow-metrics-traffic.yaml and
allow-webhook-traffic.yaml
- Prometheus: Updated monitor.yaml and added monitor_tls_patch.yaml
- Removed deprecated auth proxy configurations
- Updated manager.yaml with new labels, security context, and resource limits
Build System:
- Updated Makefile for new project structure
- Updated PROJECT file with new layout and plugin version
- Updated Dockerfile to use new cmd/main.go entry point
- Updated .ci-operator.yaml
Test Updates:
- Updated tests/functional/suit_test.go to use internal/webhook/v1beta1
- Updated test imports to use internal/controller instead of controllers
Related: https://issues.redhat.com/browse/OSPRH-21931
Co-authored-by: Composer AI <[email protected]>
Copy file name to clipboardExpand all lines: Dockerfile
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ RUN mkdir -p ${DEST_ROOT}/usr/local/bin/
26
26
RUN if [ ! -f $CACHITO_ENV_FILE ]; then go mod download ; fi
27
27
28
28
# Build manager
29
-
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/manager main.go
29
+
RUN if [ -f $CACHITO_ENV_FILE ] ; then source $CACHITO_ENV_FILE ; fi ; env ${GO_BUILD_EXTRA_ENV_ARGS} go build ${GO_BUILD_EXTRA_ARGS} -a -o ${DEST_ROOT}/manager cmd/main.go
0 commit comments