diff --git a/library/ix-dev/charts/minio/Chart.yaml b/library/ix-dev/charts/minio/Chart.yaml index a1eeeb1759..3ea7fb9348 100644 --- a/library/ix-dev/charts/minio/Chart.yaml +++ b/library/ix-dev/charts/minio/Chart.yaml @@ -3,7 +3,7 @@ description: High Performance, Kubernetes Native Object Storage annotations: title: MinIO type: application -version: 1.7.22 +version: 1.7.23 apiVersion: v2 appVersion: '2023-03-13' kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/charts/minio/questions.yaml b/library/ix-dev/charts/minio/questions.yaml index b952854240..306da9dfbc 100644 --- a/library/ix-dev/charts/minio/questions.yaml +++ b/library/ix-dev/charts/minio/questions.yaml @@ -55,7 +55,7 @@ questions: group: "Workload Configuration" schema: type: string - default: "RollingUpdate" + default: "Recreate" enum: - value: "RollingUpdate" description: "Create new pods and then kill old ones" diff --git a/library/ix-dev/charts/minio/templates/deployment.yaml b/library/ix-dev/charts/minio/templates/deployment.yaml index 3c90401b08..2eaee3d75c 100644 --- a/library/ix-dev/charts/minio/templates/deployment.yaml +++ b/library/ix-dev/charts/minio/templates/deployment.yaml @@ -4,12 +4,12 @@ apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: - name: {{ template "common.names.fullname" . }} + name: {{ template "common.names.fullname" . }}-minio labels: app: {{ template "common.names.name" . }} - chart: {{ template "common.names.chart" . }} release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + app.kubernetes.io/name: {{ template "common.names.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} annotations: rollme: {{ randAlphaNum 5 | quote }} spec: @@ -20,12 +20,12 @@ spec: matchLabels: app: {{ template "common.names.name" . }} release: {{ .Release.Name }} + app.kubernetes.io/name: {{ template "common.names.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: name: {{ template "common.names.fullname" . }} labels: - app: {{ template "common.names.name" . }} - release: {{ .Release.Name }} {{- include "common.labels.selectorLabels" . | nindent 8 }} annotations: {{ include "common.annotations" . | nindent 8 }} spec: @@ -43,7 +43,7 @@ spec: command: - sh - -c - - "until curl $apiURL/status; do sleep 2; done" + - "until curl --silent $apiURL/status; do sleep 2; done" {{ end }} containers: - name: {{ .Chart.Name }} diff --git a/library/ix-dev/charts/minio/templates/logsearchapi-deployment.yaml b/library/ix-dev/charts/minio/templates/logsearchapi-deployment.yaml index 9a88dd46b3..abe0e2774d 100644 --- a/library/ix-dev/charts/minio/templates/logsearchapi-deployment.yaml +++ b/library/ix-dev/charts/minio/templates/logsearchapi-deployment.yaml @@ -1,6 +1,6 @@ {{ if .Values.logsearchapi.enabled }} {{ $values := (. | mustDeepCopy) }} -{{ $_ := set $values "common" (dict "nameSuffix" (include "logsearchapi.nameSuffix" .)) }} +{{ $_ := set $values "common" (dict "nameSuffix" (printf "%s-log" (include "logsearchapi.nameSuffix" .))) }} {{ $pg_values := (. | mustDeepCopy) }} {{ $_ := set $pg_values "common" (dict "nameSuffix" (include "postgres.nameSuffix" .)) }} {{ include "common.deployment.common_config" $values | nindent 0 }} diff --git a/library/ix-dev/charts/minio/templates/logsearchapi-secret.yaml b/library/ix-dev/charts/minio/templates/logsearchapi-secret.yaml index a8a233d7e7..0478e5bc04 100644 --- a/library/ix-dev/charts/minio/templates/logsearchapi-secret.yaml +++ b/library/ix-dev/charts/minio/templates/logsearchapi-secret.yaml @@ -1,4 +1,3 @@ -{{ if .Values.logsearchapi.enabled }} {{ $logSearchValues := (. | mustDeepCopy) }} {{ $_ := set $logSearchValues "common" (dict "nameSuffix" (include "logsearchapi.nameSuffix" .)) }} @@ -20,6 +19,5 @@ data: {{ end }} queryToken: {{ $queryToken }} - logQueryURL: {{ (printf "http://%v:8080" (include "common.names.fullname" $logSearchValues)) | b64enc }} - webhookURL: {{ (printf "http://%v:8080/api/ingest?token=%v" (include "common.names.fullname" $logSearchValues) ($auditToken | b64dec)) | b64enc }} -{{ end }} + logQueryURL: {{ (printf "http://%v-log:8080" (include "common.names.fullname" $logSearchValues)) | b64enc }} + webhookURL: {{ (printf "http://%v-log:8080/api/ingest?token=%v" (include "common.names.fullname" $logSearchValues) ($auditToken | b64dec)) | b64enc }} diff --git a/library/ix-dev/charts/minio/templates/logsearchapi-service.yaml b/library/ix-dev/charts/minio/templates/logsearchapi-service.yaml index f9db1a86cf..0ddfa91c4e 100644 --- a/library/ix-dev/charts/minio/templates/logsearchapi-service.yaml +++ b/library/ix-dev/charts/minio/templates/logsearchapi-service.yaml @@ -1,6 +1,8 @@ +{{ if .Values.logsearchapi.enabled }} {{ $ports := list }} {{ $ports = mustAppend $ports (dict "name" "logsearchapi-tcp" "port" 8080 "targetPort" 8080) }} {{ $values := (. | mustDeepCopy) }} -{{ $_ := set $values "common" (dict "nameSuffix" (include "logsearchapi.nameSuffix" .)) }} +{{ $_ := set $values "common" (dict "nameSuffix" (printf "%s-log" (include "logsearchapi.nameSuffix" .))) }} {{ $_1 := set $values "commonService" (dict "type" "ClusterIP" "ports" $ports ) }} {{ include "common.classes.service" $values }} +{{ end }} diff --git a/library/ix-dev/charts/minio/templates/postgres-deployment.yaml b/library/ix-dev/charts/minio/templates/postgres-deployment.yaml index 521fd7b152..204ff44fdb 100644 --- a/library/ix-dev/charts/minio/templates/postgres-deployment.yaml +++ b/library/ix-dev/charts/minio/templates/postgres-deployment.yaml @@ -1,6 +1,6 @@ {{ if .Values.logsearchapi.enabled }} {{ $values := (. | mustDeepCopy) }} -{{ $_ := set $values "common" (dict "nameSuffix" (include "postgres.nameSuffix" .)) }} +{{ $_ := set $values "common" (dict "nameSuffix" (printf "%s-pg" (include "postgres.nameSuffix" .))) }} {{ include "common.deployment.common_config" $values | nindent 0 }} spec: replicas: {{ (default 1 .Values.replicas) }} @@ -8,6 +8,8 @@ spec: type: Recreate selector: matchLabels: + app.kubernetes.io/name: {{ template "common.names.name" $values }} + app.kubernetes.io/instance: {{ .Release.Name }}-postgres-pg app: {{ template "common.names.name" . }} release: {{ .Release.Name }} template: {{ include "common.deployment.pod.metadata" $values | nindent 4 }} diff --git a/library/ix-dev/charts/minio/templates/postgres-secret.yaml b/library/ix-dev/charts/minio/templates/postgres-secret.yaml index 563c2b2d15..2d7a4fac37 100644 --- a/library/ix-dev/charts/minio/templates/postgres-secret.yaml +++ b/library/ix-dev/charts/minio/templates/postgres-secret.yaml @@ -1,4 +1,3 @@ -{{ if .Values.logsearchapi.enabled }} {{ $pgValues := (. | mustDeepCopy) }} {{ $_ := set $pgValues "common" (dict "nameSuffix" (include "postgres.nameSuffix" .)) }} @@ -17,6 +16,5 @@ data: db_user: {{ include "postgres.dbUser" . | b64enc }} db_name: {{ include "postgres.dbName" . | b64enc }} - postgresURL: {{ printf "postgres://%v:%v@%v:5432/%v?sslmode=disable" (include "postgres.dbUser" .) ($dbPass | b64dec) (include "common.names.fullname" $pgValues) (include "postgres.dbName" .) | b64enc }} - postgresHost: {{ printf "%v" (include "common.names.fullname" $pgValues) | b64enc }} -{{ end }} + postgresURL: {{ printf "postgres://%v:%v@%v-pg:5432/%v?sslmode=disable" (include "postgres.dbUser" .) ($dbPass | b64dec) (include "common.names.fullname" $pgValues) (include "postgres.dbName" .) | b64enc }} + postgresHost: {{ printf "%v-pg" (include "common.names.fullname" $pgValues) | b64enc }} diff --git a/library/ix-dev/charts/minio/templates/postgres-service.yaml b/library/ix-dev/charts/minio/templates/postgres-service.yaml index 2bdb1e8a97..d5de40df64 100644 --- a/library/ix-dev/charts/minio/templates/postgres-service.yaml +++ b/library/ix-dev/charts/minio/templates/postgres-service.yaml @@ -1,6 +1,8 @@ +{{ if .Values.logsearchapi.enabled }} {{ $ports := list }} {{ $ports = mustAppend $ports (dict "name" "postgres-tcp" "port" 5432 "targetPort" 5432) }} {{ $values := (. | mustDeepCopy) }} -{{ $_ := set $values "common" (dict "nameSuffix" (include "postgres.nameSuffix" .)) }} +{{ $_ := set $values "common" (dict "nameSuffix" (printf "%s-pg" (include "postgres.nameSuffix" .))) }} {{ $_1 := set $values "commonService" (dict "type" "ClusterIP" "ports" $ports ) }} {{ include "common.classes.service" $values }} +{{ end }} diff --git a/library/ix-dev/charts/minio/templates/service.yaml b/library/ix-dev/charts/minio/templates/service.yaml index cbb4afc3dc..8bb8fdb9d3 100644 --- a/library/ix-dev/charts/minio/templates/service.yaml +++ b/library/ix-dev/charts/minio/templates/service.yaml @@ -1,13 +1,14 @@ -{{ if eq (include "minio.hostNetworking" .) "false" }} -{{ $svc := .Values.service }} {{ $selectors := list }} {{ $selectors = mustAppend $selectors (dict "key" "app" "value" (include "common.names.name" .) ) }} {{ $selectors = mustAppend $selectors (dict "key" "release" "value" .Release.Name ) }} +{{ $_1 := set .Values "extraSelectorLabels" $selectors }} + +{{ if eq (include "minio.hostNetworking" .) "false" }} +{{ $svc := .Values.service }} {{ $ports := list }} {{ $ports = mustAppend $ports (dict "name" "api" "port" $svc.nodePort "nodePort" $svc.nodePort "targetPort" (.Values.service.nodePort | int)) }} {{ $ports = mustAppend $ports (dict "name" "console" "port" $svc.consolePort "nodePort" $svc.consolePort "targetPort" (.Values.service.consolePort | int)) }} {{ $params := . }} {{ $_ := set $params "commonService" (dict "type" "NodePort" "ports" $ports ) }} -{{ $_1 := set .Values "extraSelectorLabels" $selectors }} {{ include "common.classes.service" $params }} {{ end }}