From 68d5cf81968b9b430733e13cb1a96bb00f7edb72 Mon Sep 17 00:00:00 2001 From: JSchlarb Date: Thu, 30 May 2019 11:18:23 +0200 Subject: [PATCH] [stable/drone] Fix DRONE_STASH_PRIVATE_KEY, correct bitbucketServer params (#12933) Signed-off-by: Julian Schlarb --- stable/drone/Chart.yaml | 2 +- stable/drone/templates/_provider-envs.yaml | 9 +++------ stable/drone/templates/deployment-server.yaml | 17 +++++++++++++++-- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/stable/drone/Chart.yaml b/stable/drone/Chart.yaml index c3aeda7d738e..65b8d477aec4 100644 --- a/stable/drone/Chart.yaml +++ b/stable/drone/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 name: drone home: https://drone.io/ icon: https://drone.io/apple-touch-icon.png -version: 2.0.0-rc.13 +version: 2.0.0-rc.14 appVersion: 1.0.0-rc.5 description: Drone is a Continuous Delivery system built on container technology keywords: diff --git a/stable/drone/templates/_provider-envs.yaml b/stable/drone/templates/_provider-envs.yaml index d60cf3abeb91..693e9820d65a 100644 --- a/stable/drone/templates/_provider-envs.yaml +++ b/stable/drone/templates/_provider-envs.yaml @@ -47,17 +47,14 @@ valueFrom: secretKeyRef: name: {{ template "drone.sourceControlSecret" . }} - key: {{ .Values.sourceControl.bitbucketCloud.passwordKey }} + key: {{ .Values.sourceControl.bitbucketServer.passwordKey }} - name: DRONE_STASH_CONSUMER_KEY valueFrom: secretKeyRef: name: {{ template "drone.sourceControlSecret" . }} - key: {{ .Values.sourceControl.bitbucketCloud.consumerKey }} + key: {{ .Values.sourceControl.bitbucketServer.consumerKey }} - name: DRONE_STASH_PRIVATE_KEY - valueFrom: - secretKeyRef: - name: {{ template "drone.sourceControlSecret" . }} - key: {{ .Values.sourceControl.bitbucketCloud.privateKey }} + value: /etc/bitbucket/key.pem {{- end -}} {{- end -}} diff --git a/stable/drone/templates/deployment-server.yaml b/stable/drone/templates/deployment-server.yaml index 75baf9ca7769..edc6917e3e3d 100644 --- a/stable/drone/templates/deployment-server.yaml +++ b/stable/drone/templates/deployment-server.yaml @@ -102,12 +102,25 @@ spec: resources: {{ toYaml .Values.server.resources | indent 10 }} volumeMounts: - - name: data - mountPath: /var/lib/drone + {{ if eq .Values.sourceControl.provider "bitbucketServer" -}} + - name: bitbucket-private-key + mountPath: /etc/bitbucket + readOnly: true + {{ end }} + - name: data + mountPath: /var/lib/drone {{- with .Values.server.extraContainers }} {{ tpl . $ | indent 6 }} {{- end }} volumes: + {{ if eq .Values.sourceControl.provider "bitbucketServer" -}} + - name: bitbucket-private-key + secret: + secretName: {{ template "drone.sourceControlSecret" . }} + items: + - key: {{ .Values.sourceControl.bitbucketServer.privateKey }} + path: key.pem + {{ end -}} - name: data {{- if .Values.persistence.enabled }} persistentVolumeClaim: