mirror of
https://github.com/bitnami/charts.git
synced 2026-08-10 14:15:55 +08:00
* Update in preparation for the next chart release. Signed-off-by: Michael Nelson <minelson@vmware.com> * Revert two changes that we overwrote with our dev changes. Signed-off-by: Michael Nelson <minelson@vmware.com> * Avoid empty envFrom Co-authored-by: Juan Ariza Toledano <jariza@vmware.com> Signed-off-by: Michael Nelson <absoludity@gmail.com> * Update param comment for ociCatalog. Co-authored-by: Juan Ariza Toledano <jariza@vmware.com> Signed-off-by: Michael Nelson <absoludity@gmail.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * Update oci-catalog tag. Signed-off-by: Michael Nelson <absoludity@gmail.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * Bump PostgreSQL subchart major version Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> * Update tests for the new version Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> * Update container images version Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> --------- Signed-off-by: Michael Nelson <minelson@vmware.com> Signed-off-by: Michael Nelson <absoludity@gmail.com> Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Co-authored-by: Michael Nelson <minelson@vmware.com> Co-authored-by: Michael Nelson <absoludity@gmail.com> Co-authored-by: Juan Ariza Toledano <jariza@vmware.com> Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
334 lines
19 KiB
YAML
334 lines
19 KiB
YAML
{{- /*
|
|
Copyright VMware, Inc.
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
*/}}
|
|
|
|
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "kubeapps.kubeappsapis.fullname" . }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
app.kubernetes.io/component: kubeappsapis
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
replicas: {{ .Values.kubeappsapis.replicaCount }}
|
|
{{- if .Values.kubeappsapis.updateStrategy }}
|
|
strategy: {{- toYaml .Values.kubeappsapis.updateStrategy | nindent 4 }}
|
|
{{- end }}
|
|
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.kubeappsapis.podLabels .Values.commonLabels ) "context" . ) }}
|
|
selector:
|
|
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
|
app.kubernetes.io/component: kubeappsapis
|
|
template:
|
|
metadata:
|
|
{{- if .Values.kubeappsapis.podAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.podAnnotations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
|
app.kubernetes.io/component: kubeappsapis
|
|
spec:
|
|
{{- include "kubeapps.imagePullSecrets" . | indent 6 }}
|
|
serviceAccountName: {{ template "kubeapps.kubeappsapis.serviceAccountName" . }}
|
|
{{- if .Values.kubeappsapis.hostAliases }}
|
|
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.hostAliases "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.affinity }}
|
|
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.affinity "context" $) | nindent 8 }}
|
|
{{- else }}
|
|
affinity:
|
|
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.kubeappsapis.podAffinityPreset "component" "kubeappsapis" "customLabels" $podLabels "context" $) | nindent 10 }}
|
|
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.kubeappsapis.podAntiAffinityPreset "component" "kubeappsapis" "customLabels" $podLabels "context" $) | nindent 10 }}
|
|
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.kubeappsapis.nodeAffinityPreset.type "key" .Values.kubeappsapis.nodeAffinityPreset.key "values" .Values.kubeappsapis.nodeAffinityPreset.values) | nindent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.schedulerName }}
|
|
schedulerName: {{ .Values.kubeappsapis.schedulerName }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.topologySpreadConstraints }}
|
|
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.topologySpreadConstraints "context" .) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.nodeSelector }}
|
|
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.nodeSelector "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.tolerations }}
|
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.tolerations "context" $) | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.priorityClassName }}
|
|
priorityClassName: {{ .Values.kubeappsapis.priorityClassName | quote }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.podSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.kubeappsapis.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
# Increase termination timeout to let remaining operations to finish before ending the pods
|
|
# This is because new releases/upgrades/deletions are synchronous operations
|
|
terminationGracePeriodSeconds: {{ .Values.kubeappsapis.terminationGracePeriodSeconds }}
|
|
{{- if .Values.kubeappsapis.initContainers }}
|
|
initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.initContainers "context" $) | trim | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: kubeappsapis
|
|
image: {{ include "kubeapps.kubeappsapis.image" . }}
|
|
imagePullPolicy: {{ .Values.kubeappsapis.image.pullPolicy | quote }}
|
|
{{- if .Values.kubeappsapis.containerSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.kubeappsapis.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.lifecycleHooks }}
|
|
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.lifecycleHooks "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.diagnosticMode.enabled }}
|
|
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
|
{{- else if .Values.kubeappsapis.command }}
|
|
command: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.command "context" $) | nindent 12 }}
|
|
{{- else }}
|
|
command:
|
|
- /kubeapps-apis
|
|
{{- end }}
|
|
{{- if .Values.diagnosticMode.enabled }}
|
|
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
|
{{- else if .Values.kubeappsapis.args }}
|
|
args: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.args "context" $) | nindent 12 }}
|
|
{{- else }}
|
|
args:
|
|
{{- $enabledPlugins := include "kubeapps.kubeappsapis.enabledPlugins" . | fromJsonArray }}
|
|
{{- range $enabledPlugins }}
|
|
- --plugin-dir
|
|
- /plugins/{{ . }}
|
|
{{- end }}
|
|
{{- if .Values.clusters }}
|
|
- --clusters-config-path=/config/clusters.conf
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.pluginConfig }}
|
|
- --plugin-config-path=/config/kubeapps-apis/plugins.conf
|
|
{{- end }}
|
|
{{- if .Values.pinnipedProxy.enabled }}
|
|
- --pinniped-proxy-url={{ printf "http%s://%s.%s:%d" (eq .Values.pinnipedProxy.tls.caCertificate "" | ternary "" "s") (include "kubeapps.pinniped-proxy.fullname" .) .Release.Namespace (int .Values.pinnipedProxy.service.ports.pinnipedProxy) }}
|
|
{{- if .Values.pinnipedProxy.tls.caCertificate }}
|
|
- --pinniped-proxy-ca-cert=/etc/pinniped-proxy-tls/ca.crt
|
|
{{- end }}
|
|
{{- end }}
|
|
- --global-repos-namespace={{ include "kubeapps.helmGlobalPackagingNamespace" . }}
|
|
{{- if .Values.kubeappsapis.qps }}
|
|
- --kube-api-qps={{ .Values.kubeappsapis.qps }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.burst }}
|
|
- --kube-api-burst={{ .Values.kubeappsapis.burst }}
|
|
{{- end }}
|
|
{{- range .Values.kubeappsapis.extraFlags }}
|
|
- {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
env:
|
|
- name: GOGC
|
|
value: "50" # default is 100. 50 means increasing x2 the frequency of GC
|
|
- name: PORT
|
|
value: {{ .Values.kubeappsapis.containerPorts.http | quote }}
|
|
{{- if .Values.packaging.flux.enabled }}
|
|
# REDIS-* vars are required by the plugins for caching functionality
|
|
# TODO (gfichtenolt) this as required by the kubeapps apis service (which will
|
|
# longer-term pass something to the plugins so that the plugins won't need to
|
|
# know these details). Currently they're used directly by the flux plugin
|
|
- name: REDIS_ADDR
|
|
value: {{ printf "%s-master.%s.svc.cluster.local:6379" (include "kubeapps.redis.fullname" .) .Release.Namespace }}
|
|
- name: REDIS_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: redis-password
|
|
name: {{ include "kubeapps.redis.secretName" . }}
|
|
- name: REDIS_DB
|
|
value: "0"
|
|
{{- end }}
|
|
# TODO(agamez): pass this configuration using a separated config file
|
|
# These env vars are currently (and temporarily) required by the 'helm' plugin
|
|
{{- if .Values.packaging.helm.enabled }}
|
|
- name: POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: ASSET_SYNCER_DB_URL
|
|
{{- if .Values.postgresql.enabled }}
|
|
value: {{ printf "%s-hl:%d" (include "kubeapps.postgresql.host" .) (int (include "kubeapps.postgresql.port" .)) }}
|
|
{{- else }}
|
|
value: {{ printf "%s:%d" (include "kubeapps.postgresql.host" .) (int (include "kubeapps.postgresql.port" .)) }}
|
|
{{- end }}
|
|
- name: ASSET_SYNCER_DB_NAME
|
|
value: {{ .Values.postgresql.auth.database | quote }}
|
|
- name: ASSET_SYNCER_DB_USERNAME
|
|
value: {{ .Values.postgresql.auth.username | quote }}
|
|
- name: ASSET_SYNCER_DB_USERPASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: postgres-password
|
|
name: {{ include "kubeapps.postgresql.secretName" . }}
|
|
{{- if .Values.ociCatalog.enabled }}
|
|
- name: OCI_CATALOG_URL
|
|
value: {{ printf ":%d" (int .Values.ociCatalog.containerPorts.grpc) | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.extraEnvVars }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.extraEnvVars "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
envFrom:
|
|
{{- if .Values.kubeappsapis.extraEnvVarsCM }}
|
|
- configMapRef:
|
|
name: {{ include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.extraEnvVarsCM "context" $) }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.extraEnvVarsSecret }}
|
|
- secretRef:
|
|
name: {{ include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.extraEnvVarsSecret "context" $) }}
|
|
{{- end }}
|
|
ports:
|
|
- name: grpc-http
|
|
containerPort: {{ .Values.kubeappsapis.containerPorts.http }}
|
|
{{- if not .Values.diagnosticMode.enabled }}
|
|
{{- if .Values.kubeappsapis.customLivenessProbe }}
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.customLivenessProbe "context" $) | nindent 12 }}
|
|
{{- else if .Values.kubeappsapis.livenessProbe.enabled }}
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.kubeappsapis.livenessProbe "enabled") "context" $) | nindent 12 }}
|
|
exec:
|
|
command: ["grpc_health_probe", "-addr=:{{ .Values.kubeappsapis.containerPorts.http }}"]
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.customReadinessProbe }}
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.customReadinessProbe "context" $) | nindent 12 }}
|
|
{{- else if .Values.kubeappsapis.readinessProbe.enabled }}
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.kubeappsapis.readinessProbe "enabled") "context" $) | nindent 12 }}
|
|
exec:
|
|
command: ["grpc_health_probe", "-addr=:{{ .Values.kubeappsapis.containerPorts.http }}"]
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.customStartupProbe }}
|
|
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.customStartupProbe "context" $) | nindent 12 }}
|
|
{{- else if .Values.kubeappsapis.startupProbe.enabled }}
|
|
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.kubeappsapis.startupProbe "enabled") "context" $) | nindent 12 }}
|
|
tcpSocket:
|
|
port: grpc-http
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.resources }}
|
|
resources: {{- toYaml .Values.kubeappsapis.resources | nindent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
{{- if .Values.clusters }}
|
|
- name: clusters-config
|
|
mountPath: /config
|
|
- name: ca-certs
|
|
mountPath: /etc/additional-clusters-cafiles
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.pluginConfig }}
|
|
- name: plugins-config
|
|
mountPath: /config/kubeapps-apis
|
|
{{- end }}
|
|
{{- if .Values.pinnipedProxy.tls.caCertificate }}
|
|
- name: pinniped-proxy-ca-cert
|
|
mountPath: /etc/pinniped-proxy-tls
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.extraVolumeMounts }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.extraVolumeMounts "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.ociCatalog.enabled }}
|
|
- name: oci-catalog
|
|
image: {{ include "kubeapps.ociCatalog.image" . }}
|
|
imagePullPolicy: {{ .Values.ociCatalog.image.pullPolicy | quote }}
|
|
{{- if .Values.ociCatalog.containerSecurityContext.enabled }}
|
|
securityContext: {{- omit .Values.ociCatalog.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.lifecycleHooks }}
|
|
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.lifecycleHooks "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.diagnosticMode.enabled }}
|
|
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
|
{{- else if .Values.ociCatalog.command }}
|
|
command: {{- include "common.tplvalues.render" (dict "value" .Values.ociCatalog.command "context" $) | nindent 12 }}
|
|
{{- else }}
|
|
command:
|
|
- /oci-catalog
|
|
{{- end }}
|
|
{{- if .Values.diagnosticMode.enabled }}
|
|
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
|
{{- else if .Values.ociCatalog.args }}
|
|
args: {{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.args "context" $) | nindent 12 }}
|
|
{{- else }}
|
|
args:
|
|
{{- range .Values.ociCatalog.extraFlags }}
|
|
- {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
env:
|
|
- name: OCI_CATALOG_PORT
|
|
value: {{ .Values.ociCatalog.containerPorts.grpc | quote }}
|
|
- name: RUST_LOG
|
|
# Use info,pinniped_proxy::pinniped=debug for module control.
|
|
value: info
|
|
{{- if .Values.ociCatalog.extraEnvVars }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.ociCatalog.extraEnvVars "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- if or .Values.ociCatalog.extraEnvVarsCM .Values.ociCatalog.extraEnvVarsSecret }}
|
|
envFrom:
|
|
{{- if .Values.ociCatalog.extraEnvVarsCM }}
|
|
- configMapRef:
|
|
name: {{ include "common.tplvalues.render" (dict "value" .Values.ociCatalog.extraEnvVarsCM "context" $) }}
|
|
{{- end }}
|
|
{{- if .Values.ociCatalog.extraEnvVarsSecret }}
|
|
- secretRef:
|
|
name: {{ include "common.tplvalues.render" (dict "value" .Values.ociCatalog.extraEnvVarsSecret "context" $) }}
|
|
{{- end }}
|
|
{{- end }}
|
|
ports:
|
|
- name: grpc
|
|
containerPort: {{ .Values.ociCatalog.containerPorts.grpc }}
|
|
{{- if not .Values.diagnosticMode.enabled }}
|
|
{{- if .Values.ociCatalog.customLivenessProbe }}
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ociCatalog.customLivenessProbe "context" $) | nindent 12 }}
|
|
{{- else if .Values.ociCatalog.livenessProbe.enabled }}
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.kubeappsapis.livenessProbe "enabled") "context" $) | nindent 12 }}
|
|
exec:
|
|
command: ["grpc_health_probe", "-addr=:{{ .Values.ociCatalog.containerPorts.grpc }}"]
|
|
{{- end }}
|
|
{{- if .Values.ociCatalog.customReadinessProbe }}
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ociCatalog.customReadinessProbe "context" $) | nindent 12 }}
|
|
{{- else if .Values.ociCatalog.readinessProbe.enabled }}
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.ociCatalog.readinessProbe "enabled") "context" $) | nindent 12 }}
|
|
exec:
|
|
command: ["grpc_health_probe", "-addr=:{{ .Values.ociCatalog.containerPorts.grpc }}"]
|
|
{{- end }}
|
|
{{- if .Values.ociCatalog.customStartupProbe }}
|
|
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.ociCatalog.customStartupProbe "context" $) | nindent 12 }}
|
|
{{- else if .Values.ociCatalog.startupProbe.enabled }}
|
|
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.ociCatalog.startupProbe "enabled") "context" $) | nindent 12 }}
|
|
tcpSocket:
|
|
port: grpc-http
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.ociCatalog.resources }}
|
|
resources: {{- toYaml .Values.ociCatalog.resources | nindent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
{{- if .Values.ociCatalog.extraVolumeMounts }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.ociCatalog.extraVolumeMounts "context" $) | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.sidecars }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.sidecars "context" $) | trim | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if .Values.clusters }}
|
|
- name: clusters-config
|
|
configMap:
|
|
name: {{ template "kubeapps.clusters-config.fullname" . }}
|
|
- name: ca-certs
|
|
emptyDir: {}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.pluginConfig }}
|
|
- name: plugins-config
|
|
configMap:
|
|
name: {{ template "kubeapps.kubeappsapis.fullname" . }}-configmap
|
|
{{- end }}
|
|
{{- if .Values.pinnipedProxy.tls.caCertificate }}
|
|
- name: pinniped-proxy-ca-cert
|
|
configMap:
|
|
name: {{ .Values.pinnipedProxy.tls.caCertificate }}
|
|
{{- end }}
|
|
{{- if .Values.kubeappsapis.extraVolumes }}
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.kubeappsapis.extraVolumes "context" $) | nindent 8 }}
|
|
{{- end }}
|