This example is deprecated. The Helm operator functionality has been integrated into the Operator SDK as of v0.3.0. To get started developing a Helm operator with the SDK, see the Helm operator user guide.
Simple Operator using the official Tomcat Helm Chart and deployed directly or using the Operator Lifecycle Manager.
export IMAGE=quay.io/<namespace>/tomcat-operator:v0.0.1
docker build \
--build-arg HELM_CHART=https://storage.googleapis.com/kubernetes-charts/tomcat-0.1.0.tgz \
--build-arg API_VERSION=apache.org/v1alpha1 \
--build-arg KIND=Tomcat \
-t $IMAGE ../../
docker push $IMAGE
kubectl create -f crd.yaml
kubectl create -n <operator-namespace> -f rbac.yaml
sed "s|REPLACE_IMAGE|$IMAGE|" operator.yaml.template > operator.yaml
kubectl create -n <operator-namespace> -f operator.yaml
NOTE: Operator Lifecycle Manager must be installed in the cluster in advance.
kubectl create -f crd.yaml
sed "s|REPLACE_IMAGE|$IMAGE|" csv.yaml.template > csv.yaml
kubectl create -n <operator-namespace> -f csv.yaml
kubectl create -n <operator-namespace> -f cr.yaml