Helm operator is a helm based operator using the Operator SDK.
The operator takes CRDs crds and charts from helm-charts and when a user creates a Custom Resource defined by the CRDs the operator deployes the corresponding helm chart.
Make your code changes and create a PR.
If adding new CRDs or charts in helm-charts make sure to build the new docker image and push it to your docker registry.
docker-compose build
docker push bgrigorov/helm-operator:test
Setup your KUBECONFIG
env var and install the helm-operator helm chart
helm upgrade -i helm-operator charts/ -f charts/values.test.yaml
- If you wish to run operator locally, install the crds manually
kubectl apply -f charts/templates/crds/
-
Set your
KUBECONFIG
env variable -
Then you can run the operator with either
docker-compose up -d
ormake run
.
Install the helm-chart managed by the operator
helm upgrade -i pgexp helm-charts/myexporter/ -f helm-charts/myexporter/values.test.yaml
Navigate to localhost:8080/metrics to see the exposed metrics. You can also connect to the mock DB that is running inside a sidecar container in the exporter pod and run some queries.
kubectl apply -f samples/myexporter.yaml
kubectl get pgx
- Define and add your CRD in crds.
- Add resources to role.
- Add the corresponding helm chart in helm-charts. Make sure the names match.
- Add a sample in samples.
- Add watcher to watches.yaml.
helm lint chart/
helm package chart/
helm repo index --url https://bsgrigorov.github.io/helm-operator/ .
Add the package and index.yaml to branch gh-pages
, commit and push.
Add github workflow files for pushing docker images and helm charts