|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "cyberark-disco-agent.fullname" . }} |
| 5 | + labels: |
| 6 | + {{- include "cyberark-disco-agent.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + replicas: {{ .Values.replicaCount }} |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + {{- include "cyberark-disco-agent.selectorLabels" . | nindent 6 }} |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + {{- with .Values.podAnnotations }} |
| 15 | + annotations: |
| 16 | + {{- toYaml . | nindent 8 }} |
| 17 | + {{- end }} |
| 18 | + labels: |
| 19 | + {{- include "cyberark-disco-agent.labels" . | nindent 8 }} |
| 20 | + {{- with .Values.podLabels }} |
| 21 | + {{- toYaml . | nindent 8 }} |
| 22 | + {{- end }} |
| 23 | + spec: |
| 24 | + {{- with .Values.imagePullSecrets }} |
| 25 | + imagePullSecrets: |
| 26 | + {{- toYaml . | nindent 8 }} |
| 27 | + {{- end }} |
| 28 | + serviceAccountName: {{ include "cyberark-disco-agent.serviceAccountName" . }} |
| 29 | + {{- with .Values.podSecurityContext }} |
| 30 | + securityContext: |
| 31 | + {{- toYaml . | nindent 8 }} |
| 32 | + {{- end }} |
| 33 | + containers: |
| 34 | + - name: {{ .Chart.Name }} |
| 35 | + {{- with .Values.securityContext }} |
| 36 | + securityContext: |
| 37 | + {{- toYaml . | nindent 12 }} |
| 38 | + {{- end }} |
| 39 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 40 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 41 | + env: |
| 42 | + - name: POD_NAMESPACE |
| 43 | + valueFrom: |
| 44 | + fieldRef: |
| 45 | + fieldPath: metadata.namespace |
| 46 | + - name: POD_NAME |
| 47 | + valueFrom: |
| 48 | + fieldRef: |
| 49 | + fieldPath: metadata.name |
| 50 | + - name: POD_UID |
| 51 | + valueFrom: |
| 52 | + fieldRef: |
| 53 | + fieldPath: metadata.uid |
| 54 | + - name: POD_NODE |
| 55 | + valueFrom: |
| 56 | + fieldRef: |
| 57 | + fieldPath: spec.nodeName |
| 58 | + - name: ARK_USERNAME |
| 59 | + valueFrom: |
| 60 | + secretKeyRef: |
| 61 | + name: {{ .Values.authentication.secretName }} |
| 62 | + key: ARK_USERNAME |
| 63 | + - name: ARK_SECRET |
| 64 | + valueFrom: |
| 65 | + secretKeyRef: |
| 66 | + name: {{ .Values.authentication.secretName }} |
| 67 | + key: ARK_SECRET |
| 68 | + - name: ARK_PLATFORM_DOMAIN |
| 69 | + valueFrom: |
| 70 | + secretKeyRef: |
| 71 | + name: {{ .Values.authentication.secretName }} |
| 72 | + key: ARK_PLATFORM_DOMAIN |
| 73 | + - name: ARK_SUBDOMAIN |
| 74 | + valueFrom: |
| 75 | + secretKeyRef: |
| 76 | + name: {{ .Values.authentication.secretName }} |
| 77 | + key: ARK_SUBDOMAIN |
| 78 | + {{- with .Values.http_proxy }} |
| 79 | + - name: HTTP_PROXY |
| 80 | + value: {{ . }} |
| 81 | + {{- end }} |
| 82 | + {{- with .Values.https_proxy }} |
| 83 | + - name: HTTPS_PROXY |
| 84 | + value: {{ . }} |
| 85 | + {{- end }} |
| 86 | + {{- with .Values.no_proxy }} |
| 87 | + - name: NO_PROXY |
| 88 | + value: {{ . }} |
| 89 | + {{- end }} |
| 90 | + args: |
| 91 | + - "agent" |
| 92 | + - "-c" |
| 93 | + - "/etc/cyberark-disco-agent/config.yaml" |
| 94 | + - --machine-hub |
| 95 | + {{- if .Values.metrics.enabled }} |
| 96 | + - --enable-metrics |
| 97 | + {{- end }} |
| 98 | + {{- range .Values.extraArgs }} |
| 99 | + - {{ . | quote }} |
| 100 | + {{- end }} |
| 101 | + {{- with .Values.resources }} |
| 102 | + resources: |
| 103 | + {{- toYaml . | nindent 12 }} |
| 104 | + {{- end }} |
| 105 | + volumeMounts: |
| 106 | + - name: config |
| 107 | + mountPath: "/etc/cyberark-disco-agent" |
| 108 | + readOnly: true |
| 109 | + {{- with .Values.volumeMounts }} |
| 110 | + {{- toYaml . | nindent 12 }} |
| 111 | + {{- end }} |
| 112 | + volumes: |
| 113 | + - name: config |
| 114 | + configMap: |
| 115 | + name: {{ include "cyberark-disco-agent.fullname" . }}-config |
| 116 | + optional: false |
| 117 | + {{- with .Values.volumes }} |
| 118 | + {{- toYaml . | nindent 8 }} |
| 119 | + {{- end }} |
| 120 | + {{- with .Values.nodeSelector }} |
| 121 | + nodeSelector: |
| 122 | + {{- toYaml . | nindent 8 }} |
| 123 | + {{- end }} |
| 124 | + {{- with .Values.affinity }} |
| 125 | + affinity: |
| 126 | + {{- toYaml . | nindent 8 }} |
| 127 | + {{- end }} |
| 128 | + {{- with .Values.tolerations }} |
| 129 | + tolerations: |
| 130 | + {{- toYaml . | nindent 8 }} |
| 131 | + {{- end }} |
0 commit comments