This commit is contained in:
commit
5b275afd4a
101
.drone.yml
Normal file
101
.drone.yml
Normal file
@ -0,0 +1,101 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: linter
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: helm lint
|
||||
commands:
|
||||
- helm lint
|
||||
image: quay.io/helmpack/chart-testing:latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50
|
||||
memory: 50M
|
||||
|
||||
- name: markdown lint
|
||||
commands:
|
||||
- markdownlint *.md
|
||||
image: docker.io/tmknom/markdownlint:0.23.1
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50
|
||||
memory: 50M
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
PLUGIN_HOST:
|
||||
from_secret: smtp_host
|
||||
PLUGIN_USERNAME:
|
||||
from_secret: smtp_username
|
||||
PLUGIN_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
PLUGIN_FROM:
|
||||
from_secret: smtp_mail_address
|
||||
image: docker.io/drillster/drone-email:latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50
|
||||
memory: 25M
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: sync
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: github
|
||||
image: docker.io/appleboy/drone-git-push:latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50
|
||||
memory: 25M
|
||||
settings:
|
||||
branch: master
|
||||
remote: ssh://git@github.com/volker-raschek/drone-runner-charts.git
|
||||
force: true
|
||||
ssh_key:
|
||||
from_secret: ssh_key
|
||||
|
||||
- name: email-notification
|
||||
environment:
|
||||
PLUGIN_HOST:
|
||||
from_secret: smtp_host
|
||||
PLUGIN_USERNAME:
|
||||
from_secret: smtp_username
|
||||
PLUGIN_PASSWORD:
|
||||
from_secret: smtp_password
|
||||
PLUGIN_FROM:
|
||||
from_secret: smtp_mail_address
|
||||
image: docker.io/drillster/drone-email:latest
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50
|
||||
memory: 25M
|
||||
when:
|
||||
status:
|
||||
- changed
|
||||
- failure
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
repo:
|
||||
- volker.raschek/drone-runner-charts
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
runner
|
||||
*.tgz
|
5
.helmignore
Normal file
5
.helmignore
Normal file
@ -0,0 +1,5 @@
|
||||
.drone.yml
|
||||
.git
|
||||
.gitignore
|
||||
.markdownlint.yaml
|
||||
*.tgz
|
144
.markdownlint.yaml
Normal file
144
.markdownlint.yaml
Normal file
@ -0,0 +1,144 @@
|
||||
# markdownlint YAML configuration
|
||||
# https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
|
||||
|
||||
# Default state for all rules
|
||||
default: true
|
||||
|
||||
# Path to configuration file to extend
|
||||
extends: null
|
||||
|
||||
# MD003/heading-style/header-style - Heading style
|
||||
MD003:
|
||||
# Heading style
|
||||
style: "atx"
|
||||
|
||||
# MD004/ul-style - Unordered list style
|
||||
MD004:
|
||||
style: "dash"
|
||||
|
||||
# MD007/ul-indent - Unordered list indentation
|
||||
MD007:
|
||||
# Spaces for indent
|
||||
indent: 2
|
||||
# Whether to indent the first level of the list
|
||||
start_indented: false
|
||||
|
||||
# MD009/no-trailing-spaces - Trailing spaces
|
||||
MD009:
|
||||
# Spaces for line break
|
||||
br_spaces: 2
|
||||
# Allow spaces for empty lines in list items
|
||||
list_item_empty_lines: false
|
||||
# Include unnecessary breaks
|
||||
strict: false
|
||||
|
||||
# MD010/no-hard-tabs - Hard tabs
|
||||
MD010:
|
||||
# Include code blocks
|
||||
code_blocks: true
|
||||
|
||||
# MD012/no-multiple-blanks - Multiple consecutive blank lines
|
||||
MD012:
|
||||
# Consecutive blank lines
|
||||
maximum: 1
|
||||
|
||||
# MD013/line-length - Line length
|
||||
MD013:
|
||||
# Number of characters
|
||||
line_length: 80
|
||||
# Number of characters for headings
|
||||
heading_line_length: 80
|
||||
# Number of characters for code blocks
|
||||
code_block_line_length: 80
|
||||
# Include code blocks
|
||||
code_blocks: false
|
||||
# Include tables
|
||||
tables: false
|
||||
# Include headings
|
||||
headings: true
|
||||
# Include headings
|
||||
headers: true
|
||||
# Strict length checking
|
||||
strict: false
|
||||
# Stern length checking
|
||||
stern: false
|
||||
|
||||
# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
|
||||
MD022:
|
||||
# Blank lines above heading
|
||||
lines_above: 1
|
||||
# Blank lines below heading
|
||||
lines_below: 1
|
||||
|
||||
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
|
||||
MD024:
|
||||
# Only check sibling headings
|
||||
allow_different_nesting: true
|
||||
|
||||
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
|
||||
MD025:
|
||||
# Heading level
|
||||
level: 1
|
||||
# RegExp for matching title in front matter
|
||||
front_matter_title: "^\\s*title\\s*[:=]"
|
||||
|
||||
# MD026/no-trailing-punctuation - Trailing punctuation in heading
|
||||
MD026:
|
||||
# Punctuation characters
|
||||
punctuation: ".,;:!。,;:!"
|
||||
|
||||
# MD029/ol-prefix - Ordered list item prefix
|
||||
MD029:
|
||||
# List style
|
||||
style: "one_or_ordered"
|
||||
|
||||
# MD030/list-marker-space - Spaces after list markers
|
||||
MD030:
|
||||
# Spaces for single-line unordered list items
|
||||
ul_single: 1
|
||||
# Spaces for single-line ordered list items
|
||||
ol_single: 1
|
||||
# Spaces for multi-line unordered list items
|
||||
ul_multi: 1
|
||||
# Spaces for multi-line ordered list items
|
||||
ol_multi: 1
|
||||
|
||||
# MD033/no-inline-html - Inline HTML
|
||||
MD033:
|
||||
# Allowed elements
|
||||
allowed_elements: []
|
||||
|
||||
# MD035/hr-style - Horizontal rule style
|
||||
MD035:
|
||||
# Horizontal rule style
|
||||
style: "---"
|
||||
|
||||
# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
|
||||
MD036:
|
||||
# Punctuation characters
|
||||
punctuation: ".,;:!?。,;:!?"
|
||||
|
||||
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
|
||||
MD041:
|
||||
# Heading level
|
||||
level: 1
|
||||
# RegExp for matching title in front matter
|
||||
front_matter_title: "^\\s*title\\s*[:=]"
|
||||
|
||||
# MD044/proper-names - Proper names should have the correct capitalization
|
||||
MD044:
|
||||
# List of proper names
|
||||
# names:
|
||||
# - drone
|
||||
# Include code blocks
|
||||
code_blocks: false
|
||||
|
||||
# MD046/code-block-style - Code block style
|
||||
MD046:
|
||||
# Block style
|
||||
style: "fenced"
|
||||
|
||||
# MD048/code-fence-style - Code fence style
|
||||
MD048:
|
||||
# Code fence syle
|
||||
style: "backtick"
|
22
Chart.yaml
Normal file
22
Chart.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
apiVersion: v2
|
||||
name: drone
|
||||
description: Helm chart for a drone runner based on kubernetes
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: 1.0.0-beta.8
|
||||
icon: https://readme.drone.io/logo.svg
|
||||
|
||||
keywords:
|
||||
- git
|
||||
- drone
|
||||
- drone-runner
|
||||
- ci
|
||||
- cd
|
||||
sources:
|
||||
- https://git.cryptic.systems/volker.raschek/drone-runner-charts
|
||||
- https://github.com/drone/drone
|
||||
- https://hub.docker.com/r/drone/drone
|
||||
|
||||
maintainers:
|
||||
- name: Markus Pesch
|
||||
email: markus.pesch+apps@cryptic.systems
|
13
LICENSE
Normal file
13
LICENSE
Normal file
@ -0,0 +1,13 @@
|
||||
Copyright 2021 Markus Pesch
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
73
README.md
Normal file
73
README.md
Normal file
@ -0,0 +1,73 @@
|
||||
# drone-charts
|
||||
|
||||
[![Build Status](https://drone.cryptic.systems/api/badges/volker.raschek/drone-runner-charts/status.svg)](https://drone.cryptic.systems/volker.raschek/drone-charts)
|
||||
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/volker-raschek)](https://artifacthub.io/packages/search?repo=volker-raschek)
|
||||
|
||||
This is an inofficial helm chart for
|
||||
[drone-runner](https://github.com/drone/drone-runner-kube) and should replace
|
||||
the official unmainted helm chart
|
||||
[repository](https://github.com/drone/drone-runner-kube).
|
||||
|
||||
This helm chart can be found on [artifacthub.io](https://artifacthub.io/) and
|
||||
can be installed via helm.
|
||||
|
||||
```bash
|
||||
helm repo add volker.raschek https://charts.cryptic.systems/volker.raschek
|
||||
helm install drone volker.raschek/drone-runner
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
All [configuration
|
||||
options](https://docs.drone.io/runner/kubernetes/configuration/reference/) can
|
||||
be defined in the `values.yml` file below the `config` section. Alternatively
|
||||
can be the options passed via the `--set` flag of the `helm install` command.
|
||||
|
||||
| value | reference |
|
||||
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
||||
| `config.DRONE_ANNOTATIONS_DEFAULT` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone-annotations-default/) |
|
||||
| `config.DRONE_DEBUG` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_debug/) |
|
||||
| `config.DRONE_DOCKER_CONFIG` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_docker_config/) |
|
||||
| `config.DRONE_HTTP_BIND` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_http_bind/) |
|
||||
| `config.DRONE_HTTP_HOST` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_http_host/) |
|
||||
| `config.DRONE_HTTP_PROTO` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_http_proto/) |
|
||||
| `config.DRONE_IMAGE_CLONE` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_image_clone/) |
|
||||
| `config.DRONE_IMAGE_PLACEHOLDER` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_image_placeholder/) |
|
||||
| `config.DRONE_LABELS_DEFAULT` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_labels_default/) |
|
||||
| `config.DRONE_LIMIT_EVENTS` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_limit_events/) |
|
||||
| `config.DRONE_LIMIT_REPOS` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_limit_repos/) |
|
||||
| `config.DRONE_LIMIT_TRUST` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_limit_trust/) |
|
||||
| `config.DRONE_NAMESPACE_DEFAULT` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_namespace_default/) |
|
||||
| `config.DRONE_NAMESPACE_RULES` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_namespace_rules/) |
|
||||
| `config.DRONE_NAMESPACE_RULES_FILE` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_namespace_rules_file/) |
|
||||
| `config.DRONE_NODE_SELECTOR_DEFAULT` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_node_selector_default/) |
|
||||
| `config.DRONE_POLICY_FILE` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_policy_file/) |
|
||||
| `config.DRONE_REGISTRY_PLUGIN_ENDPOINT` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_registry_plugin_endpoint/) |
|
||||
| `config.DRONE_REGISTRY_PLUGIN_SKIP_VERIFY` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_registry_plugin_skip_verify/) |
|
||||
| `config.DRONE_REGISTRY_PLUGIN_TOKEN` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_registry_plugin_token/) |
|
||||
| `config.DRONE_RESOURCE_LIMIT_CPU` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_resource_limit_cpu/) |
|
||||
| `config.DRONE_RESOURCE_LIMIT_MEMORY` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_resource_limit_memory/) |
|
||||
| `config.DRONE_RESOURCE_REQUEST_CPU` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_resource_request_cpu/) |
|
||||
| `config.DRONE_RESOURCE_REQUEST_MEMORY` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_resource_request_memory/) |
|
||||
| `config.DRONE_RPC_DUMP_HTTP` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_rpc_dump_http/) |
|
||||
| `config.DRONE_RPC_DUMP_HTTP_BODY` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_rpc_dump_http_body/) |
|
||||
| `config.DRONE_RPC_HOST` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_rpc_host/) |
|
||||
| `config.DRONE_RPC_PROTO` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_rpc_proto/) |
|
||||
| `config.DRONE_RPC_SECRET` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_rpc_secret/) |
|
||||
| `config.DRONE_RPC_SKIP_VERIFY` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_rpc_skip_verify/) |
|
||||
| `config.DRONE_RUNNER_CAPACITY` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_runner_capacity/) |
|
||||
| `config.DRONE_RUNNER_DEVICES` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_runner_devices/) |
|
||||
| `config.DRONE_RUNNER_ENV_FILE` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_runner_env_file/) |
|
||||
| `config.DRONE_RUNNER_ENVIRON` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_runner_environ/) |
|
||||
| `config.DRONE_RUNNER_MAX_PROCS` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_runner_max_procs/) |
|
||||
| `config.DRONE_RUNNER_NAME` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_runner_name/) |
|
||||
| `config.DRONE_RUNNER_PRIVILEGED_IMAGES` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_runner_privileged_images/) |
|
||||
| `config.DRONE_SECRET_PLUGIN_ENDPOINT` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_secret_plugin_endpoint/) |
|
||||
| `config.DRONE_SECRET_PLUGIN_SKIP_VERIFY` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_secret_plugin_skip_verify/) |
|
||||
| `config.DRONE_SECRET_PLUGIN_TOKEN` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_secret_plugin_token/) |
|
||||
| `config.DRONE_SERVICE_ACCOUNT_DEFAULT` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_service_account_default/) |
|
||||
| `config.DRONE_TRACE` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_trace/) |
|
||||
| `config.DRONE_UI_DISABLED` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_ui_disabled/) |
|
||||
| `config.DRONE_UI_PASSWORD` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_ui_password/) |
|
||||
| `config.DRONE_UI_REALM` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_ui_realm/) |
|
||||
| `config.DRONE_UI_USERNAME` | [Documentation](https://docs.drone.io/runner/kubernetes/configuration/reference/drone_ui_username/) |
|
51
templates/_helpers.tpl
Normal file
51
templates/_helpers.tpl
Normal file
@ -0,0 +1,51 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "droneRunner.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "droneRunner.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "droneRunner.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "droneRunner.labels" -}}
|
||||
helm.sh/chart: {{ include "droneRunner.chart" . }}
|
||||
{{ include "droneRunner.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "droneRunner.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "droneRunner.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
50
templates/deployment.yaml
Normal file
50
templates/deployment.yaml
Normal file
@ -0,0 +1,50 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "drone.fullname" . }}
|
||||
labels:
|
||||
{{- include "drone.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "drone.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "drone.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "droneRunner.fullname" . }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "droneRunner.fullname" . }}
|
24
templates/role.yaml
Normal file
24
templates/role.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "droneRunner.fullname" . }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/log
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- delete
|
||||
- list
|
||||
- watch
|
||||
- update
|
11
templates/roleBinding.yaml
Normal file
11
templates/roleBinding.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "droneRunner.fullname" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "droneRunner.fullname" . }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "droneRunner.fullname" . }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
23
templates/secrets.yaml
Normal file
23
templates/secrets.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "drone.fullname" . }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
|
||||
{{- if not (hasKey .Values "config") -}}
|
||||
{{- $_ := set .Values "config" dict -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (hasKey .Values.config "DRONE_SERVER_HOST") -}}
|
||||
{{- $_ := set .Values.config "DRONE_SERVER_HOST" (index .Values.ingress.hosts 0).host -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not (hasKey .Values.config "DRONE_SERVER_PROTO") -}}
|
||||
{{- $_ := set .Values.config "DRONE_SERVER_PROTO" "https" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* SETUP CONFIG */}}
|
||||
{{ range $key, $value := .Values.config }}
|
||||
{{ upper $key}}: {{ quote $value }}
|
||||
{{ end }}
|
4
templates/serviceAccount.yaml
Normal file
4
templates/serviceAccount.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "droneRunner.fullname" . }}
|
15
templates/tests/test-connection.yaml
Normal file
15
templates/tests/test-connection.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ include "droneRunner.fullname" . }}-test-connection"
|
||||
labels:
|
||||
{{- include "droneRunner.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: ['wget']
|
||||
args: ['{{ include "droneRunner.fullname" . }}:{{ .Values.service.port }}']
|
||||
restartPolicy: Never
|
355
values.yaml
Normal file
355
values.yaml
Normal file
@ -0,0 +1,355 @@
|
||||
# Default values for drone.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: docker.io/drone/drone-runner-kube
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
config:
|
||||
# DRONE_ANNOTATIONS_DEFAULT
|
||||
# Optional string map. Provides a set of default annotations used when
|
||||
# creating the pipeline pod. The default annotation values are appended to the
|
||||
# annotations defined in the yaml.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-annotations-default/
|
||||
# DRONE_ANNOTATIONS_DEFAULT: "keyA:valueA,keyB:valueB"
|
||||
|
||||
# DRONE_DEBUG
|
||||
# Optional boolean value. Enables debug level logging.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-debug/
|
||||
# DRONE_DEBUG: "true"
|
||||
|
||||
# DRONE_DOCKER_CONFIG
|
||||
# Optional string value. Provides the path to a Docker config.json file used
|
||||
# to source registry credentials from third party system.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-docker-config/
|
||||
# DRONE_DOCKER_CONFIG: ""
|
||||
|
||||
# DRONE_HTTP_BIND
|
||||
# Optional string value configures the http listener port. The default value
|
||||
# is :3000. Overriding this value is not recommended.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-http-bind/
|
||||
# DRONE_HTTP_BIND: ""
|
||||
|
||||
# DRONE_HTTP_HOST
|
||||
# Optional string value that configures the http listener hostname. The
|
||||
# default value is an empty string. Setting this value is not recommended.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-http-host/
|
||||
# DRONE_HTTP_HOST: ""
|
||||
|
||||
# DRONE_HTTP_PROTO
|
||||
# Optional string value configures the http listener protocol. The default
|
||||
# value is http. Overriding this value is not recommended.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-http-proto/
|
||||
# DRONE_HTTP_PROTO: ""
|
||||
|
||||
# DRONE_IMAGE_CLONE
|
||||
# Optional string value overrides the default plugin used to clone the
|
||||
# repository. The default value is drone/git
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-image-clone/
|
||||
# DRONE_IMAGE_CLONE: ""
|
||||
|
||||
# DRONE_IMAGE_PLACEHOLDER
|
||||
# Optional string value overrides the placeholder image used when creating
|
||||
# Pods. The default value is drone/placeholder.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-image-placeholder/
|
||||
# DRONE_IMAGE_PLACEHOLDER: ""
|
||||
|
||||
# DRONE_LABELS_DEFAULT
|
||||
# Optional string map. Provides a set of default labels used when creating the
|
||||
# pipeline pod. The default annotation values are appended to the labels
|
||||
# defined in the yaml.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-labels-default/
|
||||
# DRONE_LABELS_DEFAULT: "keyA:valueA,keyB:valueB"
|
||||
|
||||
# DRONE_LIMIT_EVENTS
|
||||
# Optional comma-separated string value. Provides a white list of build events
|
||||
# that can be processed by this runner. This provides an extra layer of
|
||||
# security to limit the kind of workloads this runner can process.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-limit-events/
|
||||
# DRONE_LIMIT_EVENTS: ""
|
||||
|
||||
# DRONE_LIMIT_REPOS
|
||||
# Optional comma-separated string value. Configures the runner to only process
|
||||
# matching repositories. This provides an extra layer of security and can stop
|
||||
# untrusted repositories from executing pipelines with this runner.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-limit-repos/
|
||||
# DRONE_LIMIT_REPOS: ""
|
||||
|
||||
# DRONE_LIMIT_TRUST
|
||||
# Optional boolean value. Configures the runner to only process trusted
|
||||
# repositories. This provides an extra layer of security and can stop
|
||||
# untrusted repositories from executing pipelines with this runner.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-limit-trusted/
|
||||
# DRONE_LIMIT_TRUST: ""
|
||||
|
||||
# DRONE_NAMESPACE_DEFAULT
|
||||
# Optional string value provides the default namespace used to create pipeline
|
||||
# resources. The default namespace is used if the no namespace is configured
|
||||
# in the yaml.
|
||||
#
|
||||
# DRONE_NAMESPACE_DEFAULT=default
|
||||
#
|
||||
# You can optionally configure the runner to create a namespace for each
|
||||
# pipeline execution which gets deleted when the pipeline completes. This can
|
||||
# be configured using this exact value:
|
||||
#
|
||||
# DRONE_NAMESPACE_DEFAULT=drone-
|
||||
#
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-namespace-default/
|
||||
# DRONE_NAMESPACE_DEFAULT: ""
|
||||
|
||||
# DRONE_NAMESPACE_RULES
|
||||
# Optional string map. Defines linting rules to prevent an organization or
|
||||
# repository from using a restricted namespace.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-namespace-rules/
|
||||
# DRONE_NAMESPACE_RULES: ""
|
||||
|
||||
# DRONE_NAMESPACE_RULES_FILE
|
||||
# Optional string value. Provides the path to a file that defines namespace
|
||||
# usage rules. These rules prevent an organization or repository from using a
|
||||
# restricted namespace.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-namespace-rules-file/
|
||||
# DRONE_NAMESPACE_RULES_FILE: ""
|
||||
|
||||
# DRONE_NODE_SELECTOR_DEFAULT
|
||||
# Optional string map. Provides a set of default node_selector values used
|
||||
# when creating the pipeline pod. The default node_selector values are used if
|
||||
# node_selector is undefined in the yaml.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-node-selector-default/
|
||||
# DRONE_NODE_SELECTOR_DEFAULT: ""
|
||||
|
||||
# DRONE_POLICY_FILE
|
||||
# Optional string value. Provides the path to the policy file that should be
|
||||
# loaded on startup. Note that the policy file needs to be mounted into the
|
||||
# runner container.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-policy-file/
|
||||
# DRONE_POLICY_FILE: ""
|
||||
|
||||
# DRONE_REGISTRY_PLUGIN_ENDPOINT
|
||||
# Optional string value. Provides the endpoint used to make http requests to
|
||||
# an external registry plugin. The external registry plugin can be used to
|
||||
# source registry credentials from third party system.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-registry-plugin-endpoint/
|
||||
# DRONE_REGISTRY_PLUGIN_ENDPOINT: ""
|
||||
|
||||
# DRONE_REGISTRY_PLUGIN_SKIP_VERIFY
|
||||
# Optional boolean value. Disable SSL verification when making http requests
|
||||
# to the registry plugin endpoint. This is unsafe and is not recommended.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-registry-plugin-skip-verify/
|
||||
# DRONE_REGISTRY_PLUGIN_SKIP_VERIFY: ""
|
||||
|
||||
# DRONE_REGISTRY_PLUGIN_TOKEN
|
||||
# Optional string value. Provides the token used to authenticate http requests
|
||||
# to the registry plugin endpoint.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-registry-plugin-token/
|
||||
# DRONE_REGISTRY_PLUGIN_TOKEN: ""
|
||||
|
||||
# DRONE_RESOURCE_LIMIT_CPU
|
||||
# Optional integer, sets the default millicpu resource limits for all pipeline
|
||||
# containers. This value maps to the spec.containers[].resources.limits.cpu
|
||||
# field.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-resource-limit-cpu/
|
||||
# DRONE_RESOURCE_LIMIT_CPU: ""
|
||||
|
||||
# DRONE_RESOURCE_LIMIT_MEMORY
|
||||
# Optional integer, sets the default memory limits for all pipeline
|
||||
# containers. This value maps to the spec.containers[].resources.limits.memory
|
||||
# field.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-resource-limit-memory/
|
||||
# DRONE_RESOURCE_LIMIT_MEMORY: ""
|
||||
|
||||
# DRONE_RESOURCE_REQUEST_CPU
|
||||
# Optional integer, sets the default millicpu resource request for all
|
||||
# pipeline steps. This value maps to the
|
||||
# spec.containers[].resources.requests.cpu field.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-resource-request-cpu/
|
||||
# DRONE_RESOURCE_REQUEST_CPU: ""
|
||||
|
||||
# DRONE_RESOURCE_REQUEST_MEMORY
|
||||
# Optional integer, sets the default memory resource request for all pipeline
|
||||
# steps. This value maps to the spec.containers[].resources.requests.memory
|
||||
# field.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-resource-request-memory/
|
||||
# DRONE_RESOURCE_REQUEST_MEMORY: ""
|
||||
|
||||
# DRONE_RPC_DUMP_HTTP
|
||||
# Optional boolean value. Enables dumping the http request and response to the
|
||||
# logs for debugging purposes. This should only be enabled while debugging
|
||||
# connectivity issues between the runner and server.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-rpc-dump-http/
|
||||
# DRONE_RPC_DUMP_HTTP: ""
|
||||
|
||||
# DRONE_RPC_DUMP_HTTP_BODY
|
||||
# Optional boolean value. Enables dumping the http request and response body
|
||||
# to the logs for debugging purposes. This should only be enabled while
|
||||
# debugging connectivity issues between the runner and server.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-rpc-dump-http-body/
|
||||
# DRONE_RPC_DUMP_HTTP_BODY: ""
|
||||
|
||||
# DRONE_RPC_HOST
|
||||
# Required string values. Defines the hostname (and optional port) used to
|
||||
# connect to the Drone server.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-rpc-host/
|
||||
# DRONE_RPC_HOST: ""
|
||||
|
||||
# DRONE_RPC_PROTO
|
||||
# Required string value. Defines the protocol used to connect to the Drone
|
||||
# server. The value must be either http or https.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-rpc-proto/
|
||||
# DRONE_RPC_PROTO: ""
|
||||
|
||||
# DRONE_RPC_SECRET
|
||||
# Required string value. Provides the shared secret used by the Drone server
|
||||
# to authenticate http requests.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-rpc-secret/
|
||||
# DRONE_RPC_SECRET: ""
|
||||
|
||||
# DRONE_RPC_SKIP_VERIFY
|
||||
# Optional boolean value. Disable SSL verification when making http requests
|
||||
# to the Drone server. This is unsafe and is not recommended.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-rpc-skip-verify/
|
||||
# DRONE_RPC_SKIP_VERIFY: ""
|
||||
|
||||
# DRONE_RUNNER_CAPACITY
|
||||
# Optional number value. Limits the number of concurrent pipelines that a
|
||||
# runner can execute. This does not limit the number of concurrent pipelines
|
||||
# that can execute on a single node.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-runner-capacity/
|
||||
# DRONE_RUNNER_CAPACITY: ""
|
||||
|
||||
# DRONE_RUNNER_DEVICES
|
||||
# Optional comma separated list. Provides a list of devices that are mounted
|
||||
# into every pipeline step.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-runner-devices/
|
||||
# DRONE_RUNNER_DEVICES: ""
|
||||
|
||||
# DRONE_RUNNER_ENV_FILE
|
||||
# Optional string value. Provides the path to an environment variable file
|
||||
# used to define global environment variables injected into all pipeline
|
||||
# steps.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-runner-env-file/
|
||||
# DRONE_RUNNER_ENV_FILE: ""
|
||||
|
||||
# DRONE_RUNNER_ENVIRON
|
||||
# Optional string map. Provides a set of global environment variables that are
|
||||
# injected into every pipeline step.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-runner-environ/
|
||||
# DRONE_RUNNER_ENVIRON: ""
|
||||
|
||||
# DRONE_RUNNER_MAX_PROCS
|
||||
# Optional number value. Limits the number of concurrent steps that a runner
|
||||
# can execute for a single pipeline. This is disabled by default. This can be
|
||||
# useful if you need to throttle the maximum number of parallel steps to
|
||||
# prevent resource exhaustion.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-runner-max-procs/
|
||||
# DRONE_RUNNER_MAX_PROCS: ""
|
||||
|
||||
# DRONE_RUNNER_NAME
|
||||
# Optional string value. Sets the name of the runner. The runner name is
|
||||
# stored in the server and can be used to trace a build back to a specific
|
||||
# runner.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-runner-name/
|
||||
# DRONE_RUNNER_NAME: ""
|
||||
|
||||
# DRONE_RUNNER_PRIVILEGED_IMAGES
|
||||
# Optional comma separated list. Provides a list of Docker images that are
|
||||
# started as privileged containers by default.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-runner-privileged-images/
|
||||
# DRONE_RUNNER_PRIVILEGED_IMAGES: ""
|
||||
|
||||
# DRONE_SECRET_PLUGIN_ENDPOINT
|
||||
# Optional string value. Provides the endpoint used to make http requests to
|
||||
# an external secret plugin. The external secret plugin (e.g. vault) can be
|
||||
# used to source secrets from third party system.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-secret-plugin-endpoint/
|
||||
# DRONE_SECRET_PLUGIN_ENDPOINT: ""
|
||||
|
||||
# DRONE_SECRET_PLUGIN_SKIP_VERIFY
|
||||
# Optional boolean value. Disable SSL verification when making http requests
|
||||
# to the plugin endpoint. This is unsafe and is not recommended.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-secret-plugin-skip-verify/
|
||||
# DRONE_SECRET_PLUGIN_SKIP_VERIFY: ""
|
||||
|
||||
# DRONE_SECRET_PLUGIN_TOKEN
|
||||
# Optional string value. Provides the secret token used to authenticate http
|
||||
# requests to the plugin endpoint.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-secret-plugin-token/
|
||||
# DRONE_SECRET_PLUGIN_TOKEN: ""
|
||||
|
||||
# DRONE_SERVICE_ACCOUNT_DEFAULT
|
||||
# Optional string value provides the default service account used when
|
||||
# creating Pod. The default service account is used if no service account is
|
||||
# configured in the yaml.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-service-account-default/
|
||||
# DRONE_SERVICE_ACCOUNT_DEFAULT: ""
|
||||
|
||||
# DRONE_TRACE
|
||||
# Optional boolean value. Enables trace level logging.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-trace/
|
||||
# DRONE_TRACE: ""
|
||||
|
||||
# DRONE_UI_DISABLED
|
||||
# Optional boolean value. Disables the runner’s user interface.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-ui-disable/
|
||||
# DRONE_UI_DISABLE: ""
|
||||
|
||||
# DRONE_UI_PASSWORD
|
||||
# Optional string value. Sets the basic authentication password used to
|
||||
# authenticate and access the web dashboard. If no password is provided the
|
||||
# web dashboard is disabled.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-ui-password/
|
||||
# DRONE_UI_PASSWORD: ""
|
||||
|
||||
# DRONE_UI_REALM
|
||||
# Optional string value. Sets the basic authentication realm used to
|
||||
# authenticate and access the web dashboard.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-ui-realm/
|
||||
# DRONE_UI_REALM: ""
|
||||
|
||||
# DRONE_UI_USERNAME
|
||||
# Optional string value. Sets the basic authentication username used to
|
||||
# authenticate and access the web dashboard.
|
||||
# https://docs.drone.io/runner/kubernetes/configuration/reference/drone-ui-username/
|
||||
# DRONE_UI_USERNAME: ""
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
Loading…
Reference in New Issue
Block a user