An owncloud operator to demonstrate how to handle nested helm charts
If your helm chart includes a dependency, the operator-sdk will pull the dependency when you create the project. That local copy will then be used by the operator. The structure looks like this:
owncloud-operator
βββ build
βΒ Β βββ Dockerfile
βββ deploy
βΒ Β βββ crds
βΒ Β βΒ Β βββ cloud.owncloud.com_ownclouds_crd.yaml
βΒ Β βΒ Β βββ cloud.owncloud.com_v1alpha1_owncloud_cr.yaml
βΒ Β βββ operator.yaml
βΒ Β βββ role_binding.yaml
βΒ Β βββ role.yaml
βΒ Β βββ service_account.yaml
βββ helm-charts
βΒ Β βββ owncloud
βΒ Β βββ Chart.lock
βΒ Β βββ charts
βΒ Β βΒ Β βββ mariadb-5.11.3.tgz <===This is the pulled dependency
βΒ Β βββ Chart.yaml
βΒ Β βββ OWNERS
βΒ Β βββ README.md
βΒ Β βββ templates
βΒ Β βΒ Β βββ deployment.yaml
βΒ Β βΒ Β βββ externaldb-secrets.yaml
βΒ Β βΒ Β βββ _helpers.tpl
βΒ Β βΒ Β βββ ingress.yaml
βΒ Β βΒ Β βββ NOTES.txt
βΒ Β βΒ Β βββ owncloud-pvc.yaml
βΒ Β βΒ Β βββ secrets.yaml
βΒ Β βΒ Β βββ svc.yaml
βΒ Β βββ values.yaml
βββ licenses
βββ watches.yaml
In this example, we unzipped the folder to edit the parameters (not shown above). We added a new value, nameOverride, to demonstrate the operator is using this local version of the helm chart.
nameOverride: "example-nested-mariadb"
If you make changes, such as using a certified image instead, it will be in the newly-(re)built operator image.
NOTE: Because the operator will only pull this local version, you'll need to update it manually and release an updated operator image if you want to use a newer version of your dependency. (In this example, the operator would always deploy v5.11.3 no matter how many updates for mariadb are released)