From b2222fd7829a46f79eea640b3fe576ef91ac9338 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Mon, 23 Jun 2025 20:55:34 +0100 Subject: [PATCH] podAnnotations for all services --- hosting/k8s/helm/templates/clickhouse.yaml | 4 ++ hosting/k8s/helm/templates/electric.yaml | 4 ++ hosting/k8s/helm/templates/minio.yaml | 4 ++ hosting/k8s/helm/templates/postgresql.yaml | 4 ++ hosting/k8s/helm/templates/redis.yaml | 4 ++ hosting/k8s/helm/templates/registry.yaml | 4 ++ hosting/k8s/helm/templates/supervisor.yaml | 13 ++--- hosting/k8s/helm/values.yaml | 58 +++++++++++++--------- 8 files changed, 64 insertions(+), 31 deletions(-) diff --git a/hosting/k8s/helm/templates/clickhouse.yaml b/hosting/k8s/helm/templates/clickhouse.yaml index 6125d33bf..8b2fd4d0f 100644 --- a/hosting/k8s/helm/templates/clickhouse.yaml +++ b/hosting/k8s/helm/templates/clickhouse.yaml @@ -14,6 +14,10 @@ spec: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 6 }} template: metadata: + {{- with .Values.clickhouse.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }} spec: diff --git a/hosting/k8s/helm/templates/electric.yaml b/hosting/k8s/helm/templates/electric.yaml index e6a0ceee4..e140a81ec 100644 --- a/hosting/k8s/helm/templates/electric.yaml +++ b/hosting/k8s/helm/templates/electric.yaml @@ -13,6 +13,10 @@ spec: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 6 }} template: metadata: + {{- with .Values.electric.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }} spec: diff --git a/hosting/k8s/helm/templates/minio.yaml b/hosting/k8s/helm/templates/minio.yaml index 95a0f2dd6..3fcfb319b 100644 --- a/hosting/k8s/helm/templates/minio.yaml +++ b/hosting/k8s/helm/templates/minio.yaml @@ -14,6 +14,10 @@ spec: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 6 }} template: metadata: + {{- with .Values.minio.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }} spec: diff --git a/hosting/k8s/helm/templates/postgresql.yaml b/hosting/k8s/helm/templates/postgresql.yaml index 5497de0e9..b42d48944 100644 --- a/hosting/k8s/helm/templates/postgresql.yaml +++ b/hosting/k8s/helm/templates/postgresql.yaml @@ -14,6 +14,10 @@ spec: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 6 }} template: metadata: + {{- with .Values.postgresql.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }} spec: diff --git a/hosting/k8s/helm/templates/redis.yaml b/hosting/k8s/helm/templates/redis.yaml index 28cf7a8ef..f037bbc86 100644 --- a/hosting/k8s/helm/templates/redis.yaml +++ b/hosting/k8s/helm/templates/redis.yaml @@ -14,6 +14,10 @@ spec: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 6 }} template: metadata: + {{- with .Values.redis.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }} spec: diff --git a/hosting/k8s/helm/templates/registry.yaml b/hosting/k8s/helm/templates/registry.yaml index f695f1f93..528b361a6 100644 --- a/hosting/k8s/helm/templates/registry.yaml +++ b/hosting/k8s/helm/templates/registry.yaml @@ -14,6 +14,10 @@ spec: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 6 }} template: metadata: + {{- with .Values.registry.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }} spec: diff --git a/hosting/k8s/helm/templates/supervisor.yaml b/hosting/k8s/helm/templates/supervisor.yaml index 4f78ab7cf..547fa957e 100644 --- a/hosting/k8s/helm/templates/supervisor.yaml +++ b/hosting/k8s/helm/templates/supervisor.yaml @@ -64,13 +64,10 @@ spec: metadata: labels: {{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }} + {{- with .Values.supervisor.podAnnotations }} annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "{{ .Values.supervisor.service.ports.metrics }}" - prometheus.io/path: "/metrics" - {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} - {{- end }} + {{- end }} spec: serviceAccountName: {{ include "trigger-v4.supervisorServiceAccountName" . }} {{- with .Values.supervisor.podSecurityContext }} @@ -218,15 +215,15 @@ spec: {{- else }} emptyDir: {} {{- end }} - {{- with .Values.nodeSelector }} + {{- with .Values.supervisor.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.affinity }} + {{- with .Values.supervisor.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.tolerations }} + {{- with .Values.supervisor.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/hosting/k8s/helm/values.yaml b/hosting/k8s/helm/values.yaml index e98ffc271..1dcfab547 100644 --- a/hosting/k8s/helm/values.yaml +++ b/hosting/k8s/helm/values.yaml @@ -105,29 +105,23 @@ webapp: basicAuth: {} # OpenTelemetry configuration - # internal: - # otel: - # trace: - # exporterUrl: "" - # exporterAuthHeaders: "" - # loggingEnabled: "1" - # samplingRate: "20" - # instrumentPrismaEnabled: "0" - # disabled: "0" - # log: - # exporterUrl: "" - # # Log auth headers are currently set to trace.exporterAuthHeaders - # metric: - # exporterUrl: "" - # exporterAuthHeaders: "" - # exporterEnabled: "0" - # exporterIntervalMs: 30000 - -nodeSelector: {} - -tolerations: [] - -affinity: {} + internal: + otel: + trace: + exporterUrl: "" + exporterAuthHeaders: "" + loggingEnabled: "1" + samplingRate: "20" + instrumentPrismaEnabled: "0" + disabled: "0" + log: + exporterUrl: "" + # Log auth headers are currently set to trace.exporterAuthHeaders + metric: + exporterUrl: "" + exporterAuthHeaders: "" + exporterEnabled: "0" + exporterIntervalMs: 30000 # Shared application configuration (used by multiple services) config: @@ -171,6 +165,8 @@ postgresql: password: "postgres" database: "main" + podAnnotations: {} + # podSecurityContext: # fsGroup: 1000 @@ -213,6 +209,8 @@ redis: auth: enabled: false + podAnnotations: {} + # podSecurityContext: # fsGroup: 1000 @@ -251,6 +249,8 @@ electric: insecure: true usageReporting: false + podAnnotations: {} + # podSecurityContext: # fsGroup: 1000 @@ -281,6 +281,8 @@ clickhouse: adminUser: "default" adminPassword: "password" + podAnnotations: {} + # podSecurityContext: # fsGroup: 1000 @@ -314,6 +316,8 @@ minio: rootUser: "admin" rootPassword: "very-safe-password" + podAnnotations: {} + # podSecurityContext: # fsGroup: 1000 @@ -350,6 +354,8 @@ registry: username: "registry-user" password: "very-secure-indeed" + podAnnotations: {} + # podSecurityContext: # fsGroup: 1000 @@ -388,6 +394,8 @@ supervisor: tag: "" # Defaults to Chart.appVersion when empty pullPolicy: IfNotPresent + podAnnotations: {} + # podSecurityContext: # fsGroup: 1000 @@ -459,6 +467,10 @@ supervisor: labels: {} basicAuth: {} + nodeSelector: {} + tolerations: [] + affinity: {} + # Shared persistent volumes persistence: # This is used for the worker token file