|
| 1 | +# Eunomia GitOps Operator for Kubernetes |
| 2 | + |
| 3 | +<!--- |
| 4 | +This doesn't work yet. Maybe someday it will. |
| 5 | +
|
| 6 | +## TL;DR: |
| 7 | +
|
| 8 | +```shell |
| 9 | +helm repo add eunomia-operator https://kohlstechnology.github.io/eunomia/ |
| 10 | +helm install my-release eunomia-operator/eunomia-operator |
| 11 | +``` |
| 12 | +
|
| 13 | +--> |
| 14 | + |
| 15 | +## Introduction |
| 16 | + |
| 17 | +This chart bootstraps a eunomia operator deployment on [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. |
| 18 | + |
| 19 | +## Prerequisites |
| 20 | + |
| 21 | +- Kubernetes 1.16+ |
| 22 | + |
| 23 | +## Installing the Chart |
| 24 | + |
| 25 | +This command deploys _eunomia_ on a Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. |
| 26 | + |
| 27 | +```shell |
| 28 | +# Deploy the operator |
| 29 | +helm template deploy/helm/eunomia-operator/ | kubectl apply -f - |
| 30 | +``` |
| 31 | + |
| 32 | +### Installing with Kubernetes Ingress |
| 33 | + |
| 34 | +Update [values.yaml](values.yaml) file for ingress configuration. If you don't want to change the file, you can enable ingress from command line as well. |
| 35 | + |
| 36 | +For running with default configuration |
| 37 | + |
| 38 | +```shell |
| 39 | +# Enabling eunomia ingress |
| 40 | +helm template deploy/helm/eunomia-operator/ --set eunomia.operator.ingress.enabled=true | kubectl apply -f - -n eunomia-operator |
| 41 | +``` |
| 42 | + |
| 43 | +Also, you can pass the ingress configuration in command line itself. For example:- |
| 44 | + |
| 45 | +```shell |
| 46 | +# Updating eunomia ingress configuration |
| 47 | +helm template deploy/helm/eunomia-operator/ --set eunomia.operator.ingress.enabled=true \ |
| 48 | +--set eunomia.operator.ingress.hosts[0].host=hello-eunomia.info \ |
| 49 | +--set eunomia.operator.ingress.hosts[0].paths[0].path=/ \ |
| 50 | +--set eunomia.operator.ingress.hosts[0].paths[0].portName=webhook \ |
| 51 | +--set eunomia.operator.ingress.hosts[0].paths[1].path=/metrics \ |
| 52 | +--set eunomia.operator.ingress.hosts[0].paths[1].portName=metrics | kubectl apply -f - -n eunomia-operator |
| 53 | +``` |
| 54 | + |
| 55 | +Replace the host `hello-eunomia.info` with suitable DNS name. |
| 56 | + |
| 57 | +### Installing with Cloud Load Balancers |
| 58 | + |
| 59 | +Update [values.yaml](values.yaml) file for the service configuration. If you don't want to change the file, you can enable ingress from command line as well. |
| 60 | + |
| 61 | +For running with default configuration |
| 62 | + |
| 63 | +```shell |
| 64 | +# Enabling eunomia with cloud load balancer |
| 65 | +helm template deploy/helm/eunomia-operator/ \ |
| 66 | + --set eunomia.operator.service.type=LoadBalancer \ |
| 67 | + --set eunomia.operator.service.annotations."cloud\.google\.com\/load-balancer-type"=Internal \ |
| 68 | + | kubectl apply -f - -n eunomia-operator |
| 69 | +``` |
| 70 | + |
| 71 | +### Installing with PSP |
| 72 | + |
| 73 | +```shell |
| 74 | +# Enabling eunomia PodSecurityPolicy |
| 75 | +helm template deploy/helm/eunomia-operator/ --set eunomia.operator.podSecurityPolicy.enabled=true | kubectl apply -f - -n eunomia-operator |
| 76 | +``` |
| 77 | + |
| 78 | +### Installing on OpenShift |
| 79 | + |
| 80 | +Use the below command to install Eunomia on OpenShift. This will also give you the route for the ingress webhook. |
| 81 | + |
| 82 | +```shell |
| 83 | +# Deploy the operator |
| 84 | +helm template deploy/helm/eunomia-operator/ --set eunomia.operator.openshift.route.enabled=true | oc apply -f - |
| 85 | +``` |
| 86 | + |
| 87 | +<!--- |
| 88 | +This doesn't work yet. Maybe someday it will. |
| 89 | +
|
| 90 | +## Installing the Chart |
| 91 | +
|
| 92 | +To install the chart with the release name `my-release`: |
| 93 | +
|
| 94 | +```shell |
| 95 | +helm install my-release eunomia-operator/eunomia-operator |
| 96 | +``` |
| 97 | +
|
| 98 | +The command deploys _eunomia_ on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. |
| 99 | +
|
| 100 | +> **Tip**: List all releases using `helm list` |
| 101 | +
|
| 102 | +## Uninstalling the Chart |
| 103 | +
|
| 104 | +To uninstall/delete the `my-release` deployment: |
| 105 | +
|
| 106 | +```shell |
| 107 | +helm delete my-release |
| 108 | +``` |
| 109 | +
|
| 110 | +The command removes all the Kubernetes components associated with the chart and deletes the release. |
| 111 | +
|
| 112 | +--> |
| 113 | + |
| 114 | +## Configuration |
| 115 | + |
| 116 | +The following table lists the configurable parameters of the _eunomia_ chart and their default values. |
| 117 | + |
| 118 | +| Parameter | Description | Default | |
| 119 | +| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | |
| 120 | +| `eunomia.operator.affinity` | Set `affinity` field in operator pod spec | `nil` | |
| 121 | +| `eunomia.operator.deployment.clusterViewer` | Create eunomia-cluster-list ClusterRole | `true` | |
| 122 | +| `eunomia.operator.deployment.enabled` | Create operator Deployment | `true` | |
| 123 | +| `eunomia.operator.deployment.nsRbacOnly` | Only create RBAC objects | `false` | |
| 124 | +| `eunomia.operator.deployment.operatorHub` | Do not create objects managed by OperatorHub install | `false` | |
| 125 | +| `eunomia.operator.image.name` | Operator container image name | `kohlstechnology/eunomia-operator` | |
| 126 | +| `eunomia.operator.image.pullPolicy` | Operator container image pull policy | `Always` | |
| 127 | +| `eunomia.operator.image.repository` | Operator container image registry name | `quay.io` | |
| 128 | +| `eunomia.operator.image.tag` | Operator contianer image tag | `latest` | |
| 129 | +| `eunomia.operator.ingress.annotations` | Set .metadata.annotaions for Ingress | `nil` | |
| 130 | +| `eunomia.operator.ingress.enabled` | Create Ingress for operator webhook | `false` | |
| 131 | +| `eunomia.operator.ingress.hosts` | Set Ingress .spec.rules | _see values.yaml_ | |
| 132 | +| `eunomia.operator.ingress.tls` | Set Ingress .spec.tls | `nil` | |
| 133 | +| `eunomia.operator.namespace` | Namespace for operator deployment | `eunomia-operator` | |
| 134 | +| `eunomia.operator.nodeSelector` | Set `nodeSelector` in operator pod spec | `nil` | |
| 135 | +| `eunomia.operator.openshift.enabled` | If `true`, enable installation on OpenShift | `false` | |
| 136 | +| `eunomia.operator.openshift.route.enabled` | If `true`, create OpenShift Route | `false` | |
| 137 | +| `eunomia.operator.podSecurityPolicy.enabled` | If `true`, create PodSecurityPolicy and RBAC resources | `false` | |
| 138 | +| `eunomia.operator.replicas` | Operator Deploy .spec.replicas | `1` | |
| 139 | +| `eunomia.operator.resources` | Set operator container requests a limits | _see values.yaml_ | |
| 140 | +| `eunomia.operator.service.annotaions` | Set .metadata.annotations for Service | `nil` | |
| 141 | +| `eunomia.operator.service.type` | Set .spec.type for Service | `nil` | |
| 142 | +| `eunomia.operator.serviceAccount` | Name of servie account to run the operator pod | `eunomia-operator` | |
| 143 | +| `eunomia.operator.tolerations` | Set `tolerations` field on operator pod spec | `nil` | |
| 144 | + |
0 commit comments