diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index 3ad7d18..ea49603 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -96,7 +96,7 @@ jobs: done helm repo index --url https://openg2p.github.io/openg2p-helm/ --merge rancher/index.yaml rancher for chartname in $RANCHER_CHARTS; do - rm rancher/${chartname}*.tgz + rm rancher/${chartname}*.tgz || true done if: env.SKIP != 'TRUE' @@ -107,6 +107,6 @@ jobs: author_name: openg2pbot author_email: bot@openg2p.org default_author: user_info - message: 'added social registry helm charts for publish openg2p/openg2p-reporting@${{ github.sha }}' + message: 'added reporting helm charts for publish openg2p/openg2p-reporting@${{ github.sha }}' add: './*.tgz ./index.yaml rancher/index.yaml' if: env.SKIP != 'TRUE' diff --git a/charts/debezium/templates/clusterrolebinding.yaml b/charts/debezium/templates/clusterrolebinding.yaml index 038cebe..441742d 100644 --- a/charts/debezium/templates/clusterrolebinding.yaml +++ b/charts/debezium/templates/clusterrolebinding.yaml @@ -1,11 +1,8 @@ kind: ClusterRoleBinding apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} name: {{ template "common.names.fullname" . }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/debezium/templates/deployment.yaml b/charts/debezium/templates/deployment.yaml index de48cda..08e0938 100644 --- a/charts/debezium/templates/deployment.yaml +++ b/charts/debezium/templates/deployment.yaml @@ -1,15 +1,11 @@ apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} name: {{ template "common.names.fullname" . }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.replicaCount }} {{- if .Values.updateStrategy }} @@ -19,14 +15,10 @@ spec: matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) | nindent 6 }} template: metadata: - annotations: - {{- if or .Values.podAnnotations .Values.metrics.enabled }} - {{- include "debezium.podAnnotations" . | nindent 8 }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.podLabels "context" $) | nindent 8 }} + {{- if or .Values.podAnnotations .Values.metrics.enabled }} + annotations: {{- include "debezium.podAnnotations" . | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }} {{- include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) | nindent 6 }} diff --git a/charts/debezium/templates/service-account.yaml b/charts/debezium/templates/service-account.yaml index 61c6b9e..6992c9d 100644 --- a/charts/debezium/templates/service-account.yaml +++ b/charts/debezium/templates/service-account.yaml @@ -2,10 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/debezium/templates/service.yaml b/charts/debezium/templates/service.yaml index ca8f1f2..db253ff 100644 --- a/charts/debezium/templates/service.yaml +++ b/charts/debezium/templates/service.yaml @@ -1,15 +1,11 @@ apiVersion: v1 kind: Service metadata: - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} name: {{ template "common.names.fullname" . }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.type }} {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} diff --git a/charts/debezium/templates/servicemonitor.yaml b/charts/debezium/templates/servicemonitor.yaml index 94f7ffd..d8ac9e9 100644 --- a/charts/debezium/templates/servicemonitor.yaml +++ b/charts/debezium/templates/servicemonitor.yaml @@ -6,10 +6,10 @@ metadata: {{- if .Values.metrics.serviceMonitor.namespace }} namespace: {{ .Values.metrics.serviceMonitor.namespace }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.metrics.serviceMonitor.additionalLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} spec: endpoints: - port: http-metrics diff --git a/charts/opensearch-kafka-connector/templates/clusterrolebinding.yaml b/charts/opensearch-kafka-connector/templates/clusterrolebinding.yaml index 038cebe..441742d 100644 --- a/charts/opensearch-kafka-connector/templates/clusterrolebinding.yaml +++ b/charts/opensearch-kafka-connector/templates/clusterrolebinding.yaml @@ -1,11 +1,8 @@ kind: ClusterRoleBinding apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} name: {{ template "common.names.fullname" . }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/opensearch-kafka-connector/templates/configmap.yaml b/charts/opensearch-kafka-connector/templates/configmap.yaml index 0117518..a09337e 100644 --- a/charts/opensearch-kafka-connector/templates/configmap.yaml +++ b/charts/opensearch-kafka-connector/templates/configmap.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "common.names.fullname" . }}-properties - labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} {{- if .Values.commonAnnotations }} - annotations: {{ include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} data: connect-distributed.properties: |- diff --git a/charts/opensearch-kafka-connector/templates/deployment.yaml b/charts/opensearch-kafka-connector/templates/deployment.yaml index 13629f3..c26bb0b 100644 --- a/charts/opensearch-kafka-connector/templates/deployment.yaml +++ b/charts/opensearch-kafka-connector/templates/deployment.yaml @@ -1,15 +1,11 @@ apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} name: {{ template "common.names.fullname" . }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} spec: replicas: {{ .Values.replicaCount }} {{- if .Values.updateStrategy }} @@ -19,14 +15,10 @@ spec: matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) | nindent 6 }} template: metadata: - annotations: - {{- if or .Values.podAnnotations .Values.metrics.enabled }} - {{- include "opensearch-kafka-connector.podAnnotations" . | nindent 8 }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.podLabels "context" $) | nindent 8 }} + {{- if or .Values.podAnnotations .Values.metrics.enabled }} + annotations: {{- include "opensearch-kafka-connector.podAnnotations" . | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }} {{- include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) | nindent 6 }} diff --git a/charts/opensearch-kafka-connector/templates/service-account.yaml b/charts/opensearch-kafka-connector/templates/service-account.yaml index 61c6b9e..6992c9d 100644 --- a/charts/opensearch-kafka-connector/templates/service-account.yaml +++ b/charts/opensearch-kafka-connector/templates/service-account.yaml @@ -2,10 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/opensearch-kafka-connector/templates/service.yaml b/charts/opensearch-kafka-connector/templates/service.yaml index ca8f1f2..db253ff 100644 --- a/charts/opensearch-kafka-connector/templates/service.yaml +++ b/charts/opensearch-kafka-connector/templates/service.yaml @@ -1,15 +1,11 @@ apiVersion: v1 kind: Service metadata: - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} name: {{ template "common.names.fullname" . }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.type }} {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} diff --git a/charts/opensearch-kafka-connector/templates/servicemonitor.yaml b/charts/opensearch-kafka-connector/templates/servicemonitor.yaml index 94f7ffd..d8ac9e9 100644 --- a/charts/opensearch-kafka-connector/templates/servicemonitor.yaml +++ b/charts/opensearch-kafka-connector/templates/servicemonitor.yaml @@ -6,10 +6,10 @@ metadata: {{- if .Values.metrics.serviceMonitor.namespace }} namespace: {{ .Values.metrics.serviceMonitor.namespace }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.metrics.serviceMonitor.additionalLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" (dict "customLabels" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} spec: endpoints: - port: http-metrics diff --git a/charts/reporting-init/templates/configmap-startup.yaml b/charts/reporting-init/templates/configmap-startup.yaml index d8e89bc..629d39e 100644 --- a/charts/reporting-init/templates/configmap-startup.yaml +++ b/charts/reporting-init/templates/configmap-startup.yaml @@ -3,12 +3,9 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ template "common.names.fullname" . }}-startup - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }} {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} {{- end }} data: startup-command.sh: |- diff --git a/charts/reporting-init/templates/job.yaml b/charts/reporting-init/templates/job.yaml index dc9f95c..2f2a9a9 100644 --- a/charts/reporting-init/templates/job.yaml +++ b/charts/reporting-init/templates/job.yaml @@ -2,10 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: name: {{ template "common.names.fullname" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }} annotations: "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-weight": "0" diff --git a/charts/reporting-init/templates/secret-git-config.yaml b/charts/reporting-init/templates/secret-git-config.yaml index 9124dc9..bc651f8 100644 --- a/charts/reporting-init/templates/secret-git-config.yaml +++ b/charts/reporting-init/templates/secret-git-config.yaml @@ -3,10 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ template "common.names.fullname" . }}-git-config - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/reporting/.gitignore b/charts/reporting/.gitignore index 9169e44..f791801 100644 --- a/charts/reporting/.gitignore +++ b/charts/reporting/.gitignore @@ -1,2 +1,2 @@ -charts/*.tgz +charts/ Chart.lock diff --git a/charts/reporting/Chart.yaml b/charts/reporting/Chart.yaml index 8a509cb..6dbb462 100644 --- a/charts/reporting/Chart.yaml +++ b/charts/reporting/Chart.yaml @@ -4,9 +4,6 @@ description: A Helm chart for OpenG2P Reporting module. type: application version: 0.0.0-develop dependencies: -- name: debezium - version: 2.6.0 - condition: debezium.enabled - name: kafka repository: oci://registry-1.docker.io/bitnamicharts version: 29.x.x @@ -15,7 +12,12 @@ dependencies: version: 1.2.0 repository: oci://registry-1.docker.io/bitnamicharts condition: opensearch.enabled +- name: debezium + repository: https://openg2p.github.io/openg2p-helm + version: 2.6.0 + condition: debezium.enabled - name: opensearch-kafka-connector + repository: https://openg2p.github.io/openg2p-helm version: 0.0.0-develop condition: opensearch-kafka-connector.enabled icon: https://openg2p.github.io/openg2p-helm/openg2p-logo.png diff --git a/charts/reporting/README.md b/charts/reporting/README.md index 127dba9..506d2ab 100644 --- a/charts/reporting/README.md +++ b/charts/reporting/README.md @@ -1,19 +1,9 @@ -# Reporting Framework +# Reporting Framework Helm Chart -Helm chart for installing reporting module +Helm chart for installing reporting framework (infra for reporting). -## Manual Installation +This chart contains the following components: -Reporting framework can be installed directly as part of OpenG2P modules, like Social Registry and PBMS, etc. - -```console -$ helm repo add openg2p https://openg2p.github.io/openg2p-helm -$ helm install reporting openg2p/reporting -``` - -## Contents - -This helm chart contains the following subcharts and they can be individually configured/installed/omitted, through the `values.yaml`. - Kafka + Kafka UI - OpenSearch - Debezium Kafka Connector diff --git a/charts/reporting/charts/debezium b/charts/reporting/charts/debezium deleted file mode 120000 index e1f2bf5..0000000 --- a/charts/reporting/charts/debezium +++ /dev/null @@ -1 +0,0 @@ -../../debezium \ No newline at end of file diff --git a/charts/reporting/charts/opensearch-kafka-connector b/charts/reporting/charts/opensearch-kafka-connector deleted file mode 120000 index 2e6f8dd..0000000 --- a/charts/reporting/charts/opensearch-kafka-connector +++ /dev/null @@ -1 +0,0 @@ -../../opensearch-kafka-connector \ No newline at end of file diff --git a/charts/reporting/templates/kafka-ui/configmap.yaml b/charts/reporting/templates/kafka-ui/configmap.yaml index a5bc249..3139376 100644 --- a/charts/reporting/templates/kafka-ui/configmap.yaml +++ b/charts/reporting/templates/kafka-ui/configmap.yaml @@ -4,12 +4,9 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- 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 }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }} + {{- if .Values.kafkaUi.commonAnnotations }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }} {{- end }} data: config.yml: |- diff --git a/charts/reporting/templates/kafka-ui/deployment.yaml b/charts/reporting/templates/kafka-ui/deployment.yaml index 49316ab..adcb2c8 100644 --- a/charts/reporting/templates/kafka-ui/deployment.yaml +++ b/charts/reporting/templates/kafka-ui/deployment.yaml @@ -4,12 +4,9 @@ apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} kind: Deployment metadata: name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- 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 }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }} + {{- if .Values.kafkaUi.commonAnnotations }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.kafkaUi.replicaCount }} @@ -17,16 +14,13 @@ spec: strategy: {{- toYaml .Values.kafkaUi.updateStrategy | nindent 4 }} {{- end }} selector: - matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.kafkaUi.podLabels "context" $) | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.kafkaUi.podLabels "context" .Subcharts.kafka) | nindent 6 }} template: metadata: + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.podLabels "context" .Subcharts.kafka) | nindent 8 }} {{- if .Values.kafkaUi.podAnnotations }} - annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.kafkaUi.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.kafkaUi.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ include "kafka.serviceAccountName" .Subcharts.kafka }} {{- include "common.images.pullSecrets" (dict "images" (list .Values.kafkaUi.image) "global" .Values.global) | nindent 6 }} diff --git a/charts/reporting/templates/kafka-ui/gateway.yaml b/charts/reporting/templates/kafka-ui/gateway.yaml index 59348dc..7d449f5 100644 --- a/charts/reporting/templates/kafka-ui/gateway.yaml +++ b/charts/reporting/templates/kafka-ui/gateway.yaml @@ -6,12 +6,9 @@ apiVersion: networking.istio.io/v1beta1 kind: Gateway metadata: name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- 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 }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }} + {{- if .Values.kafkaUi.commonAnnotations }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }} {{- end }} spec: selector: diff --git a/charts/reporting/templates/kafka-ui/service.yaml b/charts/reporting/templates/kafka-ui/service.yaml index 111f1d6..4f97210 100644 --- a/charts/reporting/templates/kafka-ui/service.yaml +++ b/charts/reporting/templates/kafka-ui/service.yaml @@ -4,12 +4,9 @@ apiVersion: v1 kind: Service metadata: name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- 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 }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }} + {{- if .Values.kafkaUi.commonAnnotations }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.kafkaUi.service.type }} @@ -27,6 +24,6 @@ spec: port: {{ .Values.kafkaUi.service.port }} protocol: TCP targetPort: {{ .Values.kafkaUi.containerPort }} - selector: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.kafkaUi.podLabels "context" $) | nindent 4 }} + selector: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.kafkaUi.podLabels "context" .Subcharts.kafka) | nindent 4 }} {{- end }} {{- end }} diff --git a/charts/reporting/templates/kafka-ui/virtualservice.yaml b/charts/reporting/templates/kafka-ui/virtualservice.yaml index 6678b6e..8c95cdc 100644 --- a/charts/reporting/templates/kafka-ui/virtualservice.yaml +++ b/charts/reporting/templates/kafka-ui/virtualservice.yaml @@ -6,12 +6,9 @@ apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- 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 }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }} + {{- if .Values.kafkaUi.commonAnnotations }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }} {{- end }} spec: hosts: diff --git a/charts/reporting/templates/opensearch/configmap.yaml b/charts/reporting/templates/opensearch/configmap.yaml index c52d885..3e475d8 100644 --- a/charts/reporting/templates/opensearch/configmap.yaml +++ b/charts/reporting/templates/opensearch/configmap.yaml @@ -3,9 +3,9 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "common.names.fullname" .Subcharts.opensearch }}-custom-config - labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }} - {{- if .Values.commonAnnotations }} - annotations: {{ include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.opensearch.commonLabels "context" .Subcharts.opensearch) | nindent 4 }} + {{- if .Values.opensearch.commonAnnotations }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.opensearch.commonAnnotations "context" $) | nindent 4 }} {{- end }} data: {{- if .Values.opensearch.security.enabled }} diff --git a/charts/reporting/templates/opensearch/gateway.yaml b/charts/reporting/templates/opensearch/gateway.yaml index 1d486a0..5b7e4bf 100644 --- a/charts/reporting/templates/opensearch/gateway.yaml +++ b/charts/reporting/templates/opensearch/gateway.yaml @@ -5,8 +5,10 @@ apiVersion: networking.istio.io/v1beta1 kind: Gateway metadata: name: {{ include "common.names.fullname" .Subcharts.opensearch }} - labels: - {{- include "socialRegistry.labels" . | nindent 4 }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.opensearch.commonLabels "context" .Subcharts.opensearch) | nindent 4 }} + {{- if .Values.opensearch.commonAnnotations }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.opensearch.commonAnnotations "context" $) | nindent 4 }} + {{- end }} spec: selector: {{ toYaml .Values.opensearch.istio.gateway.ingressController | nindent 4 }} diff --git a/charts/reporting/templates/opensearch/virtualservice.yaml b/charts/reporting/templates/opensearch/virtualservice.yaml index de032e5..d9474ab 100644 --- a/charts/reporting/templates/opensearch/virtualservice.yaml +++ b/charts/reporting/templates/opensearch/virtualservice.yaml @@ -5,13 +5,15 @@ apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: {{ include "common.names.fullname" .Subcharts.opensearch }} - labels: - {{- include "socialRegistry.labels" . | nindent 4 }} + labels: {{ include "common.labels.standard" (dict "customLabels" .Values.opensearch.commonLabels "context" .Subcharts.opensearch) | nindent 4 }} + {{- if .Values.opensearch.commonAnnotations }} + annotations: {{ include "common.tplvalues.render" (dict "value" .Values.opensearch.commonAnnotations "context" $) | nindent 4 }} + {{- end }} spec: hosts: - {{ default .Values.opensearch.hostname .Values.opensearch.istio.virtualservice.host | quote }} gateways: - - {{ default (include "socialRegistry.fullname" .) .Values.opensearch.istio.virtualservice.gateway }} + - {{ default (include "common.names.fullname" .Subcharts.opensearch) .Values.opensearch.istio.virtualservice.gateway }} http: - headers: request: diff --git a/charts/reporting/values.yaml b/charts/reporting/values.yaml index fb9b1df..77f27e6 100644 --- a/charts/reporting/values.yaml +++ b/charts/reporting/values.yaml @@ -65,6 +65,13 @@ kafkaUi: oidcClientId: openg2p-reporting-kafka oidcClientSecret: '' + commonLabels: + app.kubernetes.io/name: '{{ include "common.names.name" . }}-ui' + commonAnnotations: {} + podLabels: + app.kubernetes.io/name: '{{ include "common.names.name" . }}-ui' + podAnnotations: {} + replicaCount: 1 service: @@ -145,9 +152,6 @@ kafkaUi: nodeSelector: {} tolerations: [] - podLabels: {} - podAnnotations: {} - priorityClassName: "" lifecycleHooks: {}