github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/thanos/templates/bucketweb/deployment.yaml (about) 1 {{- if .Values.bucketweb.enabled }} 2 apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} 3 kind: Deployment 4 metadata: 5 name: {{ include "common.names.fullname" . }}-bucketweb 6 namespace: {{ .Release.Namespace | quote }} 7 labels: {{- include "common.labels.standard" . | nindent 4 }} 8 app.kubernetes.io/component: bucketweb 9 {{- if .Values.commonLabels }} 10 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} 11 {{- end }} 12 {{- if .Values.commonAnnotations }} 13 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} 14 {{- end }} 15 spec: 16 {{- if not .Values.bucketweb.autoscaling.enabled }} 17 replicas: {{ .Values.bucketweb.replicaCount }} 18 {{- end }} 19 {{- if .Values.bucketweb.updateStrategy }} 20 strategy: {{- toYaml .Values.bucketweb.updateStrategy | nindent 4 }} 21 {{- end }} 22 selector: 23 matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} 24 app.kubernetes.io/component: bucketweb 25 template: 26 metadata: 27 labels: {{- include "common.labels.standard" . | nindent 8 }} 28 app.kubernetes.io/component: bucketweb 29 {{- if .Values.commonLabels }} 30 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} 31 {{- end }} 32 {{- if .Values.bucketweb.podLabels }} 33 {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.podLabels "context" $) | nindent 8 }} 34 {{- end }} 35 annotations: 36 checksum/objstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") . | sha256sum }} 37 {{- if .Values.bucketweb.podAnnotations }} 38 {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.podAnnotations "context" $) | nindent 8 }} 39 {{- end }} 40 spec: 41 {{- include "thanos.imagePullSecrets" . | nindent 6 }} 42 serviceAccount: {{ include "thanos.serviceAccountName" (dict "component" "bucketweb" "context" $) }} 43 automountServiceAccountToken: {{ .Values.bucketweb.automountServiceAccountToken }} 44 {{- if .Values.bucketweb.hostAliases }} 45 hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.hostAliases "context" $) | nindent 8 }} 46 {{- end }} 47 {{- if .Values.bucketweb.affinity }} 48 affinity: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.affinity "context" $) | nindent 8 }} 49 {{- else }} 50 affinity: 51 podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.bucketweb.podAffinityPreset "component" "bucketweb" "context" $) | nindent 10 }} 52 podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.bucketweb.podAntiAffinityPreset "component" "bucketweb" "context" $) | nindent 10 }} 53 nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.bucketweb.nodeAffinityPreset.type "key" .Values.bucketweb.nodeAffinityPreset.key "values" .Values.bucketweb.nodeAffinityPreset.values) | nindent 10 }} 54 {{- end }} 55 {{- if .Values.bucketweb.nodeSelector }} 56 nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.nodeSelector "context" $) | nindent 8 }} 57 {{- end }} 58 {{- if .Values.bucketweb.tolerations }} 59 tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.tolerations "context" $) | nindent 8 }} 60 {{- end }} 61 {{- if .Values.bucketweb.priorityClassName }} 62 priorityClassName: {{ .Values.bucketweb.priorityClassName | quote }} 63 {{- end }} 64 {{- if .Values.bucketweb.schedulerName }} 65 schedulerName: {{ .Values.bucketweb.schedulerName }} 66 {{- end }} 67 {{- if .Values.bucketweb.podSecurityContext.enabled }} 68 securityContext: {{- omit .Values.bucketweb.podSecurityContext "enabled" | toYaml | nindent 8 }} 69 {{- end }} 70 {{- if .Values.bucketweb.topologySpreadConstraints }} 71 topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.topologySpreadConstraints "context" $) | nindent 8 }} 72 {{- end }} 73 {{- if .Values.bucketweb.initContainers }} 74 initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.initContainers "context" $) | nindent 8 }} 75 {{- end }} 76 containers: 77 {{- if .Values.bucketweb.sidecars }} 78 {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.sidecars "context" $) | nindent 8 }} 79 {{- end }} 80 - name: bucketweb 81 image: {{ include "thanos.image" . }} 82 imagePullPolicy: {{ .Values.image.pullPolicy | quote }} 83 {{- if .Values.bucketweb.containerSecurityContext.enabled }} 84 securityContext: {{- omit .Values.bucketweb.containerSecurityContext "enabled" | toYaml | nindent 12 }} 85 {{- end }} 86 {{- if .Values.bucketweb.command }} 87 command: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.command "context" $) | nindent 12 }} 88 {{- end }} 89 args: 90 {{- if .Values.bucketweb.args }} 91 {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.args "context" $) | nindent 12 }} 92 {{- else }} 93 - tools 94 - bucket 95 - web 96 - --http-address=0.0.0.0:8080 97 - --log.level={{ .Values.bucketweb.logLevel }} 98 - --log.format={{ .Values.bucketweb.logFormat }} 99 - --objstore.config-file=/conf/objstore.yml 100 {{- if .Values.bucketweb.refresh }} 101 - --refresh={{ .Values.bucketweb.refresh }} 102 {{- end }} 103 {{- if .Values.bucketweb.timeout }} 104 - --timeout={{ .Values.bucketweb.timeout }} 105 {{- end }} 106 {{- if (include "thanos.httpConfigEnabled" .) }} 107 - --http.config=/conf/http/http-config.yml 108 {{- end }} 109 {{- if .Values.bucketweb.extraFlags }} 110 {{- .Values.bucketweb.extraFlags | toYaml | nindent 12 }} 111 {{- end }} 112 {{- end }} 113 {{- if .Values.bucketweb.extraEnvVars }} 114 env: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.extraEnvVars "context" $) | nindent 12 }} 115 {{- end }} 116 {{- if or .Values.bucketweb.extraEnvVarsCM .Values.bucketweb.extraEnvVarsSecret }} 117 envFrom: 118 {{- if .Values.bucketweb.extraEnvVarsCM }} 119 - configMapRef: 120 name: {{ include "common.tplvalues.render" (dict "value" .Values.bucketweb.extraEnvVarsCM "context" $) }} 121 {{- end }} 122 {{- if .Values.bucketweb.extraEnvVarsSecret }} 123 - secretRef: 124 name: {{ include "common.tplvalues.render" (dict "value" .Values.bucketweb.extraEnvVarsSecret "context" $) }} 125 {{- end }} 126 {{- end }} 127 ports: 128 - name: http 129 containerPort: 8080 130 protocol: TCP 131 {{- if .Values.bucketweb.customLivenessProbe }} 132 livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.customLivenessProbe "context" $) | nindent 12 }} 133 {{- else if .Values.bucketweb.livenessProbe.enabled }} 134 livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.bucketweb.livenessProbe "enabled") "context" $) | nindent 12 }} 135 {{- if not .Values.auth.basicAuthUsers }} 136 httpGet: 137 path: /-/healthy 138 port: http 139 scheme: {{ ternary "HTTPS" "HTTP" .Values.https.enabled }} 140 {{- else }} 141 tcpSocket: 142 port: http 143 {{- end }} 144 {{- end }} 145 {{- if .Values.bucketweb.customReadinessProbe }} 146 readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.customReadinessProbe "context" $) | nindent 12 }} 147 {{- else if .Values.bucketweb.readinessProbe.enabled }} 148 readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.bucketweb.readinessProbe "enabled") "context" $) | nindent 12 }} 149 {{- if not .Values.auth.basicAuthUsers }} 150 httpGet: 151 path: /-/ready 152 port: http 153 scheme: {{ ternary "HTTPS" "HTTP" .Values.https.enabled }} 154 {{- else }} 155 tcpSocket: 156 port: http 157 {{- end }} 158 {{- end }} 159 {{- if .Values.bucketweb.customStartupProbe }} 160 startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.customStartupProbe "context" $) | nindent 12 }} 161 {{- else if .Values.bucketweb.startupProbe.enabled }} 162 startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.bucketweb.startupProbe "enabled") "context" $) | nindent 12 }} 163 {{- if not .Values.auth.basicAuthUsers }} 164 httpGet: 165 path: /-/ready 166 port: http 167 scheme: {{ ternary "HTTPS" "HTTP" .Values.https.enabled }} 168 {{- else }} 169 tcpSocket: 170 port: http 171 {{- end }} 172 {{- end }} 173 {{- if .Values.bucketweb.lifecycleHooks }} 174 lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.lifecycleHooks "context" $) | nindent 12 }} 175 {{- end }} 176 {{- if .Values.bucketweb.resources }} 177 resources: {{- toYaml .Values.bucketweb.resources | nindent 12 }} 178 {{- end }} 179 volumeMounts: 180 - name: objstore-config 181 mountPath: /conf 182 {{- if (include "thanos.httpConfigEnabled" .) }} 183 - name: http-config 184 mountPath: /conf/http 185 {{- if .Values.https.enabled }} 186 - name: http-certs 187 mountPath: /certs 188 {{- end }} 189 {{- end }} 190 {{- if .Values.bucketweb.extraVolumeMounts }} 191 {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.extraVolumeMounts "context" $) | nindent 12 }} 192 {{- end }} 193 volumes: 194 - name: objstore-config 195 secret: 196 secretName: {{ include "thanos.objstoreSecretName" . }} 197 {{- if .Values.existingObjstoreSecretItems }} 198 items: {{- toYaml .Values.existingObjstoreSecretItems | nindent 14 }} 199 {{- end }} 200 {{- if (include "thanos.httpConfigEnabled" .) }} 201 - name: http-config 202 secret: 203 secretName: {{ include "thanos.httpConfigSecretName" . }} 204 {{- if .Values.https.enabled }} 205 - name: http-certs 206 secret: 207 secretName: {{ include "thanos.httpCertsSecretName" . }} 208 {{- end }} 209 {{- end }} 210 {{- if .Values.bucketweb.extraVolumes }} 211 {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.extraVolumes "context" $) | nindent 8 }} 212 {{- end }} 213 {{- end }}