From 3b235d850f42919a23cecb1a92175b9ff9171058 Mon Sep 17 00:00:00 2001 From: Alexandre Saison Date: Thu, 23 Jan 2025 11:59:46 +0100 Subject: [PATCH] Adds side containers to the deployment Possibility to add sidecars container to the agents pods. e.g: adding a vpn sidecare container, or fluentd sidecar container. --- chart/templates/deployment.yaml | 3 +++ chart/values.yaml | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index cf6b978..823aede 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -28,6 +28,9 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: + {{ with .Values.sideContainers }} + {{ toYaml . | nindent 8 }} + {{ end }} - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} diff --git a/chart/values.yaml b/chart/values.yaml index c7b34ed..913f11e 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -9,7 +9,6 @@ agent: patSecretKey: "pat" # ---------- AUTH ---------- - # Server / organization url, e.g.: https://dev.azure.com/your-organization-name organizationUrl: "" @@ -50,7 +49,6 @@ volumeMounts: [] # - name: dockersock # 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 @@ -62,6 +60,23 @@ serviceAccount: # Annotations to add to the service account annotations: {} +sideContainers: + # - name: sidecar + # imagePullPolicy: Always + # image: nginx:latest + # securityContext: + # privileged: true + # env: + # - name: POD_NAME + # valueFrom: + # fieldRef: + # fieldPath: metadata.name + # - name: POD_UID + # valueFrom: + # fieldRef: + # fieldPath: metadata.uid + + nodeSelector: {} tolerations: [] affinity: {}