Creating a minimal helm chart for ora-operator

Ali Mukadam
2 min readMar 23, 2024

--

Photo by Syed Hussaini on Unsplash

In the previous post, I wrote about the Oracle Database Operator, a Kubernetes operator that allows you to handle the lifecycle of your Oracle Database on Oracle Cloud or on Kubernetes.

Much to my chagrin, I also found we do not have a helm operator for it yet which is why I opened an issue. Nevertheless, I needed a helm chart for the operator to write Part 3 of the New Cloud Native Brew series so let’s find how we can create one.

Beging by creatingg a new chart:

helm create helm-ora-operator

This is a minimal functional helm chart so let’s remove all the unnecessary manifests from the templates directory:

for f in deployment hpa ingress service serviceaccount; do
rm -f templates/$f.yaml
done

rm -rf templates/tests templates/NOTES.txt

Download the ora-operator installation manifest to the templates directory:

curl -o templates/oracle-database-operator.yaml https://raw.githubusercontent.com/oracle/oracle-database-operator/main/oracle-database-operator.yaml

In the root Chart.yaml, add the dependency on cert-manager:

dependencies:
- name: cert-manager
version: 1.14.4
repository: "https://artifacthub.io/packages/helm/cert-manager/cert-manager"

By default, cert-manager does not install its own CRDs. But we can pre-create them. Create a directory called crds in the root folder and download the cert-manager crds manifest to it:

mkdir crds
curl -L -o crds/cert-manager.crds.yaml https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.crds.yaml

Update the dependencies:

helm dependency update

Package the chart:

helm package helm-ora-operator

Depending on what you are using e.g. either GitHub Pages or OCI Object Storage, follow these respective posts to update your helm repo.

Add your helm repository:

helm add orao <url>
helm repo update

Check you can find it:

helm search repo helm-ora-operator
NAME CHART VERSION APP VERSION DESCRIPTION
orao/helm-ora-operator 0.1.3 1.16.0 A Helm chart for Oracle Database Operator

We can now install it:

helm install ora-operator orao/helm-ora-operator

NAME: ora-operator
LAST DEPLOYED: Sat Mar 23 14:49:01 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

Verify that the pods are working:

kubectl -n oracle-database-operator-system get pods
NAME READY STATUS RESTARTS AGE
oracle-database-operator-controller-manager-5b7f86dd87-6qjz4 1/1 Running 0 69m
oracle-database-operator-controller-manager-5b7f86dd87-kskmx 1/1 Running 0 69m
oracle-database-operator-controller-manager-5b7f86dd87-vfkc2 1/1 Running 0 69m

We can now set up the operator via a helm chart. In the next part of the New cloud native brew series, we’ll look at how to use the helm chart.

--

--