Files
charts/bitnami/wavefront/templates/collector-deployment.yaml
Miguel Ruiz aa1de39836 [bitnami/wavefront] Chart standardised (#9576)
* [bitnami/wavefront] Bump wavefront-proxy version + standardisation

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Regenerate README.md

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Apply suggestions

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Remove unused collector.extraArgs and update README

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Revert major to minor

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* Fix config indent

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* [bitnami/wavefront] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
2022-04-12 12:01:30 +02:00

155 lines
8.1 KiB
YAML

{{- if and .Values.collector.enabled (not .Values.collector.useDaemonset) }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ printf "%s-collector" (include "common.names.fullname" .) }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: collector
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.collector.updateStrategy }}
strategy: {{- toYaml .Values.collector.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: collector
template:
metadata:
{{- if .Values.collector.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.collector.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: collector
{{- if .Values.collector.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.collector.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "wavefront.collector.serviceAccountName" . }}
{{- include "wavefront.imagePullSecrets" . | nindent 6 }}
{{- if .Values.collector.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.collector.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.collector.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.collector.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.collector.podAffinityPreset "component" "collector" "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.collector.podAntiAffinityPreset "component" "collector" "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.collector.nodeAffinityPreset.type "key" .Values.collector.nodeAffinityPreset.key "values" .Values.collector.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.collector.schedulerName }}
schedulerName: {{ .Values.collector.schedulerName }}
{{- end }}
{{- if .Values.collector.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.collector.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.collector.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.collector.nodeSelector "context" $) | nindent 8 }}
{{- end }}
tolerations:
- effect: NoSchedule
key: node.alpha.kubernetes.io/role
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
{{- if .Values.collector.tolerations }}
{{- include "common.tplvalues.render" (dict "value" .Values.collector.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.collector.priorityClassName }}
priorityClassName: {{ .Values.collector.priorityClassName | quote }}
{{- end }}
{{- if .Values.collector.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.collector.terminationGracePeriodSeconds }}
{{- end }}
{{- if .Values.collector.podSecurityContext.enabled }}
securityContext: {{- omit .Values.collector.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.collector.initContainers }}
initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.collector.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: wavefront-collector
image: {{ template "wavefront.collector.image" . }}
imagePullPolicy: {{ .Values.collector.image.pullPolicy }}
{{- if .Values.collector.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.collector.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.collector.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.collector.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.collector.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.collector.command "context" $) | nindent 12 }}
{{- else }}
command:
- /wavefront-collector
{{- end }}
{{- if .Values.collector.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.collector.args "context" $) | nindent 12 }}
{{- else }}
args:
- --daemon=false
- --config-file=/etc/collector/config.yaml
{{- if .Values.collector.maxProcs }}
- --max-procs={{ .Values.collector.maxProcs }}
{{- end }}
{{- if .Values.collector.logLevel }}
- --log-level={{ .Values.collector.logLevel }}
{{- end }}
{{- end }}
env:
{{- if .Values.collector.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.collector.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.collector.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.collector.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.collector.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.collector.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.collector.resources }}
resources: {{- toYaml .Values.collector.resources | nindent 12 }}
{{- end }}
{{- if .Values.collector.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.collector.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.collector.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.collector.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.collector.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.collector.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/collector/
readOnly: true
- name: ssl-certs
mountPath: /etc/ssl/certs
readOnly: true
{{- if .Values.collector.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.collector.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.collector.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.collector.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ include "wavefront.collector.configmapName" . }}
- name: ssl-certs
hostPath:
path: /etc/ssl/certs
{{- if .Values.collector.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.collector.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}