Skip to content

dprince/operator-sdk-conversion-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

operator-sdk.txt

  1. 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.

  1. 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)

  2. $ bash sync-git-with-dir.sh keystone-operator keystone-operator-v4

  3. cd keystone-operator, create a new branch:

git co -b operator_sdk_1.41.1
  1. remove unused tests.
 cd internal/controller && rm *_test.go; cd -
 cd internal/webhook/v1beta1/ && rm *_test.go; cd -
  1. fix paths in copied over files (use cursor)
  cd test/functional
  replace: controllers with internal/controller
  replace: pkg/keystone with internal/keystone
  1. 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
  1. git add api/bases?

  2. 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

  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
  1. Update Dockerfile for cmd/main.go

  2. 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

About

don't look here, go away

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages