diff --git a/charts/drone/Chart.yaml b/charts/drone/Chart.yaml index 74e98b1..c26adb2 100644 --- a/charts/drone/Chart.yaml +++ b/charts/drone/Chart.yaml @@ -4,7 +4,7 @@ name: drone description: Drone is a self-service Continuous Delivery platform for busy development teams # TODO: Un-comment once we move back to apiVersion: v2. # type: application -version: 0.2.5 +version: 0.3.0 appVersion: 2.12.0 kubeVersion: "^1.13.0-0" home: https://drone.io/ diff --git a/charts/drone/templates/deployment.yaml b/charts/drone/templates/deployment.yaml index 20604ef..865d444 100644 --- a/charts/drone/templates/deployment.yaml +++ b/charts/drone/templates/deployment.yaml @@ -27,6 +27,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} + serviceAccountName: {{ include "drone.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: diff --git a/charts/drone/templates/serviceaccount.yaml b/charts/drone/templates/serviceaccount.yaml new file mode 100644 index 0000000..3defa1d --- /dev/null +++ b/charts/drone/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "drone.serviceAccountName" . }} + labels: + {{- include "drone.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/drone/values.schema.json b/charts/drone/values.schema.json index 8894ba7..80305e5 100644 --- a/charts/drone/values.schema.json +++ b/charts/drone/values.schema.json @@ -129,6 +129,10 @@ "$id": "#/properties/nodeSelector", "type": "object" }, + "serviceAccount": { + "$id": "#/properties/serviceAccount", + "type": "object" + }, "tolerations": { "$id": "#/properties/tolerations", "type": "array" diff --git a/charts/drone/values.yaml b/charts/drone/values.yaml index 1d18d40..60fe8a4 100644 --- a/charts/drone/values.yaml +++ b/charts/drone/values.yaml @@ -13,6 +13,15 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + # Drone server does not interact with the Kubernetes API server automountServiceAccountToken: false @@ -40,7 +49,6 @@ service: type: ClusterIP port: 80 - ## If you'd like to create an ingress in front of the Drone server, you can enable it ## here. Please refer to your service provider's documenatation for any configuration ## that is specific to their ingress implementation.