Skip to content

Commit 85c9abb

Browse files
committed
feat(node): add broadcaster
1 parent 2e525f6 commit 85c9abb

File tree

4 files changed

+147
-2
lines changed

4 files changed

+147
-2
lines changed

charts/rss3-node/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.3.1
18+
version: 0.3.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/rss3-node/templates/_helpers.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,11 @@ node.rss3.io/network: {{ .network }}
139139
{{- if .worker }}
140140
node.rss3.io/worker: {{ .worker }}
141141
{{- end }}
142-
{{- end }}
142+
{{- end }}
143+
144+
{{/*
145+
Create rss3-node hub name and version as used by the chart label.
146+
*/}}
147+
{{- define "rss3-node.broadcaster.fullname" -}}
148+
{{- printf "%s-%s" (include "rss3-node.fullname" .) .Values.broadcaster.name | trunc 63 | trimSuffix "-" -}}
149+
{{- end -}}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
{{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.broadcaster.deploymentAnnotations) }}
5+
annotations:
6+
{{- range $key, $value := . }}
7+
{{ $key }}: {{ $value | quote }}
8+
{{- end }}
9+
{{- end }}
10+
name: {{ template "rss3-node.broadcaster.fullname" .}}
11+
labels:
12+
{{- include "rss3-node.labels" (dict "context" . "component" .Values.broadcaster.name "name" .Values.broadcaster.name) | nindent 4 }}
13+
spec:
14+
replicas: {{ .Values.broadcaster.replicaCount }}
15+
revisionHistoryLimit: {{ .Values.global.revisionHistoryLimit }}
16+
selector:
17+
matchLabels:
18+
{{- include "rss3-node.selectorLabels" (dict "context" . "name" .Values.broadcaster.name) | nindent 6 }}
19+
template:
20+
metadata:
21+
annotations:
22+
checksum/configmap: {{ include "rss3-node.globalConfigCheckSum" .}}
23+
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.broadcaster.podAnnotations) }}
24+
{{- toYaml . | nindent 8 }}
25+
{{- end }}
26+
labels:
27+
{{- include "rss3-node.labels" (dict "context" . "component" .Values.broadcaster.name "name" .Values.broadcaster.name) | nindent 8 }}
28+
{{- with .Values.broadcaster.podLabels }}
29+
{{- toYaml . | nindent 8 }}
30+
{{- end }}
31+
spec:
32+
{{- with .Values.broadcaster.imagePullSecrets }}
33+
imagePullSecrets:
34+
{{- toYaml . | nindent 8 }}
35+
{{- end }}
36+
serviceAccountName: {{ include "rss3-node.hub.ServiceAccountName" . }}
37+
securityContext:
38+
{{- toYaml .Values.broadcaster.podSecurityContext | nindent 8 }}
39+
containers:
40+
- name: {{ .Values.broadcaster.name }}
41+
securityContext:
42+
{{- toYaml .Values.broadcaster.securityContext | nindent 12 }}
43+
image: "{{ default .Values.global.image.repository .Values.broadcaster.image.repository }}:{{ .Values.broadcaster.image.tag | default .Chart.AppVersion }}"
44+
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.broadcaster.image.pullPolicy }}
45+
args:
46+
- --module=broadcaster
47+
resources:
48+
{{- toYaml .Values.broadcaster.resources | nindent 12 }}
49+
volumeMounts:
50+
- name: config
51+
mountPath: /root/rss3-node/deploy
52+
{{- with .Values.broadcaster.volumeMounts }}
53+
{{- toYaml . | nindent 12 }}
54+
{{- end }}
55+
volumes:
56+
- name: config
57+
configMap:
58+
name: {{ include "rss3-node.fullname" . }}
59+
defaultMode: 0644
60+
{{- with .Values.broadcaster.volumes }}
61+
{{- toYaml . | nindent 8 }}
62+
{{- end }}
63+
{{- with .Values.broadcaster.nodeSelector }}
64+
nodeSelector:
65+
{{- toYaml . | nindent 8 }}
66+
{{- end }}
67+
{{- with .Values.broadcaster.affinity }}
68+
affinity:
69+
{{- toYaml . | nindent 8 }}
70+
{{- end }}
71+
{{- with .Values.broadcaster.tolerations }}
72+
tolerations:
73+
{{- toYaml . | nindent 8 }}
74+
{{- end }}

charts/rss3-node/values.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,70 @@ hub:
203203

204204
affinity: { }
205205

206+
## BroadCaster
207+
broadcaster:
208+
# -- RSS3 Node hub name
209+
name: broadcaster
210+
211+
replicaCount: 1
212+
213+
image:
214+
repository: rss3/node
215+
pullPolicy: IfNotPresent
216+
# Overrides the image tag whose default is the chart appVersion.
217+
tag: ""
218+
219+
imagePullSecrets: [ ]
220+
221+
# -- Annotations to be added to server Deployment
222+
deploymentAnnotations: { }
223+
224+
# -- Annotations to be added to server pods
225+
podAnnotations: { }
226+
227+
# -- Labels to be added to server pods
228+
podLabels: { }
229+
230+
# -- Resource limits and requests for the Argo CD server
231+
resources: { }
232+
# limits:
233+
# cpu: 100m
234+
# memory: 128Mi
235+
# requests:
236+
# cpu: 50m
237+
# memory: 64Mi
238+
239+
240+
podSecurityContext: { }
241+
# fsGroup: 2000
242+
243+
securityContext: { }
244+
# capabilities:
245+
# drop:
246+
# - ALL
247+
# readOnlyRootFilesystem: true
248+
# runAsNonRoot: true
249+
# runAsUser: 1000
250+
251+
# Additional volumes on the output Deployment definition.
252+
volumes: [ ]
253+
# - name: foo
254+
# secret:
255+
# secretName: mysecret
256+
# optional: false
257+
258+
# Additional volumeMounts on the output Deployment definition.
259+
volumeMounts: [ ]
260+
# - name: foo
261+
# mountPath: "/etc/foo"
262+
# readOnly: true
263+
264+
nodeSelector: { }
265+
266+
tolerations: [ ]
267+
268+
affinity: { }
269+
206270
## Node Configs
207271
configs:
208272
environment: development

0 commit comments

Comments
 (0)