Skip to content

Development notes ‐ operator‐sdk version

Scott Trent edited this page Jun 3, 2024 · 26 revisions

Random notes on developing for SusQL Operator -- recent operator sdk version

(ALWAYS UPDATING!!!!!!)

Changes to the main branch automatically rebuild and push the container image via github action, but non-main branches or forked repos need to be hand-built and pushed to a developer specific location to avoid overwriting the official images.

Sample steps to build and push image

As desired, export CONTAINER_TOOL to docker or podman before building. (Default is docker.)

export OPERATOR_IMG=REGISTRYURL/REPOSITORYNAME/susql-controller
export CONTAINER_TOOL=podman
podman login
make operator-build && make operator-push

Todo: verify how to deploy a development bundle. (Perhaps using deploy.sh is OK for testing?) Todo: verify or create method to specification of deploy-time specifications when using bundle....

Simple functional verification

cd susql-operator/test
oc create -f labelgroups.yaml
oc create -f training-job-1.yaml
oc create -f training-job-2.yaml

bash labelgroups.sh
sleep 10
bash labelgroups.sh

# remove test artifacts on completion
oc delete -f training-job-2.yaml
oc delete -f training-job-1.yaml
oc delete -f labelgroups.yaml

Troubleshooting

  • Verify configuration displayed at install and run time
  • Double check that Kepler is functioning (e.g., expected output from OpenShift Observe Dashboards, etc)
  • Look at SusQL controller pod log output
kubectl logs -n openshift-operators $( kubectl get pod -n openshift-operators | grep susql-operator | cut -f 1 -d" " )
  • Verify accessibility and contents of appropriate Prometheus databases.
  • The log level can be changed by editing zapcore.Level(-2) in cmd/main.go and recreating the container image. (Eventually, log level will be configurable.)
Clone this wiki locally