From 7d7b00a70c6ee5b5f341f6c4177b74b3232dd0a7 Mon Sep 17 00:00:00 2001 From: Bruno Amaral Date: Thu, 19 Sep 2019 19:44:57 -0300 Subject: [PATCH] incubator/rundeck (#16007) * [stable/nginx-ingress] document default value of `serviceAccount.create` (#15966) * stable/nginx-ingress: document default value of `serviceAccount.create` Signed-off-by: Alexander Schramm * chore: bump chart version Signed-off-by: Alexander Schramm Signed-off-by: Bruno Amaral * incubator/azuremonitor-containers - July 2019 chart release (#15771) * Signed-off-by: Vishwanath Narasimhan July agent release * Fix readme. Signed-off-by: Vishwanath Narasimhan Signed-off-by: Bruno Amaral * [stable/prometheus-mongodb-exporter] Add Service object for ServiceMonitor to work properly (#15218) * Add Service object Signed-off-by: Roman Komkov * Revert some changes from #12796 Signed-off-by: Roman Komkov Signed-off-by: Bruno Amaral * Add adminUser var to set the admin user on realm.properties. Signed-off-by: Bruno Amaral * Set RUNDECK_GRAILS_URL on the deployment.yml Signed-off-by: Bruno Amaral * Add adminUser variable Signed-off-by: Bruno Amaral * Update chart version on Chart.yml Signed-off-by: Bruno Amaral * Update incubator/rundeck/templates/deployment.yaml. Set identation. Signed-off-by: Bruno Amaral * Add awsVolumeID to optionally save Rundeck data on an AWS EBS volume Signed-off-by: Bruno Amaral * Add rundeck.awsVolumeId variable Signed-off-by: Bruno Amaral --- incubator/rundeck/Chart.yaml | 2 +- incubator/rundeck/README.md | 2 ++ incubator/rundeck/templates/_helpers.tpl | 2 +- incubator/rundeck/templates/deployment.yaml | 19 ++++++++++++++++--- incubator/rundeck/values.yaml | 2 ++ 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/incubator/rundeck/Chart.yaml b/incubator/rundeck/Chart.yaml index 8deda0886d..534d8bcd81 100644 --- a/incubator/rundeck/Chart.yaml +++ b/incubator/rundeck/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 description: A Rundeck chart for Kubernetes name: rundeck home: https://github.com/rundeck/rundeck -version: 0.1.0 +version: 0.1.1 appVersion: 3.0.16 keywords: - rundeck diff --git a/incubator/rundeck/README.md b/incubator/rundeck/README.md index 7ad13036f8..8e7fd56e43 100644 --- a/incubator/rundeck/README.md +++ b/incubator/rundeck/README.md @@ -22,6 +22,8 @@ service.type | The kubernetes service type to use. | ClusterIP service.port | The tcp port the service should listen on. | 80 ingress | Any ingress rules to apply. | None resources | Any resource constraints to apply. | None +rundeck.adminUser | The config to set up the admin user that should be placed at the realm.properties file. | "admin:admin,user,admin,architect,deploy,build" rundeck.env | The rundeck environment variables that you would want to set | Default variables provided in docker file rundeck.sshSecrets | A reference to the Kubernetes Secret that contains the ssh keys. | "" rundeck.awsCredentialsSecret | A reference to the Kubernetes Secret that contains the aws credentials. | "" +rundeck.awsVolumeId | A Volume ID from a pre-existent AWS EBS volume to persist Rundeck data from /home/rundeck/server/data path. | "" diff --git a/incubator/rundeck/templates/_helpers.tpl b/incubator/rundeck/templates/_helpers.tpl index c9adb0328c..f72a11fc93 100644 --- a/incubator/rundeck/templates/_helpers.tpl +++ b/incubator/rundeck/templates/_helpers.tpl @@ -29,4 +29,4 @@ Create chart name and version as used by the chart label. */}} {{- define "rundeck.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/incubator/rundeck/templates/deployment.yaml b/incubator/rundeck/templates/deployment.yaml index 20b19db4f1..44c963f81b 100644 --- a/incubator/rundeck/templates/deployment.yaml +++ b/incubator/rundeck/templates/deployment.yaml @@ -19,6 +19,8 @@ spec: app.kubernetes.io/name: {{ include "rundeck.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: + securityContext: + fsGroup: 1000 containers: - name: nginx image: nginx:stable @@ -41,9 +43,13 @@ spec: initialDelaySeconds: 10 periodSeconds: 5 volumeMounts: - - name: nginx-config - mountPath: /etc/nginx + - name: nginx-config + mountPath: /etc/nginx - name: {{ .Chart.Name }} + command: + - /bin/sh + - -c + - echo {{ .Values.rundeck.adminUser }} > /home/rundeck/server/config/realm.properties && /home/rundeck/docker-lib/entry.sh image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} envFrom: @@ -51,7 +57,7 @@ spec: name: {{ .Release.Name }}-environment-configmap env: - name: RUNDECK_GRAILS_URL - value: "http://{{ include "rundeck.name" . }}.{{ .Release.Namespace }}.svc.cluster.local" + value: {{ .Values.rundeck.env.RUNDECK_GRAILS_URL }} - name: RUNDECK_SERVER_FORWARDED value: "true" - name: RUNDECK_LOGGING_STRATEGY @@ -95,7 +101,14 @@ spec: - key: nginx.conf path: nginx.conf - name: data + {{- if .Values.rundeck.awsVolumeId }} + # This AWS EBS volume must already exist. + awsElasticBlockStore: + volumeID: {{ .Values.rundeck.awsVolumeId }} + fsType: ext4 + {{- else }} emptyDir: {} + {{- end }} {{- if .Values.rundeck.sshSecrets }} - name: sshkeys secret: diff --git a/incubator/rundeck/values.yaml b/incubator/rundeck/values.yaml index 3a8b38068c..df2cd3edd8 100644 --- a/incubator/rundeck/values.yaml +++ b/incubator/rundeck/values.yaml @@ -10,6 +10,7 @@ image: pullPolicy: IfNotPresent rundeck: + adminUser: "admin:admin,user,admin,architect,deploy,build" env: RUNDECK_GRAILS_URL: "http://{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local" RUNDECK_SERVER_FORWARDED: "true" @@ -25,6 +26,7 @@ rundeck: # RUNDECK_CONFIG_STORAGE_CONVERTER_1_CONFIG_PASSWORD: ${RUNDECK_STORAGE_PASSWORD} # sshSecrets: "ssh-secret" awsCredentialsSecret: "" + awsVolumeId: "" nameOverride: "" fullnameOverride: ""