Sign inSign up

joyrex2001/envinit-operator

By joyrex2001

•Updated over 6 years ago

This is an example operator that watches creation of namespaces, and runs an additonal kustomize.

Image
0

334

joyrex2001/envinit-operator repository overview

⁠envinit-operator

This operator will watch namespace add events. If the namespace contains the annotation envinit.joyrex2001.com/type it will run the run.sh shell script in the environment folder for that type. In this example it will do an additional kustomize run.

To install this operator;

kubectl create namespace operator-envinit
kustomize build kustomize | kubectl apply -f -

⁠Create a new namespace

To trigger the operator to provision the environment with the annotation as below. This will trigger the environment/dev/run.sh script to be executed.

apiVersion: v1
kind: Namespace
metadata:
  name: example-environment
  annotations:
    "envinit.joyrex2001.com/type": "dev"

⁠See also

Tag summary

Content type

Image

Digest

Size

66.1 MB

Last updated

over 6 years ago

docker pull joyrex2001/envinit-operator