Skip to content

Commit ace11ed

Browse files
committed
feat(helm): update chart for OADA v4
1 parent 5347ea2 commit ace11ed

6 files changed

Lines changed: 265 additions & 73 deletions

File tree

charts/oada/Chart.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ maintainers:
88
- name: awlayton
99
email: alex@layton.in
1010
type: application
11-
version: 3.4.0
12-
appVersion: 3.10.0
11+
keywords:
12+
- api
13+
- oauth 2.0
14+
- oidc
15+
- oada
16+
version: 4.0.0
17+
appVersion: 4.0.0
1318
annotations:
1419
artifacthub.io/recommendations: |
1520
- url: https://artifacthub.io/packages/helm/cert-manager/cert-manager
16-
- url: https://artifacthub.io/packages/helm/redpanda/redpanda-operator
17-
- url: https://artifacthub.io/packages/helm/source-field/kube-arangodb
18-
- url: https://artifacthub.io/packages/helm/source-field/kube-arangodb-crd
21+
- url: https://artifacthub.io/packages/helm/redpanda-data/operator
22+
- url: https://github.com/arangodb/kube-arangodb#installation-of-latest-release-using-helm
1923
- url: https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx

charts/oada/templates/init.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ spec:
5757
- configMapRef:
5858
name: {{ .Chart.Name }}-configmap-{{ .Release.Name }}
5959
env:
60+
- name: CONFIG
61+
value: /oada.config.mjs
6062
- name: ARANGODB_USERNAME
6163
valueFrom:
6264
secretKeyRef:
Lines changed: 47 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,61 @@
11
{{- if eq (include "oada.kafka.deploy" .) "true" }}
2-
apiVersion: redpanda.vectorized.io/v1alpha1
3-
kind: Cluster
2+
apiVersion: cluster.redpanda.com/v1alpha1
3+
kind: Redpanda
44
metadata:
55
namespace: {{ .Release.Namespace }}
66
name: redpanda-{{ .Release.Name }}
77
labels:
88
app.kubernetes.io/component: redpanda
99
{{- include "oada.chart.labels" . | nindent 4 }}
1010
spec:
11-
image: {{ .Values.kafka.image }}
12-
version: {{ .Values.kafka.tag }}
13-
replicas: 1
14-
resources:
15-
requests:
11+
chartRef:
12+
chartVersion: {{ .Values.kafka.chartVersion }}
13+
clusterSpec:
14+
image:
15+
repository: {{ .Values.kafka.image }}
16+
tag: {{ .Values.kafka.tag }}
17+
statefulset:
18+
replicas: 1
19+
resources:
1620
{{- if .Values.global.development }}
17-
cpu: 100m
21+
#cpu: 100m
1822
{{- else }}
19-
cpu: 1
20-
{{- end }}
21-
memory: 1.2Gi
22-
#ephemeral-storage: 1Gi
23-
limits:
24-
cpu: 1
25-
memory: 1.2Gi
23+
cpu:
24+
cores: 4
25+
memory:
26+
enable_memory_locking: true
27+
container:
28+
max: 10Gi
2629
#ephemeral-storage: 1Gi
27-
configuration:
28-
autoCreateTopics: true
29-
rpcServer:
30-
port: 33145
31-
kafkaApi:
32-
- port: 9092
33-
{{- if .Values.global.development }}
34-
- external:
35-
enabled: true
3630
{{- end }}
37-
pandaproxyApi:
38-
- port: 8082
39-
{{- if .Values.global.development }}
40-
- external:
41-
enabled: true
42-
{{- end }}
43-
adminApi:
44-
- port: 9644
45-
{{- if .Values.global.development }}
46-
- external:
47-
enabled: true
31+
logging:
32+
logLevel: info
33+
usageStats:
34+
enabled: false
35+
{{- if eq (include "oada.prometheus" $) "true" }}
36+
monitoring:
37+
enabled: true
38+
{{- end }}
39+
external:
40+
{{- if .Values.global.development }}
41+
enabled: true
42+
service:
43+
enabled: true
44+
{{- else }}
45+
enabled: false
4846
{{- end }}
49-
developerMode: {{ .Values.global.development }}
50-
{{- if eq (include "oada.prometheus" $) "true" }}
51-
---
52-
apiVersion: monitoring.coreos.com/v1
53-
kind: ServiceMonitor
54-
metadata:
55-
namespace: {{ .Release.Namespace }}
56-
name: redpanda-{{ .Release.Name }}
57-
labels:
58-
app.kubernetes.io/component: redpanda
59-
{{- include "oada.chart.labels" . | nindent 4 }}
60-
spec:
61-
selector:
62-
matchLabels:
63-
app.kubernetes.io/component: redpanda
64-
{{- include "oada.chart.selectorLabels" . | nindent 6 }}
65-
endpoints:
66-
- port: admin
67-
path: /public_metrics
68-
- port: admin
69-
path: /metrics
70-
namespaceSelector:
71-
any: false
72-
{{- end }}
47+
listeners:
48+
admin:
49+
port: 9644
50+
kafka:
51+
port: 9092
52+
tls:
53+
enabled: false
54+
http:
55+
port: 8082
56+
rpc:
57+
port: 33145
58+
config:
59+
node:
60+
developer_mode: {{ .Values.global.development }}
7361
{{- end }}

charts/oada/templates/users.yaml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ stringData:
3434
{{- end }}
3535
---
3636
{{- $jobName := print "user-add-" .name "-" $.Release.Name -}}
37-
{{- if empty (lookup "batch/v1" "Job" $.Release.Namespace $jobName) -}}
37+
{{- if empty (lookup "batch/v1" "Job" $.Release.Namespace $jobName) }}
3838
apiVersion: batch/v1
3939
kind: Job
4040
metadata:
@@ -71,6 +71,8 @@ spec:
7171
- configMapRef:
7272
name: {{ $.Chart.Name }}-configmap-{{ $.Release.Name }}
7373
env:
74+
- name: CONFIG
75+
value: /oada.config.mjs
7476
- name: ARANGODB_USERNAME
7577
valueFrom:
7678
secretKeyRef:
@@ -90,8 +92,21 @@ spec:
9092
{{- end }}
9193
image: oada/users:{{ $tag }}
9294
#imagePullPolicy: {{ $.Values.global.development | ternary "Always" "IfNotPresent" }}
93-
command: ["/usr/bin/dumb-init", "--rewrite", "15:2", "--", "/bin/sh"]
94-
args: ["-c", "yarn workspace @oada/users run add -u {{ .name }} -a {{ .admin | default false }} "]
95+
command:
96+
- /usr/bin/dumb-init
97+
- --rewrite
98+
- 15:2
99+
- --
100+
- /bin/sh
101+
args:
102+
- -c
103+
- >-
104+
yarn workspace @oada/users run add
105+
-u={{ .name }}
106+
-a={{ .admin | default false }}
107+
{{- range (.roles | default list) }}
108+
-r={{ . }}
109+
{{- end }}
95110
resources:
96111
limits: {{- toYaml $.Values.oada.resources.limits | nindent 14 }}
97112
requests: {{- toYaml $.Values.oada.resources.limits | nindent 14 }}
@@ -101,6 +116,8 @@ spec:
101116
- configMapRef:
102117
name: {{ $.Chart.Name }}-configmap-{{ $.Release.Name }}
103118
env:
119+
- name: CONFIG
120+
value: /oada.config.mjs
104121
- name: TOKEN
105122
valueFrom:
106123
secretKeyRef:
@@ -126,7 +143,13 @@ spec:
126143
image: oada/auth:{{ $tag }}
127144
imagePullPolicy: {{ $.Values.oada.imagePullPolicy }}
128145
command: ["/usr/bin/dumb-init", "--rewrite", "15:2", "--", "/bin/sh"]
129-
args: ["-c", "yarn workspace @oada/auth run token create -u {{ .name }} -s {{ .scope | join "," }} ${TOKEN} "]
146+
args:
147+
- -c
148+
- >-
149+
yarn workspace @oada/auth run token create
150+
-u={{ .name }}
151+
-s=all:all
152+
${TOKEN}
130153
resources:
131154
limits: {{- toYaml $.Values.oada.resources.limits | nindent 14 }}
132155
requests: {{- toYaml $.Values.oada.resources.limits | nindent 14 }}

charts/oada/values.schema.json

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
{
2+
"$schema": "http://json-schema.org/schema#",
3+
"type": "object",
4+
"$defs": {
5+
"resources": {
6+
"type": "object"
7+
}
8+
},
9+
"properties": {
10+
"replicaCount": {
11+
"type": "integer",
12+
"minimum": 1
13+
},
14+
"ingress": {
15+
"type": "object",
16+
"properties": {
17+
"enabled": {
18+
"default": true,
19+
"type": "boolean"
20+
},
21+
"className": {
22+
"type": ["string", "null"]
23+
}
24+
}
25+
},
26+
"oada": {
27+
"type": "object",
28+
"properties": {
29+
"domains": {
30+
"type": "array",
31+
"items": {
32+
"type": "string"
33+
}
34+
},
35+
"tag": {
36+
"type": ["string", "null"]
37+
},
38+
"imagePullPolicy": {
39+
"type": "string",
40+
"enum": ["Always", "IfNotPresent", "Never"]
41+
},
42+
"services": {
43+
"type": "object",
44+
"additionalProperties": {
45+
"type": "object",
46+
"properties": {
47+
"http": {
48+
"type": "boolean",
49+
"default": false
50+
},
51+
"enabled": {
52+
"type": "boolean",
53+
"default": true
54+
}
55+
}
56+
}
57+
},
58+
"users": {
59+
"type": "array",
60+
"items": {
61+
"type": "object",
62+
"additionalProperties": false,
63+
"required": ["name"],
64+
"properties": {
65+
"name": {
66+
"type": "string"
67+
},
68+
"admin": {
69+
"type": "boolean",
70+
"default": false
71+
},
72+
"roles": {
73+
"type": "array",
74+
"items": {
75+
"type": "string"
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
82+
},
83+
"oauth": {
84+
"type": "object",
85+
"properties": {
86+
"issuer": {
87+
"type": ["string", "null"]
88+
}
89+
}
90+
},
91+
"debug": {
92+
"type": "array",
93+
"items": {
94+
"type": "string"
95+
}
96+
},
97+
"pino": {
98+
"type": "object",
99+
"properties": {
100+
"level": {
101+
"type": "string",
102+
"enum": ["trace", "debug", "info", "warn", "error", "fatal"]
103+
}
104+
}
105+
},
106+
"arangodb": {
107+
"type": "object",
108+
"properties": {
109+
"database": {
110+
"type": "string"
111+
},
112+
"connection": {
113+
"type": ["string", "null"]
114+
},
115+
"image": {
116+
"type": "string"
117+
},
118+
"tag": {
119+
"type": "string"
120+
},
121+
"profileAql": {
122+
"enum": [null, false, 0, true, 1, 2]
123+
},
124+
"resources": {
125+
"$ref": "#/$defs/resources"
126+
}
127+
}
128+
},
129+
"kafka": {
130+
"brokers": {
131+
"type": "array",
132+
"items": {
133+
"type": "string"
134+
}
135+
},
136+
"image": {
137+
"type": "string"
138+
},
139+
"tag": {
140+
"type": "string"
141+
},
142+
"chartVersion": {
143+
"type": "string"
144+
}
145+
},
146+
"k8sWaitFor": {
147+
"image": {
148+
"type": "string"
149+
},
150+
"tag": {
151+
"type": "string"
152+
},
153+
"resources": {
154+
"$ref": "#/$defs/resources"
155+
}
156+
},
157+
"prometheus": {
158+
"type": ["string", "null"]
159+
},
160+
"nameOverride": {
161+
"type": ["string", "null"]
162+
},
163+
"fullnameOverride": {
164+
"type": ["string", "null"]
165+
},
166+
"global": {
167+
"type": "object",
168+
"properties": {
169+
"development": {
170+
"type": "boolean",
171+
"default": false
172+
}
173+
}
174+
}
175+
}
176+
}

0 commit comments

Comments
 (0)