drone

by joaquinito2051

Helm chartv2.0.0-rc.13App 1.0.0-rc.5

Drone is a Continuous Delivery system built on container technology

About this chart

Drone.io

Drone 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;

helm install <helm-repo>/drone

helm install stable/drone

Installing the Chart

To install the chart with the release name my-release:

helm install --name my-release <helm-repo>/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:

helm install --name drone --namespace drone <helm-repo>/drone

kubectl create secret generic drone-server-secrets \
helm install --name drone --namespace drone stable/drone
      --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

To uninstall/delete the my-release deployment:

helm delete --purge my-release

The command removes nearly all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the drone charts and their default values.

ParameterDescriptionDefault
images.server.repositoryDrone server imagedocker.io/drone/drone
images.server.tagDrone server image tag0.8.9
images.server.pullPolicyDrone server image pull policyIfNotPresent
images.agent.repositoryDrone agent imagedocker.io/drone/agent
images.agent.tagDrone agent image tag0.8.6
images.agent.pullPolicyDrone agent image pull policyIfNotPresent
images.dind.repositoryDocker dind imagedocker.io/library/docker
images.dind.tagDocker dind image tag18.06.1-ce-dind
images.dind.pullPolicyDocker dind image pull policyIfNotPresent
service.annotationsService annotations{}
service.httpPortDrone's Web GUI HTTP port80
service.nodePortIf service.type is NodePort and this is non-empty, sets the http node port of the service32015
service.typeService type (ClusterIP, NodePort or LoadBalancer)ClusterIP
ingress.enabledEnables Ingress for Dronefalse
ingress.annotationsIngress annotations{}
ingress.hostsIngress accepted hostnamesnil
ingress.tlsIngress TLS configuration[]
sourceControl.providername of source control provider [github,gitlab,gitea,gogs,bitbucketCloud,bitbucketServer]``
sourceControl.secretname of secret containing source control keys and passwords``
sourceControl.githubvalues to configure githubsee values.yaml
sourceControl.gitlabvalues to configure gitlabsee values.yaml
sourceControl.giteavalues to configure giteasee values.yaml
sourceControl.gogsvalues to configure gogssee values.yaml
sourceControl.bitbucketCloudvalues to configure bitbucket cloudsee values.yaml
sourceControl.bitbucketServervalues to configure bitbucket server (stash)see values.yaml
server.hostDrone server hostname (should match callback url in oauth config)(internal hostname)
server.protocolDrone server scheme/protocol [http,https]http
server.envDrone 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.annotationsDrone server annotations{}
server.resourcesDrone server pod resource requests & limits{}
server.schedulerNameDrone server alternate scheduler namenil
server.affinityDrone server scheduling preferences{}
server.nodeSelectorDrone server node labels for pod assignment{}
server.extraContainersAdditional sidecar containers""
server.extraVolumesAdditional volumes for use in extraContainers""
agent.envDrone agent environment variables(default values)
agent.replicasDrone agent replicas1
agent.annotationsDrone agent annotations{}
agent.resourcesDrone agent pod resource requests & limits{}
agent.schedulerNameDrone agent alternate scheduler namenil
agent.affinityDrone agent scheduling preferences{}
agent.nodeSelectorDrone agent node labels for pod assignment{}
agent.livenessProbeNot currently used.{}
agent.readinessProbeNot currently used{}
dind.enabledEnable or disable DinDtrue
dind.driverDinD storage driveroverlay2
dind.resourcesDinD pod resource requests & limits{}
dind.envDinD environment variablesnil
dind.commandDinD custom command instead of default entry pointnil
dind.argsDinD arguments for custom command or entry pointnil
metrics.prometheus.enabledEnable Prometheus metrics endpointfalse
persistence.enabledUse a PVC to persist datatrue
persistence.existingClaimUse an existing PVC to persist datanil
persistence.storageClassStorage class of backing PVCnil
persistence.accessModeUse volume as ReadOnly or ReadWriteReadWriteOnce
persistence.sizeSize of data volume1Gi
sharedSecretDrone 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.createSpecifies whether RBAC resources should be created.true
rbac.apiVersionRBAC API versionv1
serviceAccount.createSpecifies whether a ServiceAccount should be created.true
serviceAccount.nameThe name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template.(fullname template)

Deploy drone with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has drone on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdrone is pinned at v2.0.0-rc.13 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply