Skip to content

Commit

Permalink
Merge branch 'pr/8' into release/v1.0.9 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
btungut authored Nov 7, 2023
1 parent 176652c commit 14a3a07
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 6 deletions.
7 changes: 3 additions & 4 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: azure-devops-agent
description: Dockerized build agent for Azure DevOps
type: application
version: 1.0.8
version: 1.0.9
appVersion: "3.220.5"
keywords:
- azure devops
Expand All @@ -15,10 +15,9 @@ sources:
maintainers:
- name: "Burak Tungut"
email: "[email protected]"

annotations:
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/license: MIT
artifacthub.io/links: |
artifacthub.io/links: |-
- name: GitHub
url: https://github.com/btungut/azure-devops-agent-on-kubernetes
url: https://github.com/btungut/azure-devops-agent-on-kubernetes
5 changes: 5 additions & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,8 @@ The binaries and packages listed below are included in the docker image used by
- Docker CLI
- Azure CLI
- with Azure DevOps extension

## Contributors

- [Burak Tungut](https://github.com/btungut)
- [Alexandre Saison](https://github.com/saisona)
14 changes: 14 additions & 0 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ helm.sh/chart: {{ include "agent.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.podLabels }}
{{ .Values.podLabels | toYaml -}}
{{- end }}
{{- end }}

{{/*
Expand All @@ -57,3 +60,14 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- .Values.agent.patSecret }}
{{- end }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "agent.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "agent.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
5 changes: 3 additions & 2 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ spec:
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- if .Values.podAnnotations }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
labels:
{{- include "agent.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "agent.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
13 changes: 13 additions & 0 deletions chart/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "agent.serviceAccountName" . }}
labels:
{{- include "agent.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}
11 changes: 11 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,21 @@ volumeMounts: []
# mountPath: "/var/run/docker.sock"


serviceAccount:
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
# Specifies whether a service account should be created
create: true
# Automatically mount a ServiceAccount's API credentials?
automount: true
# Annotations to add to the service account
annotations: {}

nodeSelector: {}
tolerations: []
affinity: {}
podLabels: {}
podAnnotations: {}
podSecurityContext:
runAsNonRoot: true
Expand Down

0 comments on commit 14a3a07

Please sign in to comment.