[stable/drone] added the ability to override DRONE_RPC_SERVER (#19429)

* added the ability to overwrite DRONE_RPC_SERVER by setting Values.agent.rpcServerOverwrite: http://server

Signed-off-by: Davíð Örn Jóhannsson @davideagle <davideaglephotos@gmail.com>

version bump and rename

Signed-off-by: Davíð Örn Jóhannsson @davideagle <davideaglephotos@gmail.com>

* added quotes around DRONE_RPC_SERVER value

Signed-off-by: Davíð Örn Jóhannsson @davideagle <davideaglephotos@gmail.com>
This commit is contained in:
davideagle
2019-12-09 01:58:01 -08:00
committed by Kubernetes Prow Robot
parent f6e5784f26
commit ec227e1bcb
4 changed files with 15 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
name: drone
home: https://drone.io/
icon: https://drone.io/apple-touch-icon.png
version: 2.3.1
version: 2.3.2
appVersion: 1.6.1
description: Drone is a Continuous Delivery system built on container technology
keywords:
+1
View File
@@ -109,6 +109,7 @@ The following table lists the configurable parameters of the drone charts and th
| `agent.readinessProbe` | Not currently used | `{}` |
| `agent.volumes` | Additional volumes to make available to agent (shared by dind if used) | `nil` |
| `agent.volumeMounts` | Mount points for volumes | `nil` |
| `agent.rpcServerOverride` | Override rpc server url | `nil` |
| `dind.enabled` | Enable or disable **DinD** | `true` |
| `dind.driver` | **DinD** storage driver | `overlay2` |
| `dind.volumeMounts` | Mount points for volumes (defined in agent.volumes) | `nil` |
+12 -1
View File
@@ -14,6 +14,17 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{ printf "%s-%s" .Release.Name $name | trunc 63 -}}
{{ end }}
{{/*
Allow overwrite of rpc server.
*/}}
{{ define "drone.rpcServer" }}
{{- if .Values.agent.rpcServerOverride -}}
{{ .Values.agent.rpcServerOverride }}
{{- else -}}
{{ printf "http://%s" (include "drone.fullname" .) }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
@@ -46,4 +57,4 @@ Create the name of the service account to use for kubernetes pipelines
{{- else -}}
{{ default "default" .Values.server.kubernetes.pipelineServiceAccount }}
{{- end -}}
{{- end -}}
{{- end -}}
+1 -1
View File
@@ -54,7 +54,7 @@ spec:
protocol: TCP
env:
- name: DRONE_RPC_SERVER
value: http://{{ template "drone.fullname" . }}
value: "{{ template "drone.rpcServer" . }}"
- name: DRONE_RPC_SECRET
valueFrom:
secretKeyRef: