Skip to content

LiangquanLi930/sample-operator

Repository files navigation

sample-operator

Demo

  • install operator by bundle
    operator-sdk olm install
    kubectl create namespace sample-operator-system
    operator-sdk run bundle -n sample-operator-system quay.io/openshifttest/sample-operator-bundle:v0.1.3
  • kubectl apply -f config/samples/cache_v1alpha1_sample.yaml
    apiVersion: cache.openshifttest/v1alpha1
    kind: Sample
    metadata:
      name: createdeployment-sample2
      namespace: test
    spec:
      namespace: test
      name: sample-operator-hello-server3
    This command will create a deployment named sample-operator-hello-server3 in test
    • Note: cr's namespace and deployment's namespace should be the same
    • BTW: The cr is the owner of the deployment, Owners and Dependents
  • clear
    operator-sdk cleanup -n sample-operator-system sample-operator --delete-all

build for multiarch

  • context: docker buildx
  • build operator
    make test
    make docker-buildx-push
  • build bundle
    make test
    make bundle-buildx-push
  • build catalog
    make catalog-buildx-push
  • help
    make help

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published