- operator-sdk cli
operator-sdk up local
- standard go tooling
go run cmd/manager/main.go
export WATCH_NAMESPACE=hwop export OPERATOR_NAME=hw
oc apply -f deploy/crds/cr0.yaml
oc apply -f deploy/crds/cr1.yaml
oc apply -f deploy/crds/cr2.yaml
oc apply -f deploy/crds/cr3.yaml
- edit service when watching service changes
- edit service when not watching service changes
- edit service, add label
- edit deployment, add label
- Delete CR when operator is running
oc delete -f deploy/crds/cr0.yaml
- Delete CR when operator is not running
oc delete -f deploy/crds/cr0.yaml
- with OperatorSDK
operator-sdk build <docker-image-name>
- with standard go tools
go build -o hw-operator cmd/manager/main.go
- with local S2I
s2i build . docker.io/dimssss/golang-s2i:0.5 test
- with OpenShift SourceStrategy build
# Create BC oc process -f deploy/bc.yaml | oc create -f - oc start-build hw-operator -F
oc create -f deploy/service_account.yaml
oc create -f deploy/role.yaml
oc create -f deploy/role_binding.yaml
oc create -f deploy/operator.yaml