[stable/drone] Drone 2.0.0 rc 8 - Creates source-control secret (#11619)

* value provides the drone shared secret

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* Update Chart.yaml

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* fix template path

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* Add full-name-source-control secret if sourceControl.secret is not definded.

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* use same key defined

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* add secret field and description

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* helm hint valid

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* Update Chart.yaml

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* singedcommit

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* fix chart yaml error

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* fix fw port to pod 80

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* Update Chart.yaml

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* Update Chart.yaml

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* Update secret documentation, clearer now.

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* rename checksum secret file to secrets.yaml

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* rename secrets file back to original name

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* Merge secret-providers in the single checksumed file

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>

* Update secret field name

Signed-off-by: nicolas kowenski <zakkg3@gmail.com>
This commit is contained in:
Nicolas Kowenski
2019-04-04 00:30:50 -07:00
committed by Kubernetes Prow Robot
parent 703fd96ddd
commit ec2f74c540
4 changed files with 32 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
name: drone
home: https://drone.io/
icon: https://drone.io/apple-touch-icon.png
version: 2.0.0-rc.8
version: 2.0.0-rc.9
appVersion: 1.0.0-rc.5
description: Drone is a Continuous Delivery system built on container technology
keywords:
+1 -1
View File
@@ -29,7 +29,7 @@ Get the Drone URL by running:
Get the Drone URL by running:
export POD_NAME=$(kubectl get pods -n {{ .Release.Namespace }} -l "component=server,app={{ template "drone.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo http://127.0.0.1:8000/
kubectl -n {{ .Release.Namespace }} port-forward $POD_NAME 8000:8000
kubectl -n {{ .Release.Namespace }} port-forward $POD_NAME 8000:80
{{- end }}
{{- else -}}
##############################################################################
+23
View File
@@ -14,3 +14,26 @@ data:
{{ else }}
secret: "{{ randAlphaNum 24 | b64enc }}"
{{ end }}
---
{{- if not .Values.sourceControl.secret -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "drone.sourceControlSecret" . }}
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
{{if .Values.sourceControl.provider}}
{{ if eq .Values.sourceControl.provider "github" }}
{{ .Values.sourceControl.github.clientSecretKey }}: {{ .Values.sourceControl.github.clientSecretValue | b64enc | quote }}
{{- else if eq .Values.sourceControl.provider "gitlab" -}}
{{ .Values.sourceControl.gitlab.clientSecretKey }}: {{ .Values.sourceControl.gitlab.clientSecretValue | b64enc | quote }}
{{- else if eq .Values.sourceControl.provider "bitbucketCloud" -}}
{{ .Values.sourceControl.bitbucketCloud.clientSecretKey }}: {{ .Values.sourceControl.bitbucketCloud.clientSecretValue | b64enc | quote }}
{{ end }}
{{ end }}
{{- end -}}
+7 -3
View File
@@ -80,15 +80,18 @@ sourceControl:
secret:
## Fill in the correct values for your chosen source control provider
## Any key in this list with the suffix `Key` will be fetched from the
## secret named above, if not provided the secret will default to
## `<fullName>-source-control`
## secret named above, if not provided the secret it will be created as
## `<fullName>-source-control` using for the key "ClientSecretKey" and
# "clientSecretValue" for the value. Be awere to not leak shis file with your password
github:
clientID:
clientSecretKey: clientSecret
clientSecretValue:
server: https://github.com
gitlab:
clientID:
clientSecretKey: clientSecret
clientSecretValue:
server:
gitea:
server:
@@ -96,7 +99,8 @@ sourceControl:
server:
bitbucketCloud:
clientID:
clientSecret: clientSecret
clientSecretKey: clientSecret
clientSecretValue:
bitbucketServer:
server:
consumerKey: consumerKey