Skip to content

Commit

Permalink
Merge pull request #16 from lalithkota/develop-G2P-2355
Browse files Browse the repository at this point in the history
Helm charts: Fixed broken labels for templates
  • Loading branch information
lalithkota authored Jun 24, 2024
2 parents 619f45c + 7650d41 commit 42a9c16
Show file tree
Hide file tree
Showing 29 changed files with 91 additions and 156 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -107,6 +107,6 @@ jobs:
author_name: openg2pbot
author_email: [email protected]
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'
5 changes: 1 addition & 4 deletions charts/debezium/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
24 changes: 8 additions & 16 deletions charts/debezium/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -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 }}
Expand Down
5 changes: 1 addition & 4 deletions charts/debezium/templates/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
12 changes: 4 additions & 8 deletions charts/debezium/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -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")) }}
Expand Down
8 changes: 4 additions & 4 deletions charts/debezium/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/opensearch-kafka-connector/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
24 changes: 8 additions & 16 deletions charts/opensearch-kafka-connector/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
12 changes: 4 additions & 8 deletions charts/opensearch-kafka-connector/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -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")) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions charts/reporting-init/templates/configmap-startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
5 changes: 1 addition & 4 deletions charts/reporting-init/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 1 addition & 4 deletions charts/reporting-init/templates/secret-git-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/reporting/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
charts/*.tgz
charts/
Chart.lock
8 changes: 5 additions & 3 deletions charts/reporting/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 3 additions & 13 deletions charts/reporting/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion charts/reporting/charts/debezium

This file was deleted.

1 change: 0 additions & 1 deletion charts/reporting/charts/opensearch-kafka-connector

This file was deleted.

9 changes: 3 additions & 6 deletions charts/reporting/templates/kafka-ui/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand Down
18 changes: 6 additions & 12 deletions charts/reporting/templates/kafka-ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,23 @@ 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 }}
{{- if .Values.kafkaUi.updateStrategy }}
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 }}
Expand Down
9 changes: 3 additions & 6 deletions charts/reporting/templates/kafka-ui/gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading

0 comments on commit 42a9c16

Please sign in to comment.