feat(chart): add split release charts
This commit is contained in:
1 parent
042a72ec0f
commit
05d7a39a4c
23 files changed
+1366
No files matched your search
@@ -0,0 +1,87 @@
|
||||
{{- range .Values.sharedDatastores }}
|
||||
{{- $root := $ }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ .name }}-statefulset
|
||||
labels:
|
||||
app.kubernetes.io/name: mixingx
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
spec:
|
||||
serviceName: {{ .name }}-service
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
annotations:
|
||||
helm.sh/resource-policy: keep
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: {{ include "mixingx-platform.storageClassName" $root }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .storage }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
spec:
|
||||
{{ include "mixingx-platform.tierAffinity" (dict "role" "sharedDatastores" "root" $root) | nindent 6 }}
|
||||
containers:
|
||||
- name: {{ .name }}
|
||||
image: {{ .image }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: tcp
|
||||
containerPort: {{ .port }}
|
||||
protocol: TCP
|
||||
{{- if eq .name "redis" }}
|
||||
command: ["/bin/sh"]
|
||||
args:
|
||||
- "-c"
|
||||
- "redis-server --requirepass {{ $root.Values.sharedInfra.redis.password }} --save 60 1"
|
||||
{{- end }}
|
||||
{{- if eq .name "mongo" }}
|
||||
env:
|
||||
- name: MONGO_INITDB_ROOT_USERNAME
|
||||
value: "{{ $root.Values.sharedInfra.mongo.username }}"
|
||||
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||
value: "{{ $root.Values.sharedInfra.mongo.password }}"
|
||||
{{- end }}
|
||||
{{- if eq .name "messaging" }}
|
||||
env:
|
||||
- name: RABBITMQ_DEFAULT_USER
|
||||
value: "{{ $root.Values.sharedInfra.rabbitmq.username }}"
|
||||
- name: RABBITMQ_DEFAULT_PASS
|
||||
value: "{{ $root.Values.sharedInfra.rabbitmq.password }}"
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: {{ .mountPath }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .name }}-service
|
||||
labels:
|
||||
app.kubernetes.io/name: mixingx
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/component: {{ .name }}
|
||||
ports:
|
||||
- name: tcp
|
||||
port: {{ .port }}
|
||||
targetPort: tcp
|
||||
protocol: TCP
|
||||
{{- if eq .name "messaging" }}
|
||||
- name: management
|
||||
port: 15672
|
||||
targetPort: 15672
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user