operator-sdk.txt
- bash re-scaffold-operator.sh keystone-operator
** check to make sure everything scaffolds correctly. This requires the PROJECT had all required webhooks and API's defined correctly. If it is wrong fix it in the source operator directory and re-scaffold.
-
cd into keystone-operator-v4 and fix any compilation errors (use cursor) -- copy in the operator.SetManagerOptions code (see what I did in glance-operator)
-
$ bash sync-git-with-dir.sh keystone-operator keystone-operator-v4
-
cd keystone-operator, create a new branch:
git co -b operator_sdk_1.41.1
- remove unused tests.
cd internal/controller && rm *_test.go; cd -
cd internal/webhook/v1beta1/ && rm *_test.go; cd -
- fix paths in copied over files (use cursor)
cd test/functional
replace: controllers with internal/controller
replace: pkg/keystone with internal/keystone
- Makefile changes (to the original Makefile):
-update main.go to cmd/main.go
-update api
-update controllers to internal/controller (if used)
-update pkg to internal (if used)
-bump KUSTOMIZE_VERSION ?= v5.6.0
-bump OPERATOR_SDK_VERSION ?= v1.41.1
-change tests to test
-
git add api/bases?
-
CI updates.
.ci_operator.yaml
- tag: ci-build-root-golang-1.24-sdk-1.31
+ tag: ci-build-root-golang-1.24-sdk-1.41.1
zuul.d/projects.yaml
jobs:
+ - openstack-k8s-operators-content-provider:
+ vars:
+ cifmw_install_yamls_sdk_version: v1.41.1
.github/workflows/build-<operator_name>-operator.yaml
- operator_sdk_version: 1.31.0
+ operator_sdk_version: 1.41.1
- Wire up the webhooks! I used Claude code for this:
Wire up the rest of the internal/webhook functions so they call into the respective library calls in api/v1beta1. We treat the api/v1beta1 functions as a library as they are used externally. So for the functions with TODO's in them make the appropriate call to the api/v1beta1 version. Also, can you update test/functional/suite_test.go so that it uses the webhooks from internal/webhooks with making the SetupWebhookWithManager call. Finally also add the call to SetupDefaults to cmd/main.go
-
Update Dockerfile for cmd/main.go
-
the force-bump github workflows to use quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.41.1
Cleanup: drop the -proxy-rolebinding, and -proxy-role