-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathdeployment.yaml
More file actions
125 lines (125 loc) · 4.92 KB
/
Copy pathdeployment.yaml
File metadata and controls
125 lines (125 loc) · 4.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "gremlin-integrations.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gremlin-integrations.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "gremlin-integrations.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "gremlin-integrations.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "gremlin-integrations.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.gremlin.resources | nindent 12 }}
env:
- name: GREMLIN_TEAM_ID
{{- /* If we aren't managing this secret and a teamID was supplied, assume teamID is not in the external secret */}}
{{- if (and (not .Values.gremlin.secret.managed) (default .Values.gremlin.teamID .Values.gremlin.secret.teamID)) }}
value: {{ default .Values.gremlin.teamID .Values.gremlin.secret.teamID | quote }}
{{- else }}
valueFrom:
secretKeyRef:
name: {{ include "gremlin.secretName" . }}
key: GREMLIN_TEAM_ID
{{- end }}
- name: GREMLIN_SERVICE_URL
value: {{ include "gremlinServiceUrl" .}}
{{- if (eq (include "gremlin.secretType" .) "secret") }}
- name: GREMLIN_TEAM_SECRET
valueFrom:
secretKeyRef:
name: {{ include "gremlin.secretName" . }}
key: GREMLIN_TEAM_SECRET
{{- else }}
- name: GREMLIN_TEAM_CERTIFICATE_OR_FILE
{{- /* If we aren't managing this secret and a teamID was supplied, assume teamID is not in the external secret */}}
{{- if or (not .Values.gremlin.secret.managed) (hasPrefix "-----BEGIN" .Values.gremlin.secret.certificate) }}
value: file:///var/lib/gremlin/cert/gremlin.cert
{{- else }}
value: {{ .Values.gremlin.secret.certificate }}
{{- end }}
- name: GREMLIN_TEAM_PRIVATE_KEY_OR_FILE
{{- if or (not .Values.gremlin.secret.managed) (hasPrefix "-----BEGIN" .Values.gremlin.secret.key) }}
value: file:///var/lib/gremlin/cert/gremlin.key
{{- else }}
value: {{ .Values.gremlin.secret.key }}
{{- end }}
{{- end }}
{{- if .Values.gremlin.allowList }}
- name: GREMLIN_INTEGRATION_AGENT_ALLOW_LIST
value: {{ .Values.gremlin.allowList }}
{{- end }}
{{- if .Values.gremlin.proxy.url }}
- name: https_proxy
value: {{ .Values.gremlin.proxy.url }}
- name: no_proxy
value: $(KUBERNETES_SERVICE_HOST):$(KUBERNETES_SERVICE_PORT)
{{- end }}
{{- if .Values.ssl.certFile }}
- name: SSL_CERT_FILE
value: /etc/gremlin/ssl/certfile.pem
{{- end }}
{{- if .Values.ssl.certDir }}
- name: SSL_CERT_DIR
value: {{ .Values.ssl.certDir }}
{{- end }}
{{- with .Values.gremlin.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- if (eq (include "gremlin.secretType" .) "certificate") }}
- name: gremlin-cert
mountPath: /var/lib/gremlin/cert
readOnly: true
{{- end }}
{{- if .Values.ssl.certFile }}
- name: integrations-ssl-cert-file
mountPath: /etc/gremlin/ssl
readOnly: true
{{- end }}
volumes:
{{- if (eq (include "gremlin.secretType" .) "certificate") }}
- name: gremlin-cert
secret:
secretName: {{ include "gremlin.secretName" . }}
{{- end }}
{{- if .Values.ssl.certFile }}
- name: integrations-ssl-cert-file
secret:
secretName: integrations-ssl-cert-file
{{ end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}