mirror of
https://github.com/bitnami/charts.git
synced 2026-03-15 14:57:16 +08:00
113 lines
5.6 KiB
YAML
113 lines
5.6 KiB
YAML
{{- if .Values.bucketweb.enabled }}
|
|
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "common.names.fullname" . }}-bucketweb
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: bucketweb
|
|
spec:
|
|
replicas: {{ .Values.bucketweb.replicaCount }}
|
|
strategy:
|
|
type: {{ .Values.bucketweb.strategyType }}
|
|
{{- if (eq "Recreate" .Values.bucketweb.strategyType) }}
|
|
rollingUpdate: null
|
|
{{- end }}
|
|
selector:
|
|
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: bucketweb
|
|
template:
|
|
metadata:
|
|
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
|
app.kubernetes.io/component: bucketweb
|
|
{{- if and .Values.bucketweb.enabled .Values.bucketweb.podLabels }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.podLabels "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
annotations:
|
|
checksum/ojbstore-configuration: {{ include (print $.Template.BasePath "/objstore-secret.yaml") . | sha256sum }}
|
|
{{- if .Values.bucketweb.podAnnotations }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.podAnnotations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- include "thanos.imagePullSecrets" . | nindent 6 }}
|
|
serviceAccount: {{ include "thanos.serviceaccount.name" (dict "component" "bucketweb" "context" $) }}
|
|
{{- if .Values.bucketweb.hostAliases }}
|
|
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.hostAliases "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.affinity }}
|
|
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.affinity "context" $) | nindent 8 }}
|
|
{{- else }}
|
|
affinity:
|
|
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.bucketweb.podAffinityPreset "component" "bucketweb" "context" $) | nindent 10 }}
|
|
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.bucketweb.podAntiAffinityPreset "component" "bucketweb" "context" $) | nindent 10 }}
|
|
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.bucketweb.nodeAffinityPreset.type "key" .Values.bucketweb.nodeAffinityPreset.key "values" .Values.bucketweb.nodeAffinityPreset.values) | nindent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.nodeSelector }}
|
|
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.nodeSelector "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.tolerations }}
|
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.tolerations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.priorityClassName }}
|
|
priorityClassName: {{ .Values.bucketweb.priorityClassName | quote }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.securityContext.enabled }}
|
|
securityContext:
|
|
runAsUser: {{ .Values.bucketweb.securityContext.runAsUser }}
|
|
fsGroup: {{ .Values.bucketweb.securityContext.fsGroup }}
|
|
{{- end }}
|
|
containers:
|
|
- name: bucketweb
|
|
image: {{ include "thanos.image" . }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
|
args:
|
|
- tools
|
|
- bucket
|
|
- web
|
|
- --http-address=0.0.0.0:8080
|
|
- --log.level={{ .Values.bucketweb.logLevel }}
|
|
- --log.format={{ .Values.bucketweb.logFormat }}
|
|
- --objstore.config-file=/conf/objstore.yml
|
|
{{- if .Values.bucketweb.refresh }}
|
|
- --refresh={{ .Values.bucketweb.refresh }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.timeout }}
|
|
- --timeout={{ .Values.bucketweb.timeout }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.extraFlags }}
|
|
{{- .Values.bucketweb.extraFlags | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.extraEnv }}
|
|
env:
|
|
{{- toYaml .Values.bucketweb.extraEnv | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
{{- if .Values.bucketweb.livenessProbe }}
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.livenessProbe "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.readinessProbe }}
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.readinessProbe "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.resources }}
|
|
resources: {{- toYaml .Values.bucketweb.resources | nindent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: objstore-config
|
|
mountPath: /conf
|
|
{{- if .Values.bucketweb.extraVolumeMounts }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.extraVolumeMounts "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: objstore-config
|
|
secret:
|
|
secretName: {{ include "thanos.objstoreSecretName" . }}
|
|
{{- if .Values.existingObjstoreSecretItems }}
|
|
items: {{- toYaml .Values.existingObjstoreSecretItems | nindent 14 }}
|
|
{{- end }}
|
|
{{- if .Values.bucketweb.extraVolumes }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.bucketweb.extraVolumes "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|