Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support some missing configs on console, vault and grafana components #1193

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ spec:
tolerations:
{{ toYaml .Values.grafana.tolerations | indent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.grafana.affinity "Component" .Values.grafana.component "Release" .Release "Chart" .Chart) | indent 8 }}
terminationGracePeriodSeconds: {{ .Values.grafana.gracePeriod }}
containers:
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.grafana.component }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ spec:
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets: {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.streamnative_console.nodeSelector }}
nodeSelector: {{- toYaml .Values.streamnative_console.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.streamnative_console.tolerations }}
tolerations: {{- toYaml .Values.streamnative_console.tolerations | nindent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.streamnative_console.affinity "Component" .Values.streamnative_console.component "Release" .Release "Chart" .Chart) | indent 8 }}
{{- if not .Values.istio.enabled }}
initContainers:
# This init container will wait for broker to be ready before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ spec:
tolerations:
{{ toYaml .Values.streamnative_console.tolerations | indent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.streamnative_console.affinity "Component" .Values.streamnative_console.component "Release" .Release "Chart" .Chart) | indent 8 }}
terminationGracePeriodSeconds: {{ .Values.streamnative_console.gracePeriod }}
{{- if not .Values.istio.enabled }}
initContainers:
Expand Down
16 changes: 15 additions & 1 deletion charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1703,14 +1703,14 @@ prometheus:
requests:
memory: 256Mi
cpu: 0.1
# Definition of the serviceAccount used to run brokers.
affinity:
anti_affinity: true
zone_anti_affinity: true
# Set the anti affinity type. Valid values:
# requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
# Definition of the serviceAccount used to run brokers.
serviceAccount:
# Specifies whether to use a service account to run this component
use: true
Expand Down Expand Up @@ -1863,6 +1863,13 @@ grafana:
requests:
memory: 250Mi
cpu: 0.1
affinity:
anti_affinity: true
zone_anti_affinity: true
# Set the anti affinity type. Valid values:
# requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
volumes:
# use a persistent volume or emptyDir
persistence: true
Expand Down Expand Up @@ -2018,6 +2025,13 @@ streamnative_console:
limits: {}
# memory: "1Gi"
# cpu: "0.4"
affinity:
anti_affinity: true
zone_anti_affinity: true
# Set the anti affinity type. Valid values:
# requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
volumes:
# use a persistent volume or emptyDir
persistence: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
tolerations:
{{ toYaml .Values.grafana.tolerations | indent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.grafana.affinity "Component" .Values.grafana.component "Release" .Release "Chart" .Chart) | indent 8 }}
terminationGracePeriodSeconds: {{ .Values.grafana.gracePeriod }}
{{- if .Values.grafana.volumes.securityContext }}
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ spec:
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets: {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.streamnative_console.nodeSelector }}
nodeSelector: {{- toYaml .Values.streamnative_console.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.streamnative_console.tolerations }}
tolerations: {{- toYaml .Values.streamnative_console.tolerations | nindent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.streamnative_console.affinity "Component" .Values.streamnative_console.component "Release" .Release "Chart" .Chart) | indent 8 }}
{{- if not .Values.istio.enabled }}
initContainers:
# This init container will wait for broker to be ready before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ spec:
tolerations:
{{ toYaml .Values.streamnative_console.tolerations | indent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.streamnative_console.affinity "Component" .Values.streamnative_console.component "Release" .Release "Chart" .Chart) | indent 8 }}
terminationGracePeriodSeconds: {{ .Values.streamnative_console.gracePeriod }}
{{- if not .Values.istio.enabled }}
initContainers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ template "pulsar.vault.serviceAccount" . }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets: {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.vault.tolerations }}
tolerations:
{{ toYaml .Values.vault.tolerations | indent 8 }}
{{- end }}
{{- if .Values.vault.nodeSelector }}
nodeSelector:
{{ toYaml .Values.vault.nodeSelector | indent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.vault.affinity "Component" .Values.vault.component "Release" .Release "Chart" .Chart) | indent 8 }}
containers:
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.vault.component }}-init"
image: "{{ .Values.images.vault_init.repository }}:{{ .Values.images.vault_init.tag }}"
Expand Down
10 changes: 10 additions & 0 deletions charts/sn-platform/templates/vault/vault-initialize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ spec:
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets: {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.vault.tolerations }}
tolerations:
{{ toYaml .Values.vault.tolerations | indent 8 }}
{{- end }}
{{- if .Values.vault.nodeSelector }}
nodeSelector:
{{ toYaml .Values.vault.nodeSelector | indent 8 }}
{{- end }}
affinity:
{{- include "pulsar.antiAffinityRules" (dict "Values" .Values "thisAffinity" .Values.vault.affinity "Component" .Values.vault.component "Release" .Release "Chart" .Chart) | indent 8 }}
containers:
- name: "{{ template "pulsar.fullname" . }}-{{ .Values.vault.component }}-init"
image: "{{ .Values.images.vault_init.repository }}:{{ .Values.images.vault_init.tag }}"
Expand Down
16 changes: 15 additions & 1 deletion charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1784,14 +1784,14 @@ prometheus:
requests:
memory: 256Mi
cpu: 0.1
# Definition of the serviceAccount used to run brokers.
affinity:
anti_affinity: true
zone_anti_affinity: true
# Set the anti affinity type. Valid values:
# requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
# Definition of the serviceAccount used to run brokers.
serviceAccount:
# Specifies whether to use a service account to run this component
use: true
Expand Down Expand Up @@ -1944,6 +1944,13 @@ grafana:
labels: {}
annotations: {}
tolerations: []
affinity:
anti_affinity: true
zone_anti_affinity: true
# Set the anti affinity type. Valid values:
# requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
gracePeriod: 0
port: 3000
resources:
Expand Down Expand Up @@ -2097,6 +2104,13 @@ streamnative_console:
podLabels: {}
podAnnotations: {}
tolerations: []
affinity:
anti_affinity: true
zone_anti_affinity: true
# Set the anti affinity type. Valid values:
# requiredDuringSchedulingIgnoredDuringExecution - rules must be met for pod to be scheduled (hard) requires at least one node per replica
# preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee
type: preferredDuringSchedulingIgnoredDuringExecution
gracePeriod: 0
# Resources requests/limits for both init containers and app containers
# See https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#resources
Expand Down
Loading