[stable/drone] add logs, database and private repo pull-secret configs (#20415)

* add logs, database and private repo pull-secret configs

Signed-off-by: Osama Nabil <hacktron95@gmail.com>

* fix duplicated mapping value `debug`

Signed-off-by: Osama Nabil <hacktron95@gmail.com>

* change to minor version bump rather than patch version bump

Signed-off-by: Osama Nabil <hacktron95@gmail.com>
This commit is contained in:
Osama Nabil
2020-02-06 08:17:34 -08:00
committed by GitHub
parent 6a89e5f7ae
commit 0b90eeab60
4 changed files with 117 additions and 86 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.5.1
version: 2.6.0
appVersion: 1.6.1
description: Drone is a Continuous Delivery system built on container technology
keywords:
+88 -80
View File
@@ -52,83 +52,91 @@ chart and deletes the release.
The following table lists the configurable parameters of the drone charts and their default values.
| Parameter | Description | Default |
|-----------------------------|-----------------------------------------------------------------------------------------------|-----------------------------|
| `images.server.repository` | Drone **server** image | `docker.io/drone/drone` |
| `images.server.tag` | Drone **server** image tag | `1.6.1` |
| `images.server.pullPolicy` | Drone **server** image pull policy | `IfNotPresent` |
| `images.agent.repository` | Drone **agent** image | `docker.io/drone/agent` |
| `images.agent.tag` | Drone **agent** image tag | `1.6.1` |
| `images.agent.pullPolicy` | Drone **agent** image pull policy | `IfNotPresent` |
| `images.dind.repository` | Docker **dind** image | `docker.io/library/docker` |
| `images.dind.tag` | Docker **dind** image tag | `18.06.1-ce-dind` |
| `images.dind.pullPolicy` | Docker **dind** image pull policy | `IfNotPresent` |
| `service.annotations` | Service annotations | `{}` |
| `service.httpPort` | Drone's Web GUI HTTP port | `80` |
| `service.nodePort` | If `service.type` is `NodePort` and this is non-empty, sets the http node port of the service | `32015` |
| `service.type` | Service type (ClusterIP, NodePort or LoadBalancer) | `ClusterIP` |
| `ingress.enabled` | Enables Ingress for Drone | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.hosts` | Ingress accepted hostnames | `nil` |
| `ingress.tls` | Ingress TLS configuration | `[]` |
| `ingress.path` | Ingress path mapping | `` |
| `licenseKey` | Enterprise License Key | `` |
| `licenseKeySecret` | Enterprise License Key Secret Name | `` |
| `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.httpPort` | Drone **server** http port | `80` |
| `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` |
| `server.affinity` | Drone **server** scheduling preferences | `{}` |
| `server.nodeSelector` | Drone **server** node labels for pod assignment | `{}` |
| `server.tolerations` | Drone **server** node taints to tolerate | `[]` |
| `server.securityContext` | Drone **server** securityContext | `{}` |
| `server.extraContainers` | Additional sidecar containers | `""` |
| `server.extraVolumes` | Additional volumes for use in extraContainers | `""` |
| `agent.env` | Drone **agent** environment variables | `(default values)` |
| `agent.replicas` | Drone **agent** replicas | `1` |
| `agent.annotations` | Drone **agent** annotations | `{}` |
| `agent.resources` | Drone **agent** pod resource requests & limits | `{}` |
| `agent.schedulerName` | Drone **agent** alternate scheduler name | `nil` |
| `agent.affinity` | Drone **agent** scheduling preferences | `{}` |
| `agent.nodeSelector` | Drone **agent** node labels for pod assignment | `{}` |
| `agent.tolerations` | Drone **agent** node taints to tolerate | `[]` |
| `agent.livenessProbe` | Not currently used. | `{}` |
| `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` |
| `dind.resources` | **DinD** pod resource requests & limits | `{}` |
| `dind.env` | **DinD** environment variables | `nil` |
| `dind.command` | **DinD** custom command instead of default entry point | `nil` |
| `dind.args` | **DinD** arguments for custom command or entry point | `nil` |
| `metrics.prometheus.enabled` | Enable Prometheus metrics endpoint | `false` |
| `persistence.enabled` | Use a PVC to persist data | `true` |
| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` |
| `persistence.storageClass` | Storage class of backing PVC | `nil` |
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
| `persistence.size` | Size of data volume | `1Gi` |
| `sharedSecret` | Drone server and agent shared secret (Note: The Default random value changes on every `helm upgrade` causing a rolling update of server and agents) | `(random value)` |
| `rbac.create` | Specifies whether RBAC resources should be created. | `true` |
| `rbac.apiVersion` | RBAC API version | `v1` |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created. | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template. | `(fullname template)` |
| Parameter | Description | Default |
| ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| `images.server.repository` | Drone **server** image | `docker.io/drone/drone` |
| `images.server.tag` | Drone **server** image tag | `1.6.1` |
| `images.server.pullSecret` | Drone **server** image pull secret | `` |
| `images.server.pullPolicy` | Drone **server** image pull policy | `IfNotPresent` |
| `images.agent.repository` | Drone **agent** image | `docker.io/drone/agent` |
| `images.agent.tag` | Drone **agent** image tag | `1.6.1` |
| `images.agent.pullPolicy` | Drone **agent** image pull policy | `IfNotPresent` |
| `images.dind.repository` | Docker **dind** image | `docker.io/library/docker` |
| `images.dind.tag` | Docker **dind** image tag | `18.06.1-ce-dind` |
| `images.dind.pullPolicy` | Docker **dind** image pull policy | `IfNotPresent` |
| `service.annotations` | Service annotations | `{}` |
| `service.httpPort` | Drone's Web GUI HTTP port | `80` |
| `service.nodePort` | If `service.type` is `NodePort` and this is non-empty, sets the http node port of the service | `32015` |
| `service.type` | Service type (ClusterIP, NodePort or LoadBalancer) | `ClusterIP` |
| `ingress.enabled` | Enables Ingress for Drone | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.hosts` | Ingress accepted hostnames | `nil` |
| `ingress.tls` | Ingress TLS configuration | `[]` |
| `ingress.path` | Ingress path mapping | `` |
| `licenseKey` | Enterprise License Key | `` |
| `licenseKeySecret` | Enterprise License Key Secret Name | `` |
| `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.httpPort` | Drone **server** http port | `80` |
| `server.env` | Drone **server** environment variables | `(default values)` |
| `server.database.driver` | Drone **server** database driver, options are (`mysql`, `postgres`, `sqlite3`) | `sqlite3` |
| `server.database.dataSource` | Drone **server** database DataSource | `/var/lib/drone/drone.sqlite` |
| `server.logs.debug` | Drone **server** enables debug mode | `false` |
| `server.logs.trace` | Drone **server** enables trace mode | `false` |
| `server.logs.color` | Drone **server** enables colored logs | `false` |
| `server.logs.pretty` | Drone **server** enables pretty logs | `false` |
| `server.logs.text` | Drone **server** enables text logs rather than `json` logs | `true` |
| `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` |
| `server.affinity` | Drone **server** scheduling preferences | `{}` |
| `server.nodeSelector` | Drone **server** node labels for pod assignment | `{}` |
| `server.tolerations` | Drone **server** node taints to tolerate | `[]` |
| `server.securityContext` | Drone **server** securityContext | `{}` |
| `server.extraContainers` | Additional sidecar containers | `""` |
| `server.extraVolumes` | Additional volumes for use in extraContainers | `""` |
| `agent.env` | Drone **agent** environment variables | `(default values)` |
| `agent.replicas` | Drone **agent** replicas | `1` |
| `agent.annotations` | Drone **agent** annotations | `{}` |
| `agent.resources` | Drone **agent** pod resource requests & limits | `{}` |
| `agent.schedulerName` | Drone **agent** alternate scheduler name | `nil` |
| `agent.affinity` | Drone **agent** scheduling preferences | `{}` |
| `agent.nodeSelector` | Drone **agent** node labels for pod assignment | `{}` |
| `agent.tolerations` | Drone **agent** node taints to tolerate | `[]` |
| `agent.livenessProbe` | Not currently used. | `{}` |
| `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` |
| `dind.resources` | **DinD** pod resource requests & limits | `{}` |
| `dind.env` | **DinD** environment variables | `nil` |
| `dind.command` | **DinD** custom command instead of default entry point | `nil` |
| `dind.args` | **DinD** arguments for custom command or entry point | `nil` |
| `metrics.prometheus.enabled` | Enable Prometheus metrics endpoint | `false` |
| `persistence.enabled` | Use a PVC to persist data | `true` |
| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` |
| `persistence.storageClass` | Storage class of backing PVC | `nil` |
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
| `persistence.size` | Size of data volume | `1Gi` |
| `sharedSecret` | Drone server and agent shared secret (Note: The Default random value changes on every `helm upgrade` causing a rolling update of server and agents) | `(random value)` |
| `rbac.create` | Specifies whether RBAC resources should be created. | `true` |
| `rbac.apiVersion` | RBAC API version | `v1` |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created. | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template. | `(fullname template)` |
@@ -48,6 +48,10 @@ spec:
{{- toYaml . | nindent 6 }}
{{- end }}
serviceAccountName: {{ template "drone.serviceAccountName" . }}
{{- if .Values.images.server.pullSecret }}
imagePullSecrets:
- name: {{ .Values.images.server.pullSecret }}
{{- end }}
containers:
- name: server
image: "{{ .Values.images.server.repository }}:{{ .Values.images.server.tag }}"
@@ -84,6 +88,20 @@ spec:
value: {{ template "drone.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.httpPort }}
- name: DRONE_SERVER_PROTO
value: {{ .Values.server.protocol }}
- name: DRONE_DATABASE_DRIVER
value: {{ .Values.server.database.driver }}
- name: DRONE_DATABASE_DATASOURCE
value: {{ .Values.server.database.dataSource }}
- name: DRONE_LOGS_COLOR
value: {{ .Values.server.logs.color | quote }}
- name: DRONE_LOGS_DEBUG
value: {{ .Values.server.logs.debug | quote }}
- name: DRONE_LOGS_PRETTY
value: {{ .Values.server.logs.pretty | quote }}
- name: DRONE_LOGS_TRACE
value: {{ .Values.server.logs.trace | quote }}
- name: DRONE_LOGS_TEXT
value: {{ .Values.server.logs.text | quote }}
{{- if .Values.server.adminUser }}
- name: DRONE_USER_CREATE
value: username:{{ .Values.server.adminUser }},machine:false,admin:true
+10 -5
View File
@@ -117,6 +117,15 @@ server:
## protocol should be http or https
protocol: http
database:
driver: "sqlite3"
dataSource: "/var/lib/drone/drone.sqlite"
logs:
color: false
debug: false
pretty: false
trace: false
text: true
## http port
## Set to > 1024 if you want to run the pod as non-root user
@@ -155,10 +164,6 @@ server:
## ref: https://docs.drone.io/reference/server/
##
env:
DRONE_LOGS_DEBUG: "false"
DRONE_DATABASE_DRIVER: "sqlite3"
DRONE_DATABASE_DATASOURCE: "/var/lib/drone/drone.sqlite"
## 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.
@@ -223,7 +228,7 @@ agent:
## ref: https://docs.drone.io/reference/agent/
##
env:
DRONE_LOGS_DEBUG: "false"
# DRONE_LOGS_DEBUG: "false"
## Number of drone agent replicas
replicas: 1