[stable/drone] Update drone to support v1 release candidate (#10614)

* Update drone to support v1 release candidate

This is a set of breaking changes that brings drone v1 support to the
chart. drone v1 itself is a breaking change and brings along native
kubernetes support.

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>

* update chart app version to be accurate

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>

* add newlines to the end of files

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>

* remove $ from commands (markdown lint)

Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
This commit is contained in:
Paul Czarkowski
2019-01-23 08:48:42 -08:00
committed by Kubernetes Prow Robot
parent a20c654ceb
commit b2425d3e1e
15 changed files with 399 additions and 95 deletions
+4 -2
View File
@@ -1,8 +1,8 @@
name: drone
home: https://drone.io/
icon: https://drone.io/apple-touch-icon.png
version: 1.7.5
appVersion: 0.8.9
version: 2.0.0-rc.1
appVersion: 1.0.0-rc.4
description: Drone is a Continuous Delivery system built on container technology
keywords:
- continuous-delivery
@@ -17,3 +17,5 @@ sources:
maintainers:
- name: christian-roggia
email: christian.roggia@gmail.com
- name: paulczar
email: username.taken@gmail.com
+43 -15
View File
@@ -1,11 +1,13 @@
# Drone.io
[Drone](http://readme.drone.io/) is a Continuous Integration platform built on container technology.
[Drone](http://readme.drone.io/) v1 is a Continuous Integration platform built on container technology with native Kubernetes support.
> It is not recommended to upgrade from earlier (0.8.x) versions of Drone due to the large amount of breaking changes both in the product and in the helm charts.
## TL;DR;
```console
$ helm install stable/drone
helm install stable/drone
```
## Installing the Chart
@@ -13,7 +15,26 @@ $ helm install stable/drone
To install the chart with the release name `my-release`:
```console
$ helm install --name my-release stable/drone
helm install --name my-release stable/drone
```
> note: The chart will not install the drone server until you have configured a source control option. If this is the case it will print out notes on how to configure it in place using `helm upgrade`.
An example (secrets redacted) working install of the chart using github as the source control provider:
```console
helm install --name drone --namespace drone stable/drone
kubectl create secret generic drone-server-secrets \
--namespace=cicd-drone \
--from-literal=clientSecret="XXXXXXXXXXXXXXXXXXXXXXXX"
helm upgrade drone \
--reuse-values --set 'service.type=LoadBalancer' \
--set 'service.loadBalancerIP=2.1.60.3' --set 'sourceControl.provider=github' \
--set 'sourceControl.github.clientID=XXXXXXXX' \
--set 'sourceControl.secret=drone-server-secrets' --set 'server.host=drone.example.com' \
stable/drone
```
## Uninstalling the Chart
@@ -21,7 +42,7 @@ $ helm install --name my-release stable/drone
To uninstall/delete the `my-release` deployment:
```console
$ helm delete my-release
helm delete --purge my-release
```
The command removes nearly all the Kubernetes components associated with the
@@ -50,9 +71,24 @@ The following table lists the configurable parameters of the drone charts and th
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.hosts` | Ingress accepted hostnames | `nil` |
| `ingress.tls` | Ingress TLS configuration | `[]` |
| `server.host` | Drone **server** scheme and hostname | `(internal hostname)` |
| `sourceControl.provider` | name of source control provider [github,gitlab,gitea,gogs,bitbucketCloud,bitbucketServer] | `` |
| `sourceControl.secret` | name of secret containing source control keys and passwords | `` |
| `sourceControl.github` | values to configure github | see values.yaml |
| `sourceControl.gitlab` | values to configure gitlab | see values.yaml |
| `sourceControl.gitea` | values to configure gitea | see values.yaml |
| `sourceControl.gogs` | values to configure gogs | see values.yaml |
| `sourceControl.bitbucketCloud` | values to configure bitbucket cloud | see values.yaml |
| `sourceControl.bitbucketServer` | values to configure bitbucket server (stash) | see values.yaml |
| `server.host` | Drone **server** hostname (should match callback url in oauth config) | `(internal hostname)` |
| `server.protocol` | Drone **server** scheme/protocol [http,https] | `http` |
| `server.env` | Drone **server** environment variables | `(default values)` |
| `server.envSecrets`        | Drone **server** secret environment variables                                                 | `(default values)`         |
| `server.adminUser`        | Initial user to create and set as admin                                                 | ``         |
| `server.alwaysAuth`        | whether to authenticate when cloning public repositories                                                 | `false`         |
| `server.kubernetes.enabled`        | whether to use kubernetes to run pipelines (if `false` will run agents instead)                                            | `true`         |
| `server.kubernetes.namespace`        | namespace in which to run pipelines, defaults to release namespace.                                            | ``         |
| `server.kubernetes.pipelineServiceAccount`        | if rbac is enabled, what should name of pipeline service account be?                                            | ``         |
| `server.annotations` | Drone **server** annotations | `{}` |
| `server.resources` | Drone **server** pod resource requests & limits | `{}` |
| `server.schedulerName` | Drone **server** alternate scheduler name | `nil` |
@@ -67,16 +103,8 @@ The following table lists the configurable parameters of the drone charts and th
| `agent.schedulerName` | Drone **agent** alternate scheduler name | `nil` |
| `agent.affinity` | Drone **agent** scheduling preferences | `{}` |
| `agent.nodeSelector` | Drone **agent** node labels for pod assignment | `{}` |
| `agent.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | 0 |
| `agent.livenessProbe.periodSeconds` | How often to perform the probe | 10 |
| `agent.livenessProbe.timeoutSeconds` | When the probe times out | 1 |
| `agent.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `agent.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 |
| `agent.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | 0 |
| `agent.readinessProbe.periodSeconds` | How often to perform the probe | 10 |
| `agent.readinessProbe.timeoutSeconds` | When the probe times out | 1 |
| `agent.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | 1 |
| `agent.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | 3 |
| `agent.livenessProbe` | Not currently used. | `{}` |
| `agent.readinessProbe` | Not currently used | `{}` |
| `dind.enabled` | Enable or disable **DinD** | `true` |
| `dind.driver` | **DinD** storage driver | `overlay2` |
| `dind.resources` | **DinD** pod resource requests & limits | `{}` |
+18 -8
View File
@@ -1,4 +1,4 @@
{{- if hasKey .Values.server.env "DRONE_PROVIDER" }}
{{- if eq (include "drone.providerOK" .) "true" }}
*********************************************************************************
*** PLEASE BE PATIENT: drone may take a few minutes to install ***
*********************************************************************************
@@ -41,15 +41,13 @@ control provider:
kubectl create secret generic drone-server-secrets \
--namespace={{ .Release.Namespace }} \
--from-literal=DRONE_GITHUB_SECRET="github-oauth2-client-secret"
--from-literal=clientSecret="github-oauth2-client-secret"
helm upgrade {{ .Release.Name }} \
--reuse-values \
--set 'server.env.DRONE_PROVIDER="github"' \
--set 'server.env.DRONE_GITHUB="true"' \
--set 'server.env.DRONE_ORGS="my-github-org"' \
--set 'server.env.DRONE_GITHUB_CLIENT="github-oauth2-client-id"' \
--set 'server.envSecrets.drone-server-secrets[0]=DRONE_GITHUB_SECRET' \
--set 'sourceControl.provider=github' \
--set 'sourceControl.github.clientID=github-oauth2-client-id' \
--set 'souceControl.secret=drone-server-secrets' \
stable/drone
Currently supported providers:
@@ -60,10 +58,22 @@ Currently supported providers:
- Gogs
- Bitbucket Cloud
- Bitbucket Server (Stash)
- Coding
See the values.yaml file to see what values are required for each provider.
If you are having trouble with the configuration of a provider please visit
the official documentation:
http://docs.drone.io/installation/
{{- end }}
{{ if not .Values.server.kubernetes.enabled }}
##############################################################################
#### WARNING: running drone in kubernetes with legacy pipeline execution ####
##############################################################################
By setting `server.kubernetes.enabled=false` you've disabled kubernetes
pipelines and are instead using the legacy agent method which utilizes
either docker-in-docker or host mounting in the docker socket. This is
not recommended due to the additional security concerns.
{{- end }}
+23
View File
@@ -24,3 +24,26 @@ Create the name of the service account to use
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the secret for source control
*/}}
{{- define "drone.sourceControlSecret" -}}
{{- if .Values.sourceControl.secret -}}
{{ printf "%s" .Values.sourceControl.secret }}
{{- else -}}
{{ printf "%s-%s" (include "drone.fullname" .) "source-control" | trunc 63 -}}
{{- end -}}
{{- end -}}
{{/*
Create the name of the service account to use for kubernetes pipelines
*/}}
{{- define "drone.pipelineServiceAccount" -}}
{{- if .Values.serviceAccount.create -}}
{{- $psa := printf "%s-%s" (include "drone.serviceAccountName" .) "pipeline" | trunc 63 -}}
{{ default $psa .Values.server.kubernetes.pipelineServiceAccount }}
{{- else -}}
{{ default "default" .Values.server.kubernetes.pipelineServiceAccount }}
{{- end -}}
{{- end -}}
@@ -0,0 +1,95 @@
{{- define "drone.providerEnvs" -}}
{{- if eq .Values.sourceControl.provider "github" -}}
- name: DRONE_GITHUB_CLIENT_ID
value: {{ .Values.sourceControl.github.clientID }}
- name: DRONE_GITHUB_SERVER
value: {{ .Values.sourceControl.github.server }}
- name: DRONE_GITHUB_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "drone.sourceControlSecret" . }}
key: {{ .Values.sourceControl.github.clientSecretKey }}
{{- end -}}
{{- if eq .Values.sourceControl.provider "gitlab" -}}
- name: DRONE_GITLAB_CLIENT_ID
value: {{ .Values.sourceControl.gitlab.clientID }}
- name: DRONE_GITLAB_SERVER
value: {{ .Values.sourceControl.gitlab.server }}
- name: DRONE_GITLAB_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "drone.sourceControlSecret" . }}
key: {{ .Values.sourceControl.gitlab.clientSecretKey }}
{{- end -}}
{{- if eq .Values.sourceControl.provider "gitea" -}}
- name: DRONE_GITEA_SERVER
value: {{ .Values.sourceControl.gitea.server }}
{{- end -}}
{{- if eq .Values.sourceControl.provider "gogs" -}}
- name: DRONE_GOGS_SERVER
value: {{ .Values.sourceControl.gogs.server }}
{{- end -}}
{{- if eq .Values.sourceControl.provider "bitbucketCloud" -}}
- name: DRONE_BITBUCKET_CLIENT_ID
value: {{ .Values.sourceControl.bitbucketCloud.clientID }}
- name: DRONE_BITBUCKET_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ template "drone.sourceControlSecret" . }}
key: {{ .Values.sourceControl.bitbucketCloud.clientSecretKey }}
{{- end -}}
{{- if eq .Values.sourceControl.provider "bitbucketServer" -}}
- name: DRONE_STASH_SERVER
value: {{ .Values.sourceControl.bitbucketServer.server }}
- name: DRONE_GIT_USERNAME
value: {{ .Values.sourceControl.bitbucketServer.username }}
- name: DRONE_GIT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "drone.sourceControlSecret" . }}
key: {{ .Values.sourceControl.bitbucketCloud.passwordKey }}
- name: DRONE_STASH_CONSUMER_KEY
valueFrom:
secretKeyRef:
name: {{ template "drone.sourceControlSecret" . }}
key: {{ .Values.sourceControl.bitbucketCloud.consumerKey }}
- name: DRONE_STASH_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: {{ template "drone.sourceControlSecret" . }}
key: {{ .Values.sourceControl.bitbucketCloud.privateKey }}
{{- end -}}
{{- end -}}
{{/*
Check if a valid source control provider has been set
*/}}
{{- define "drone.providerOK" -}}
{{- if .Values.sourceControl.provider -}}
{{- if eq .Values.sourceControl.provider "github" -}}
{{- if and .Values.sourceControl.github.server .Values.sourceControl.github.clientID -}}
true
{{- end -}}
{{- else if eq .Values.sourceControl.provider "gitlab" -}}
{{- if and .Values.sourceControl.gitlab.server .Values.sourceControl.gitlab.clientID -}}
true
{{- end -}}
{{- else if eq .Values.sourceControl.provider "gitea" -}}
{{- if .Values.sourceControl.gitea.server -}}
true
{{- end -}}
{{- else if eq .Values.sourceControl.provider "gogs" -}}
{{- if .Values.sourceControl.gogs.server -}}
true
{{- end -}}
{{- else if eq .Values.sourceControl.provider "bitbucketCloud" -}}
{{- if .Values.sourceControl.bitbucketCloud.clientID -}}
true
{{- end -}}
{{- else if eq .Values.sourceControl.provider "bitbucketServer" -}}
{{- if and .Values.sourceControl.bitbucketServer.server .Values.sourceControl.bitbucketServer.username -}}
true
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
+5 -25
View File
@@ -1,3 +1,4 @@
{{- if not .Values.server.kubernetes.enabled -}}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
@@ -43,9 +44,9 @@ spec:
containerPort: 3000
protocol: TCP
env:
- name: DRONE_SERVER
value: {{ template "drone.fullname" . }}:9000
- name: DRONE_SECRET
- name: DRONE_RPC_SERVER
value: {{ template "drone.fullname" . }}-grpc:9000
- name: DRONE_RPC_SECRET
valueFrom:
secretKeyRef:
name: {{ template "drone.fullname" . }}
@@ -58,28 +59,6 @@ spec:
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.agent.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: "/healthz"
port: http
initialDelaySeconds: {{ .Values.agent.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.agent.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.agent.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.agent.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.agent.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.agent.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: "/healthz"
port: http
initialDelaySeconds: {{ .Values.agent.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.agent.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.agent.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.agent.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.agent.readinessProbe.failureThreshold }}
{{- end }}
resources:
{{ toYaml .Values.agent.resources | indent 10 }}
{{- if not .Values.dind.enabled }}
@@ -120,3 +99,4 @@ spec:
- name: docker-graph-storage
emptyDir: {}
{{- end }}
{{- end -}}
+29 -9
View File
@@ -1,4 +1,4 @@
{{- if hasKey .Values.server.env "DRONE_PROVIDER" }}
{{- if eq (include "drone.providerOK" .) "true" }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
@@ -44,7 +44,29 @@ spec:
image: "{{ .Values.images.server.repository }}:{{ .Values.images.server.tag }}"
imagePullPolicy: {{ .Values.images.server.pullPolicy }}
env:
- name: DRONE_SECRET
{{- if .Values.server.kubernetes.enabled }}
- name: DRONE_KUBERNETES_ENABLED
value: "true"
- name: DRONE_KUBERNETES_NAMESPACE
value: {{ default .Release.Namespace .Values.server.kubernetes.namespace }}
- name: DRONE_KUBERNETES_SERVICE_ACCOUNT
value: {{ template "drone.pipelineServiceAccount" . }}
{{- end }}
- name: DRONE_ALWAYS_AUTH
value: {{ .Values.server.alwaysAuth | quote }}
- name: DRONE_SERVER_HOST
{{- if hasKey .Values.server "host" }}
value: "{{ .Values.server.host }}"
{{- else }}
value: "{{ template "drone.fullname" . }}"
{{- end }}
- name: DRONE_SERVER_PROTOCOL
value: {{ .Values.server.protocol }}
{{- if .Values.server.adminUser }}
- name: DRONE_USER_CREATE
value: username:{{ .Values.server.adminUser }},machine:false,admin:true
{{- end }}
- name: DRONE_RPC_SECRET
valueFrom:
secretKeyRef:
name: {{ template "drone.fullname" . }}
@@ -58,19 +80,17 @@ spec:
key: {{ . | quote }}
{{- end }}
{{- end }}
- name: DRONE_HOST
{{- if hasKey .Values.server "host" }}
value: "{{ .Values.server.host }}"
{{- else }}
value: "http://{{ template "drone.fullname" . }}"
{{- end }}
{{- range $key, $value := .Values.server.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{ template "drone.providerEnvs" . }}
ports:
- name: http
containerPort: 8000
containerPort: 80
protocol: TCP
- name: https
containerPort: 443
protocol: TCP
- name: grpc
containerPort: 9000
@@ -0,0 +1,12 @@
{{- if hasKey .Values.server.kubernetes "namespace" -}}
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.server.kubernetes.namespace }}
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
component: server
{{- end -}}
@@ -0,0 +1,19 @@
{{- if and .Values.rbac.create .Values.server.kubernetes.enabled -}}
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
kind: ClusterRoleBinding
metadata:
name: {{ template "drone.fullname" . }}-pipeline
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
subjects:
- kind: ServiceAccount
name: {{ template "drone.pipelineServiceAccount" . }}
namespace: {{ default .Release.Namespace .Values.server.kubernetes.namespace }}
roleRef:
kind: ClusterRole
name: {{ template "drone.fullname" . }}-pipeline
apiGroup: rbac.authorization.k8s.io
{{- end -}}
+30
View File
@@ -0,0 +1,30 @@
{{- if and .Values.rbac.create .Values.server.kubernetes.enabled -}}
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
kind: ClusterRole
metadata:
name: {{ template "drone.fullname" . }}-pipeline
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
rules:
- apiGroups:
- ""
resources:
- namespaces
- configmaps
- secrets
- pods
verbs:
- "create"
- "delete"
- "get"
- "list"
- apiGroups:
- ""
resources:
- "pods/log"
verbs:
- "get"
{{ end }}
+6
View File
@@ -9,6 +9,12 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
rules:
- apiGroups:
- batch
resources:
- jobs
verbs:
- "*"
- apiGroups:
- extensions
resources:
@@ -0,0 +1,12 @@
{{ if and .Values.serviceAccount.create .Values.server.kubernetes.enabled -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "drone.pipelineServiceAccount" . }}
namespace: {{ default .Release.Namespace .Values.server.kubernetes.namespace }}
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{ end }}
+19
View File
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "drone.fullname" . }}-grpc
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
type: ClusterIP
ports:
- name: grpc
port: 9000
targetPort: 9000
selector:
app: {{ template "drone.name" . }}
release: {{ .Release.Name | quote }}
component: server
+6 -1
View File
@@ -13,16 +13,21 @@ metadata:
heritage: "{{ .Release.Service }}"
spec:
type: {{ .Values.service.type }}
{{- if and (hasKey .Values.service "loadBalancerIP") (eq .Values.service.type "LoadBalancer") }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- name: http
port: {{ .Values.service.httpPort }}
targetPort: 8000
targetPort: 80
{{- if hasKey .Values.service "nodePort" }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
{{- if .Values.service.exposeGRPC }}
- name: grpc
port: 9000
targetPort: 9000
{{- end }}
selector:
app: {{ template "drone.name" . }}
release: {{ .Release.Name | quote }}
+78 -35
View File
@@ -1,12 +1,10 @@
appVersion: "0.8.6"
images:
## The official drone (server) image, change tag to use a different version.
## ref: https://hub.docker.com/r/drone/drone/tags/
##
server:
repository: "docker.io/drone/drone"
tag: 0.8.9
tag: 1.0.0-rc.4
pullPolicy: IfNotPresent
## The official drone (agent) image, change tag to use a different version.
@@ -14,7 +12,7 @@ images:
##
agent:
repository: "docker.io/drone/agent"
tag: 0.8.9
tag: 1.0.0-rc.4
pullPolicy: IfNotPresent
## The official docker (dind) image, change tag to use a different version.
@@ -37,6 +35,9 @@ service:
##
type: ClusterIP
## Specify a load balancer IP address to use if your provider supports it.
# loadBalancerIP:
## Drone Service annotations
##
# annotations:
@@ -44,6 +45,9 @@ service:
# service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:xx-xxxx-x:xxxxxxxxxxx:certificate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
# external-dns.alpha.kubernetes.io/hostname: drone.domain.tld.
## set to true if you want to expose drone's GRPC via the service (for external access)
exposeGRPC: false
ingress:
## If true, Drone Ingress will be created.
##
@@ -68,32 +72,82 @@ ingress:
# hosts:
# - drone.domain.io
sourceControl:
## your source control provider: github,gitlab,gitea,gogs,bitbucketCloud,bitbucketServer
provider:
## secret containing your source control provider secrets, keys provided below.
## if left blank will assume a secret based on the release name of the chart.
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`
github:
clientID:
clientSecretKey: clientSecret
server: https://github.com
gitlab:
clientID:
clientSecretKey: clientSecret
server:
gitea:
server:
gogs:
server:
bitbucketCloud:
clientID:
clientSecret: clientSecret
bitbucketServer:
server:
consumerKey: consumerKey
privateKey: privateKey
username:
passwordKey: password
server:
## If not set, it will be autofilled with the cluster host.
## Host must be in "<scheme>://<hostname>" format.
## Host shoud be just the hostname.
##
# host: "https://drone.domain.io"
# host: "drone.domain.io"
## protocol should be http:// or https://
protocol: http://
## Initial admin user
## Leaving this blank may make it impossible to log into drone.
## Set to a valid oauth user from your git/oauth server
## For more complex user creation you can use env variables below instead.
adminUser:
## Configures Drone to authenticate when cloning public repositories. This is only required
## when your source code management system (e.g. GitHub Enterprise) has private mode enabled.
alwaysAuth: false
## Configures drone to use kubernetes to run pipelines rather than agents, if enabled
## will not deploy any agents.
kubernetes:
## set to true if you want drone to use kubernetes to run pipelines
enabled: true
## you can run pipeline jobs in another namespace, if you choose to do this
## you'll need to create that namespace manually.
# namespace:
## alternative service account to create to create drone pipelines. this account
## will be given cluster-admin rights.
## if not set the rights will be given to the default drone service account name.
# pipelineServiceAccount:
## Drone server configuration.
## Values in here get injected as environment variables.
## ref: http://readme.drone.io/admin/installation-reference
## You can set up remote database servers etc using environment
## variables.
## ref: https://docs.drone.io/reference/server/
##
env:
DRONE_DEBUG: "false"
DRONE_LOGS_DEBUG: "false"
DRONE_DATABASE_DRIVER: "sqlite3"
DRONE_DATABASE_DATASOURCE: "/var/lib/drone/drone.sqlite"
## Drone requires some environment variables to bootstrap the
## git service or it won't start up.
## Uncomment this and add your own custom configuration.
##
# DRONE_PROVIDER: "github"
# DRONE_OPEN: "true"
# DRONE_GITHUB: "true"
# DRONE_ORGS: "my-github-org,my-other-github-org"
# DRONE_ADMIN:"admin-1,admin-2"
# DRONE_GITHUB_CLIENT: "github-oauth2-client-id"
## Secret environment variables are configured in `server.envSecrets`.
## Each item in `server.envSecrets` references a Kubernetes Secret.
## These Secrets should be created before they are referenced.
@@ -146,10 +200,10 @@ server:
agent:
## Drone agent configuration.
## Values in here get injected as environment variables.
## ref: http://readme.drone.io/admin/installation-reference
## ref: https://docs.drone.io/reference/agent/
##
env:
DRONE_DEBUG: "false"
DRONE_LOGS_DEBUG: "false"
## Number of drone agent replicas
replicas: 1
@@ -171,20 +225,9 @@ agent:
## Liveness and readiness probe values
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
livenessProbe:
enabled: true
failureThreshold: 3
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
enabled: true
failureThreshold: 3
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
## drone agent does not currently have a health endpoint to check against.
livenessProbe: {}
readinessProbe: {}
## Use an alternate scheduler, e.g. "stork".
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/