Skip to content

Instantly share code, notes, and snippets.

@tsisodia10
Last active May 9, 2023 15:50
Show Gist options
  • Save tsisodia10/abc3a5aef08cf99c70f6a4d370d7dea7 to your computer and use it in GitHub Desktop.
Save tsisodia10/abc3a5aef08cf99c70f6a4d370d7dea7 to your computer and use it in GitHub Desktop.

Testing Addon locally

https://github.com/mt-sre/managed-tenants-cli

Install From PyPI:

pip install managedtenants_cli

From source:

python setup.py install

Develop Install pre-commit hooks:

pre-commit install

Install the development requirements:

make develop

Run:

pipenv shell

Once the image is published in quay, try adding the CatalogSource, OperatorGroup and Subscription.

CatalogSource

kubectl apply -f -<< EOF
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: starburst-combined-catalog
  namespace: olm
spec:
  sourceType: grpc
  grpcPodConfig:
    securityContextConfig: restricted
  image: quay.io/tsisodia10/starburst-combined-catalog:dev
  displayName: Starburst Combined Catalog
  publisher: Me
  updateStrategy:
    registryPoll:
      interval: 60m
EOF

OperatorGroup

kubectl apply -f -<< EOF
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: my-starburst-op-group
  namespace: starburst-playground
spec:
  targetNamespaces:
  - starburst-playground
EOF

Subscription

kubectl apply -f -<< EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: starburst-addon-subscription
  namespace: starburst-playground
spec:
  channel: alpha1
  name: starburst-addon
  source: starburst-combined-catalog
  sourceNamespace: olm
  installPlanApproval: Automatic
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment