From abb825e96fcd6806512aa69dfac7ff828631ed98 Mon Sep 17 00:00:00 2001 From: Dipta Das Date: Wed, 14 Mar 2018 14:48:33 +0600 Subject: [PATCH] Published chart for voyager v6.0.0 (#4149) --- stable/voyager/Chart.yaml | 4 ++-- stable/voyager/README.md | 9 +++++---- stable/voyager/templates/_helpers.tpl | 11 +++++++++++ stable/voyager/templates/apiregistration.yaml | 7 +++---- .../voyager/templates/cluster-role-binding.yaml | 2 +- stable/voyager/templates/deployment.yaml | 2 +- stable/voyager/templates/service-account.yaml | 4 ++-- stable/voyager/templates/user-roles.yaml | 10 ++++++---- stable/voyager/values.yaml | 17 +++++++++++------ 9 files changed, 42 insertions(+), 24 deletions(-) diff --git a/stable/voyager/Chart.yaml b/stable/voyager/Chart.yaml index 4cd026a6e6..288e394a70 100755 --- a/stable/voyager/Chart.yaml +++ b/stable/voyager/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v1 description: 'Voyager by AppsCode - Secure Ingress Controller for Kubernetes' icon: https://cdn.appscode.com/images/icon/voyager.png name: voyager -version: 3.1.0 -appVersion: 6.0.0-rc.0 +version: 3.2.0 +appVersion: 6.0.0 sources: - https://github.com/appscode/voyager maintainers: diff --git a/stable/voyager/README.md b/stable/voyager/README.md index 08c983762a..226979643f 100644 --- a/stable/voyager/README.md +++ b/stable/voyager/README.md @@ -43,8 +43,8 @@ The following tables lists the configurable parameters of the Voyager chart and | Parameter | Description | Default | | -----------------------------------| ------------------------------------------------------------- | ----------------------| | `dockerRegistry` | Docker registry used to pull Voyager related images | `appscode` | -| `imageTags.voyager` | Tag of Voyager operator image | `6.0.0-rc.0` | -| `imageTags.haproxy` | Tag of HAProxy container image | `1.7.9-6.0.0-rc.0` | +| `imageTags.voyager` | Tag of Voyager operator image | `6.0.0` | +| `imageTags.haproxy` | Tag of HAProxy container image | `1.7.10-6.0.0` | | `imagePullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) | | `imagePullPolicy` | Image pull policy | `IfNotPresent` | | `cloudProvider` | Name of cloud provider | `nil` | @@ -54,8 +54,9 @@ The following tables lists the configurable parameters of the Voyager chart and | `persistence.enabled` | Enable mounting cloud config | `false` | | `persistence.hostPath` | Host mount path for cloud config | `/etc/kubernetes` | | `nodeSelector` | Node labels for pod assignment | `{}` | -| `rbac.create` | install required rbac service account, roles and rolebindings | `false` | -| `rbac.serviceAccountName` | ServiceAccount Voyager will use (ignored if rbac.create=true) | `default` | +| `rbac.create` | If `true`, create and use RBAC resources | `true` | +| `serviceAccount.create` | If `true`, create a new service account | `true` | +| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | `` | | `ingressClass` | Ingress class to watch for. If empty, it handles all ingress | `` | | `apiserver.groupPriorityMinimum` | The minimum priority the group should have. | 10000 | | `apiserver.versionPriority` | The ordering of this API inside of the group. | 15 | diff --git a/stable/voyager/templates/_helpers.tpl b/stable/voyager/templates/_helpers.tpl index fac1747be1..c7ab644454 100644 --- a/stable/voyager/templates/_helpers.tpl +++ b/stable/voyager/templates/_helpers.tpl @@ -14,3 +14,14 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s" $name .Release.Name | trunc 63 -}} {{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "voyager.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "voyager.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/stable/voyager/templates/apiregistration.yaml b/stable/voyager/templates/apiregistration.yaml index 6fb6891ca4..222a23b334 100644 --- a/stable/voyager/templates/apiregistration.yaml +++ b/stable/voyager/templates/apiregistration.yaml @@ -1,6 +1,5 @@ {{- $ca := genCA "svc-cat-ca" 3650 }} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- $cn := printf "%s-%s" $name .Release.Name | trunc 63 -}} +{{- $cn := include "voyager.fullname" . -}} {{- $altName1 := printf "%s.%s" $cn .Release.Namespace }} {{- $altName2 := printf "%s.%s.svc" $cn .Release.Namespace }} {{- $cert := genSignedCert $cn nil (list $altName1 $altName2) 3650 $ca }} @@ -55,7 +54,7 @@ roleRef: name: extension-apiserver-authentication-reader subjects: - kind: ServiceAccount - name: {{ template "voyager.fullname" . }} + name: {{ template "voyager.serviceAccountName" . }} namespace: {{ .Release.Namespace }} --- # to delegate authentication and authorization @@ -74,6 +73,6 @@ roleRef: name: system:auth-delegator subjects: - kind: ServiceAccount - name: {{ template "voyager.fullname" . }} + name: {{ template "voyager.serviceAccountName" . }} namespace: {{ .Release.Namespace }} {{ end }} \ No newline at end of file diff --git a/stable/voyager/templates/cluster-role-binding.yaml b/stable/voyager/templates/cluster-role-binding.yaml index f0b5e46661..18d651681f 100644 --- a/stable/voyager/templates/cluster-role-binding.yaml +++ b/stable/voyager/templates/cluster-role-binding.yaml @@ -14,6 +14,6 @@ roleRef: name: {{ template "voyager.fullname" . }} subjects: - kind: ServiceAccount - name: {{ template "voyager.fullname" . }} + name: {{ template "voyager.serviceAccountName" . }} namespace: {{ .Release.Namespace }} {{ end }} diff --git a/stable/voyager/templates/deployment.yaml b/stable/voyager/templates/deployment.yaml index f7f5db07fe..0736b7cd11 100644 --- a/stable/voyager/templates/deployment.yaml +++ b/stable/voyager/templates/deployment.yaml @@ -23,7 +23,7 @@ spec: scheduler.alpha.kubernetes.io/critical-pod: '' {{- end }} spec: - serviceAccountName: {{ if .Values.rbac.create }}{{ template "voyager.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} + serviceAccountName: {{ template "voyager.serviceAccountName" . }} {{- if .Values.imagePullSecrets }} imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 6 }} diff --git a/stable/voyager/templates/service-account.yaml b/stable/voyager/templates/service-account.yaml index e0da2652ed..06a92601a5 100644 --- a/stable/voyager/templates/service-account.yaml +++ b/stable/voyager/templates/service-account.yaml @@ -1,8 +1,8 @@ -{{ if .Values.rbac.create }} +{{ if .Values.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ template "voyager.fullname" . }} + name: {{ template "voyager.serviceAccountName" . }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" app: "{{ template "voyager.name" . }}" diff --git a/stable/voyager/templates/user-roles.yaml b/stable/voyager/templates/user-roles.yaml index cc58f3c90c..96c876d95a 100644 --- a/stable/voyager/templates/user-roles.yaml +++ b/stable/voyager/templates/user-roles.yaml @@ -8,9 +8,10 @@ metadata: rbac.authorization.k8s.io/aggregate-to-edit: "true" rules: - apiGroups: - - "voyager.appscode.com" + - voyager.appscode.com resources: - - "*" + - certificates + - ingresses verbs: - create - delete @@ -29,9 +30,10 @@ metadata: rbac.authorization.k8s.io/aggregate-to-view: "true" rules: - apiGroups: - - "voyager.appscode.com" + - voyager.appscode.com resources: - - "*" + - certificates + - ingresses verbs: - get - list diff --git a/stable/voyager/values.yaml b/stable/voyager/values.yaml index 1f9b87abb6..1bf464b68a 100644 --- a/stable/voyager/values.yaml +++ b/stable/voyager/values.yaml @@ -6,9 +6,9 @@ dockerRegistry: appscode ## Tags for Docker images imageTags: ## Docker image tag containing Voyager - voyager: 6.0.0-rc.0 + voyager: 6.0.0 ## Docker image tag containing HAProxy binary - haproxy: 1.7.9-6.0.0-rc.0 + haproxy: 1.7.10-6.0.0 ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. ## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod @@ -40,10 +40,15 @@ nodeSelector: {} ## Install Default RBAC roles and bindings rbac: - ## If true, create & use RBAC resources - create: false - ## Ignored if rbac.create is true - serviceAccountName: default + # Specifies whether RBAC resources should be created + create: true + +serviceAccount: + # Specifies whether a ServiceAccount should be created + create: true + # The name of the ServiceAccount to use. + # If not set and create is true, a name is generated using the fullname template + name: # this flag can be set to 'voyager' to handle only ingress # with annotation kubernetes.io/ingress.class=voyager.