Skip to content

Commit 9d0cdc8

Browse files
author
ci bot
committed
Merge branch 'moving-out-bitnami' into 'enterprise'
feat(charts): Replacing the bitnami charts and images See merge request dkinternal/observability/dataops-observability!62
2 parents b36e99e + 66b7fc9 commit 9d0cdc8

13 files changed

Lines changed: 395 additions & 91 deletions

File tree

.github/actions/publish_charts/action.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ runs:
1616
- name: Install Helm
1717
uses: azure/setup-helm@v4.2.0
1818

19-
- name: Add Helm Repos for Dependencies
20-
shell: bash
21-
run: |
22-
helm repo add bitnami https://charts.bitnami.com/bitnami
23-
2419
- name: Run chart-releaser
2520
uses: helm/chart-releaser-action@v1.6.0
2621
with:

deploy/charts/observability-app/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
name: dataops-observability-app
33
type: application
4-
appVersion: "2.x.x"
5-
version: "2.4.1"
4+
appVersion: "2"
5+
version: "3.0.0"
66

77
description: DataOps Observability
88
home: https://datakitchen.io

deploy/charts/observability-app/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,4 @@ serviceAccount:
140140
annotations: {}
141141
# The name of the service account to use.
142142
# If not set and create is true, a name is generated using the fullname template
143-
name: datakitchen-observability
143+
name: ""
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

deploy/charts/observability-services/Chart.lock

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
apiVersion: v2
22
name: dataops-observability-services
33
type: application
4-
appVersion: "2.x.x"
5-
version: "2.0.3"
6-
7-
dependencies:
8-
- name: kafka
9-
version: 20.0.4
10-
repository: https://charts.bitnami.com/bitnami
11-
condition: kafka.enable
12-
- name: mysql
13-
version: 9.4.5
14-
repository: https://charts.bitnami.com/bitnami
15-
condition: mysql.enable
16-
174
description: DataOps Observability Supporting Services
185
home: https://datakitchen.io
196
icon: https://cloud.datakitchen.io/assets/image/dk-logo.svg
@@ -23,3 +10,6 @@ keywords:
2310
maintainers:
2411
- name: DataKitchen
2512
url: https://datakitchen.io
13+
14+
appVersion: "2"
15+
version: "3.0.0"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "observability-services.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "observability-services.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "observability-services.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "observability-services.labels" -}}
37+
helm.sh/chart: {{ include "observability-services.chart" . }}
38+
{{ include "observability-services.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "observability-services.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "observability-services.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "observability-services.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "observability-services.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
{{- if .Values.kafka.enabled }}
2+
---
3+
apiVersion: batch/v1
4+
kind: Job
5+
metadata:
6+
name: kafka-init-topics
7+
labels:
8+
{{- include "observability-services.labels" . | nindent 4 }}
9+
annotations:
10+
"helm.sh/hook": post-install,post-upgrade
11+
"helm.sh/hook-weight": "0"
12+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
13+
spec:
14+
template:
15+
spec:
16+
restartPolicy: OnFailure
17+
containers:
18+
- name: kafka-init
19+
image: "{{ .Values.kafka.image.repository }}:{{ .Values.kafka.image.tag }}"
20+
command:
21+
- /bin/bash
22+
- -c
23+
- |
24+
echo "Waiting for Kafka to be ready..."
25+
until /opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server kafka:9092 > /dev/null 2>&1; do
26+
sleep 2
27+
done
28+
echo "Kafka is ready. Creating topics..."
29+
{{- range .Values.kafka.topics }}
30+
/opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:9092 --create --if-not-exists --topic {{ . }} --partitions 16 --replication-factor 1
31+
{{- end }}
32+
echo "Topics created."
33+
---
34+
apiVersion: v1
35+
kind: Service
36+
metadata:
37+
name: kafka
38+
labels:
39+
{{- include "observability-services.labels" . | nindent 4 }}
40+
spec:
41+
type: ClusterIP
42+
ports:
43+
- name: kafka
44+
port: 9092
45+
targetPort: kafka
46+
- name: controller
47+
port: 9093
48+
targetPort: controller
49+
selector:
50+
{{- include "observability-services.selectorLabels" . | nindent 4 }}
51+
app.kubernetes.io/component: kafka
52+
53+
---
54+
apiVersion: apps/v1
55+
kind: StatefulSet
56+
metadata:
57+
name: kafka
58+
labels:
59+
{{- include "observability-services.labels" . | nindent 4 }}
60+
spec:
61+
serviceName: kafka
62+
replicas: 1
63+
selector:
64+
matchLabels:
65+
{{- include "observability-services.selectorLabels" . | nindent 6 }}
66+
app.kubernetes.io/component: kafka
67+
template:
68+
metadata:
69+
labels:
70+
{{- include "observability-services.selectorLabels" . | nindent 8 }}
71+
app.kubernetes.io/component: kafka
72+
spec:
73+
containers:
74+
- name: kafka
75+
image: "{{ .Values.kafka.image.repository }}:{{ .Values.kafka.image.tag }}"
76+
imagePullPolicy: {{ .Values.kafka.image.pullPolicy }}
77+
78+
ports:
79+
- name: kafka
80+
containerPort: 9092
81+
- name: controller
82+
containerPort: 9093
83+
84+
env:
85+
# ---- KRaft basics ----
86+
- name: KAFKA_NODE_ID
87+
value: "1"
88+
89+
- name: KAFKA_PROCESS_ROLES
90+
value: broker,controller
91+
92+
- name: KAFKA_CONTROLLER_LISTENER_NAMES
93+
value: CONTROLLER
94+
95+
# ---- Networking ----
96+
- name: KAFKA_LISTENERS
97+
value: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093
98+
99+
- name: KAFKA_ADVERTISED_LISTENERS
100+
value: PLAINTEXT://kafka:9092
101+
102+
- name: KAFKA_CONTROLLER_QUORUM_VOTERS
103+
value: 1@localhost:9093
104+
105+
# Single node
106+
- name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
107+
value: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
108+
109+
- name: KAFKA_INTER_BROKER_LISTENER_NAME
110+
value: PLAINTEXT
111+
112+
- name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
113+
value: "1"
114+
115+
- name: KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR
116+
value: "1"
117+
118+
- name: KAFKA_TRANSACTION_STATE_LOG_MIN_ISR
119+
value: "1"
120+
121+
# ---- Topics ----
122+
- name: KAFKA_AUTO_CREATE_TOPICS_ENABLE
123+
value: "true"
124+
125+
# ---- Logs ----
126+
- name: KAFKA_LOG_DIRS
127+
value: /var/lib/kafka/data
128+
129+
volumeMounts:
130+
- name: data
131+
mountPath: /var/lib/kafka/data
132+
133+
readinessProbe:
134+
tcpSocket:
135+
port: kafka
136+
initialDelaySeconds: 10
137+
periodSeconds: 10
138+
139+
livenessProbe:
140+
tcpSocket:
141+
port: kafka
142+
initialDelaySeconds: 30
143+
periodSeconds: 20
144+
145+
resources:
146+
{{- toYaml .Values.kafka.resources | nindent 12 }}
147+
148+
volumeClaimTemplates:
149+
- metadata:
150+
name: data
151+
spec:
152+
accessModes: ["ReadWriteOnce"]
153+
resources:
154+
requests:
155+
storage: {{ .Values.kafka.storage.size }}
156+
{{- if .Values.kafka.storage.storageClass }}
157+
storageClassName: {{ .Values.kafka.storage.storageClass | quote }}
158+
{{- end }}
159+
{{- end }}

0 commit comments

Comments
 (0)