diff --git a/stable/etcd-operator/Chart.yaml b/stable/etcd-operator/Chart.yaml index b48df8c508..e4dd0c3c30 100755 --- a/stable/etcd-operator/Chart.yaml +++ b/stable/etcd-operator/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 description: CoreOS etcd-operator Helm chart for Kubernetes name: etcd-operator -version: 0.8.4 -appVersion: 0.9.3 +version: 0.9.0 +appVersion: 0.9.4 home: https://github.com/coreos/etcd-operator icon: https://raw.githubusercontent.com/coreos/etcd/master/logos/etcd-horizontal-color.png sources: diff --git a/stable/etcd-operator/README.md b/stable/etcd-operator/README.md index 1decb4e0d2..ca0887786b 100644 --- a/stable/etcd-operator/README.md +++ b/stable/etcd-operator/README.md @@ -53,9 +53,8 @@ The following table lists the configurable parameters of the etcd-operator chart | ------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------- | | `rbac.create` | Install required RBAC service account, roles and rolebindings | `true` | | `rbac.apiVersion` | RBAC api version `v1alpha1\|v1beta1` | `v1beta1` | -| `rbac.etcdOperatorServiceAccountName` | Name of the service account resource when RBAC is enabled | `etcd-operator-sa` | -| `rbac.backupOperatorServiceAccountName` | Name of the service account resource when RBAC is enabled | `etcd-backup-operator-sa` | -| `rbac.restoreOperatorServiceAccountName` | Name of the service account resource when RBAC is enabled | `etcd-restore-operator-sa` | +| `serviceAccount.create` | Flag to create the service account | `true` | +| `serviceAccount.name` | Name of the service account resource when RBAC is enabled | `etcd-operator-sa` | | `deployments.etcdOperator` | Deploy the etcd cluster operator | `true` | | `deployments.backupOperator` | Deploy the etcd backup operator | `true` | | `deployments.restoreOperator` | Deploy the etcd restore operator | `true` | @@ -69,6 +68,7 @@ The following table lists the configurable parameters of the etcd-operator chart | `etcdOperator.image.pullpolicy` | etcd-operator container image pull policy | `Always` | | `etcdOperator.resources.cpu` | CPU limit per etcd-operator pod | `100m` | | `etcdOperator.resources.memory` | Memory limit per etcd-operator pod | `128Mi` | +| `etcdOperator.securityContext` | SecurityContext for etcd operator | `{}` | | `etcdOperator.nodeSelector` | Node labels for etcd operator pod assignment | `{}` | | `etcdOperator.podAnnotations` | Annotations for the etcd operator pod | `{}` | | `etcdOperator.commandArgs` | Additional command arguments | `{}` | @@ -79,9 +79,10 @@ The following table lists the configurable parameters of the etcd-operator chart | `backupOperator.image.pullpolicy` | Operator container image pull policy | `Always` | | `backupOperator.resources.cpu` | CPU limit per etcd-operator pod | `100m` | | `backupOperator.resources.memory` | Memory limit per etcd-operator pod | `128Mi` | +| `backupOperator.securityContext` | SecurityContext for etcd backup operator | `{}` | | `backupOperator.spec.storageType` | Storage to use for backup file, currently only S3 supported | `S3` | | `backupOperator.spec.s3.s3Bucket` | Bucket in S3 to store backup file | | -| `backupOperator.spec.s3.awsSecret` | Name of kubernetes secret containing aws credentials | | +| `backupOperator.spec.s3.awsSecret` | Name of kubernetes secret containing aws credentials | | | `backupOperator.nodeSelector` | Node labels for etcd operator pod assignment | `{}` | | `backupOperator.commandArgs` | Additional command arguments | `{}` | | `restoreOperator.name` | Restore operator name | `etcd-backup-operator` | @@ -91,8 +92,9 @@ The following table lists the configurable parameters of the etcd-operator chart | `restoreOperator.image.pullpolicy` | Operator container image pull policy | `Always` | | `restoreOperator.resources.cpu` | CPU limit per etcd-operator pod | `100m` | | `restoreOperator.resources.memory` | Memory limit per etcd-operator pod | `128Mi` | +| `restoreOperator.securityContext` | SecurityContext for etcd restore operator | `{}` | | `restoreOperator.spec.s3.path` | Path in S3 bucket containing the backup file | | -| `restoreOperator.spec.s3.awsSecret` | Name of kubernetes secret containing aws credentials | | +| `restoreOperator.spec.s3.awsSecret` | Name of kubernetes secret containing aws credentials | | | `restoreOperator.nodeSelector` | Node labels for etcd operator pod assignment | `{}` | | `restoreOperator.commandArgs` | Additional command arguments | `{}` | | `etcdCluster.name` | etcd cluster name | `etcd-cluster` | diff --git a/stable/etcd-operator/templates/_helpers.tpl b/stable/etcd-operator/templates/_helpers.tpl index 03f9a26b5e..e40768353e 100644 --- a/stable/etcd-operator/templates/_helpers.tpl +++ b/stable/etcd-operator/templates/_helpers.tpl @@ -45,31 +45,9 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this Create the name of the etcd-operator service account to use */}} {{- define "etcd-operator.serviceAccountName" -}} -{{- if .Values.serviceAccount.etcdOperatorServiceAccount.create -}} - {{ default (include "etcd-operator.fullname" .) .Values.serviceAccount.etcdOperatorServiceAccount.name }} +{{- if .Values.serviceAccount.create -}} + {{ default (include "etcd-operator.fullname" .) .Values.serviceAccount.name }} {{- else -}} - {{ default "default" .Values.serviceAccount.etcdOperatorServiceAccount.name }} + {{ default "default" .Values.serviceAccount.name }} {{- end -}} {{- end -}} - -{{/* -Create the name of the backup-operator service account to use -*/}} -{{- define "etcd-backup-operator.serviceAccountName" -}} -{{- if .Values.serviceAccount.backupOperatorServiceAccount.create -}} - {{ default (include "etcd-backup-operator.fullname" .) .Values.serviceAccount.backupOperatorServiceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.backupOperatorServiceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the restore-operator service account to use -*/}} -{{- define "etcd-restore-operator.serviceAccountName" -}} -{{- if .Values.serviceAccount.restoreOperatorServiceAccount.create -}} - {{ default (include "etcd-restore-operator.fullname" .) .Values.serviceAccount.restoreOperatorServiceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.restoreOperatorServiceAccount.name }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/stable/etcd-operator/templates/backup-etcd-crd.yaml b/stable/etcd-operator/templates/backup-etcd-crd.yaml index 5528f76626..5d97561596 100644 --- a/stable/etcd-operator/templates/backup-etcd-crd.yaml +++ b/stable/etcd-operator/templates/backup-etcd-crd.yaml @@ -15,4 +15,4 @@ metadata: spec: clusterName: {{ .Values.etcdCluster.name }} {{ toYaml .Values.backupOperator.spec | indent 2 }} -{{- end}} \ No newline at end of file +{{- end}} diff --git a/stable/etcd-operator/templates/backup-operator-clusterrole-binding.yaml b/stable/etcd-operator/templates/backup-operator-clusterrole-binding.yaml deleted file mode 100644 index 526b24549b..0000000000 --- a/stable/etcd-operator/templates/backup-operator-clusterrole-binding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.rbac.create .Values.deployments.backupOperator }} ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }} -metadata: - name: {{ template "etcd-backup-operator.fullname" . }} - labels: - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ template "etcd-operator.name" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -subjects: -- kind: ServiceAccount - name: {{ template "etcd-backup-operator.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "etcd-operator.fullname" . }} -{{- end }} diff --git a/stable/etcd-operator/templates/backup-operator-deployment.yaml b/stable/etcd-operator/templates/backup-operator-deployment.yaml index d5c421c1db..8b8d51b00d 100644 --- a/stable/etcd-operator/templates/backup-operator-deployment.yaml +++ b/stable/etcd-operator/templates/backup-operator-deployment.yaml @@ -1,6 +1,6 @@ {{- if .Values.deployments.backupOperator }} --- -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "etcd-backup-operator.fullname" . }} @@ -22,7 +22,7 @@ spec: app: {{ template "etcd-backup-operator.fullname" . }} release: {{ .Release.Name }} spec: - serviceAccountName: {{ template "etcd-backup-operator.serviceAccountName" . }} + serviceAccountName: {{ template "etcd-operator.serviceAccountName" . }} containers: - name: {{ .Values.backupOperator.name }} image: "{{ .Values.backupOperator.image.repository }}:{{ .Values.backupOperator.image.tag }}" @@ -49,11 +49,12 @@ spec: cpu: {{ .Values.backupOperator.resources.cpu }} memory: {{ .Values.backupOperator.resources.memory }} {{- if .Values.backupOperator.nodeSelector }} - nodeSelector: -{{ toYaml .Values.backupOperator.nodeSelector | indent 8 }} + nodeSelector: {{ toYaml .Values.backupOperator.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.backupOperator.securityContext }} + securityContext: {{ toYaml .Values.backupOperator.securityContext | nindent 8 }} {{- end }} {{- if .Values.backupOperator.tolerations }} - tolerations: -{{ toYaml .Values.backupOperator.tolerations | indent 8 }} + tolerations: {{ toYaml .Values.backupOperator.tolerations | nindent 8 }} {{- end }} {{- end }} diff --git a/stable/etcd-operator/templates/backup-operator-service-account.yaml b/stable/etcd-operator/templates/backup-operator-service-account.yaml deleted file mode 100644 index 06aec3dff3..0000000000 --- a/stable/etcd-operator/templates/backup-operator-service-account.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if and .Values.serviceAccount.backupOperatorServiceAccount.create .Values.deployments.backupOperator }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "etcd-backup-operator.serviceAccountName" . }} - labels: - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ template "etcd-backup-operator.name" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- end }} \ No newline at end of file diff --git a/stable/etcd-operator/templates/etcd-cluster-crd.yaml b/stable/etcd-operator/templates/etcd-cluster-crd.yaml index 0d385d8f6a..e309d5c6f4 100644 --- a/stable/etcd-operator/templates/etcd-cluster-crd.yaml +++ b/stable/etcd-operator/templates/etcd-cluster-crd.yaml @@ -22,4 +22,3 @@ spec: {{ toYaml .Values.etcdCluster.tls | indent 4 }} {{- end }} {{- end }} - diff --git a/stable/etcd-operator/templates/operator-deployment.yaml b/stable/etcd-operator/templates/operator-deployment.yaml index 883b709099..dc50d46ec0 100644 --- a/stable/etcd-operator/templates/operator-deployment.yaml +++ b/stable/etcd-operator/templates/operator-deployment.yaml @@ -1,6 +1,6 @@ {{- if .Values.deployments.etcdOperator }} --- -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "etcd-operator.fullname" . }} @@ -21,10 +21,7 @@ spec: labels: app: {{ template "etcd-operator.fullname" . }} release: {{ .Release.Name }} - {{- if .Values.etcdOperator.podAnnotations }} - annotations: -{{ toYaml .Values.etcdOperator.podAnnotations | indent 8}} - {{- end }} + annotations: {{ toYaml .Values.etcdOperator.podAnnotations | nindent 8}} spec: serviceAccountName: {{ template "etcd-operator.serviceAccountName" . }} containers: @@ -75,11 +72,12 @@ spec: failureThreshold: {{ .Values.etcdOperator.readinessProbe.failureThreshold }} {{- end }} {{- if .Values.etcdOperator.nodeSelector }} - nodeSelector: -{{ toYaml .Values.etcdOperator.nodeSelector | indent 8 }} + nodeSelector: {{ toYaml .Values.etcdOperator.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.etcdOperator.securityContext }} + securityContext: {{ toYaml .Values.etcdOperator.securityContext | nindent 8 }} {{- end }} {{- if .Values.etcdOperator.tolerations }} - tolerations: -{{ toYaml .Values.etcdOperator.tolerations | indent 8 }} + tolerations: {{ toYaml .Values.etcdOperator.tolerations | nindent 8 }} {{- end }} {{- end }} diff --git a/stable/etcd-operator/templates/operator-service-account.yaml b/stable/etcd-operator/templates/operator-service-account.yaml index 2faba8af81..423be9c4fe 100644 --- a/stable/etcd-operator/templates/operator-service-account.yaml +++ b/stable/etcd-operator/templates/operator-service-account.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.serviceAccount.etcdOperatorServiceAccount.create .Values.deployments.etcdOperator }} +{{- if and .Values.serviceAccount.create .Values.deployments.etcdOperator }} --- apiVersion: v1 kind: ServiceAccount @@ -9,4 +9,5 @@ metadata: app: {{ template "etcd-operator.name" . }} heritage: {{ .Release.Service }} release: {{ .Release.Name }} -{{- end }} \ No newline at end of file +imagePullSecrets: {{ toYaml .Values.global.imagePullSecrets | nindent 2 }} +{{- end }} diff --git a/stable/etcd-operator/templates/restore-etcd-crd.yaml b/stable/etcd-operator/templates/restore-etcd-crd.yaml index 73faaab887..e21f13f75b 100644 --- a/stable/etcd-operator/templates/restore-etcd-crd.yaml +++ b/stable/etcd-operator/templates/restore-etcd-crd.yaml @@ -25,4 +25,4 @@ spec: {{ toYaml .Values.etcdCluster.tls | indent 6 }} {{- end }} {{ toYaml .Values.restoreOperator.spec | indent 2 }} -{{- end}} \ No newline at end of file +{{- end}} diff --git a/stable/etcd-operator/templates/restore-operator-clusterrole-binding.yaml b/stable/etcd-operator/templates/restore-operator-clusterrole-binding.yaml deleted file mode 100644 index 9a6696ef5e..0000000000 --- a/stable/etcd-operator/templates/restore-operator-clusterrole-binding.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if and .Values.rbac.create .Values.deployments.restoreOperator }} ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }} -metadata: - name: {{ template "etcd-restore-operator.fullname" . }} - labels: - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ template "etcd-restore-operator.name" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -subjects: -- kind: ServiceAccount - name: {{ template "etcd-restore-operator.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "etcd-operator.fullname" . }} -{{- end }} diff --git a/stable/etcd-operator/templates/restore-operator-deployment.yaml b/stable/etcd-operator/templates/restore-operator-deployment.yaml index 5c4784de46..ce27f6f827 100644 --- a/stable/etcd-operator/templates/restore-operator-deployment.yaml +++ b/stable/etcd-operator/templates/restore-operator-deployment.yaml @@ -1,6 +1,6 @@ {{- if .Values.deployments.restoreOperator }} --- -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "etcd-restore-operator.fullname" . }} @@ -22,7 +22,7 @@ spec: app: {{ template "etcd-restore-operator.name" . }} release: {{ .Release.Name }} spec: - serviceAccountName: {{ template "etcd-restore-operator.serviceAccountName" . }} + serviceAccountName: {{ template "etcd-operator.serviceAccountName" . }} containers: - name: {{ .Values.restoreOperator.name }} image: "{{ .Values.restoreOperator.image.repository }}:{{ .Values.restoreOperator.image.tag }}" @@ -53,11 +53,12 @@ spec: cpu: {{ .Values.restoreOperator.resources.cpu }} memory: {{ .Values.restoreOperator.resources.memory }} {{- if .Values.restoreOperator.nodeSelector }} - nodeSelector: -{{ toYaml .Values.restoreOperator.nodeSelector | indent 8 }} + nodeSelector: {{ toYaml .Values.restoreOperator.nodeSelector | nindent 8 }} + {{- end }} + {{- if .Values.restoreOperator.securityContext }} + securityContext: {{ toYaml .Values.restoreOperator.securityContext | nindent 8 }} {{- end }} {{- if .Values.restoreOperator.tolerations }} - tolerations: -{{ toYaml .Values.restoreOperator.tolerations | indent 8 }} + tolerations: {{ toYaml .Values.restoreOperator.tolerations | nindent 8 }} {{- end }} {{- end }} diff --git a/stable/etcd-operator/templates/restore-operator-service-account.yaml b/stable/etcd-operator/templates/restore-operator-service-account.yaml deleted file mode 100644 index 595cee9231..0000000000 --- a/stable/etcd-operator/templates/restore-operator-service-account.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if and .Values.serviceAccount.restoreOperatorServiceAccount.create .Values.deployments.restoreOperator }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "etcd-restore-operator.serviceAccountName" . }} - labels: - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - app: {{ template "etcd-restore-operator.name" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- end }} \ No newline at end of file diff --git a/stable/etcd-operator/values.yaml b/stable/etcd-operator/values.yaml index d8f04abdeb..b57d760622 100644 --- a/stable/etcd-operator/values.yaml +++ b/stable/etcd-operator/values.yaml @@ -1,23 +1,22 @@ # Default values for etcd-operator. # This is a YAML-formatted file. # Declare variables to be passed into your templates. +global: + ## Reference to one or more secrets to be used when pulling images + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + imagePullSecrets: [] + # - name: "image-pull-secret" ## Install Default RBAC roles and bindings rbac: create: true - apiVersion: v1beta1 + apiVersion: v1 -## Service account names and whether to create them +## Service account name and whether to create it serviceAccount: - etcdOperatorServiceAccount: - create: true - name: - backupOperatorServiceAccount: - create: true - name: - restoreOperatorServiceAccount: - create: true - name: + create: true + name: # Select what to deploy deployments: @@ -43,7 +42,7 @@ etcdOperator: replicaCount: 1 image: repository: quay.io/coreos/etcd-operator - tag: v0.9.3 + tag: v0.9.4 pullPolicy: Always resources: cpu: 100m @@ -75,7 +74,7 @@ backupOperator: replicaCount: 1 image: repository: quay.io/coreos/etcd-operator - tag: v0.9.3 + tag: v0.9.4 pullPolicy: Always resources: cpu: 100m @@ -91,6 +90,8 @@ backupOperator: ## additional command arguments go here; will be translated to `--key=value` form ## e.g., analytics: true commandArgs: {} + securityContext: {} + tolerations: {} # restore spec restoreOperator: @@ -98,7 +99,7 @@ restoreOperator: replicaCount: 1 image: repository: quay.io/coreos/etcd-operator - tag: v0.9.3 + tag: v0.9.4 pullPolicy: Always port: 19999 resources: @@ -116,6 +117,8 @@ restoreOperator: ## additional command arguments go here; will be translated to `--key=value` form ## e.g., analytics: true commandArgs: {} + securityContext: {} + tolerations: {} ## etcd-cluster specific values etcdCluster: @@ -150,3 +153,5 @@ etcdCluster: ## Node labels for etcd pod assignment ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ nodeSelector: {} + securityContext: {} + tolerations: {}