feat(charts): split platform release charts
This commit is contained in:
1 parent
aeb34d1e5b
commit
08ed1422fe
29 files changed
+1314
-15
No files matched your search
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: mixingx-audit
|
||||
description: MixingX audit service.
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.0.1"
|
||||
@@ -0,0 +1,33 @@
|
||||
{{- define "mixingx-audit.tierAffinity" -}}
|
||||
{{- $root := .root -}}
|
||||
{{- $role := .role -}}
|
||||
{{- if and $root.Values.tier $root.Values.tier.enabled -}}
|
||||
{{- $service := index $root.Values.tier.services $role -}}
|
||||
{{- if $service }}
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
{{- if eq ($service.mode | default "preferred") "required" }}
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: {{ $root.Values.tier.nodeLabel }}
|
||||
operator: In
|
||||
values:
|
||||
{{- range $service.tiers }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
preference:
|
||||
matchExpressions:
|
||||
- key: {{ $root.Values.tier.nodeLabel }}
|
||||
operator: In
|
||||
values:
|
||||
{{- range $service.tiers }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,70 @@
|
||||
{{- if .Values.audit.enabled }}
|
||||
{{- $root := $ }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: audit-deployment
|
||||
labels:
|
||||
app.kubernetes.io/name: mixingx
|
||||
app.kubernetes.io/component: audit
|
||||
mixingx.io/role: audit
|
||||
mixingx.io/node-id: audit
|
||||
spec:
|
||||
replicas: {{ .Values.audit.replicas | default 1 }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: audit
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: mixingx
|
||||
app.kubernetes.io/component: audit
|
||||
mixingx.io/role: audit
|
||||
mixingx.io/node-id: audit
|
||||
spec:
|
||||
{{ include "mixingx-audit.tierAffinity" (dict "role" "audit" "root" $root) | nindent 6 }}
|
||||
containers:
|
||||
- name: audit
|
||||
image: "{{ .Values.registry }}/{{ .Values.images.audit.repository | default "audit" }}:{{ .Values.images.audit.tag | default .Values.tag | default "latest" }}"
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.audit.port }}
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: TZ
|
||||
value: "{{ $root.Values.timezone | default "Asia/Shanghai" }}"
|
||||
- name: MONGODB_URI
|
||||
value: "mongodb://{{ .Values.sharedInfra.mongo.username }}:{{ .Values.sharedInfra.mongo.password }}@{{ .Values.sharedInfra.mongo.host }}:{{ .Values.sharedInfra.mongo.port }}"
|
||||
- name: MONGODB_DATABASE
|
||||
value: "{{ .Values.sharedInfra.mongo.database }}"
|
||||
- name: RABBITMQ_URI
|
||||
value: "amqp://{{ .Values.sharedInfra.rabbitmq.username }}:{{ .Values.sharedInfra.rabbitmq.password }}@{{ .Values.sharedInfra.rabbitmq.host }}:{{ .Values.sharedInfra.rabbitmq.port }}"
|
||||
- name: PORT
|
||||
value: "{{ .Values.audit.port }}"
|
||||
- name: HOST
|
||||
value: "0.0.0.0"
|
||||
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||
value: "{{ .Values.sharedInfra.otlp.endpoint }}"
|
||||
- name: OTEL_SERVICE_NAME
|
||||
value: "audit"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: audit-service
|
||||
labels:
|
||||
app.kubernetes.io/name: mixingx
|
||||
app.kubernetes.io/component: audit
|
||||
mixingx.io/role: audit
|
||||
mixingx.io/node-id: audit
|
||||
spec:
|
||||
selector:
|
||||
app.kubernetes.io/component: audit
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.audit.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
@@ -0,0 +1,35 @@
|
||||
registry: 192.168.1.105:8888/mixingx
|
||||
tag: latest
|
||||
timezone: Asia/Shanghai
|
||||
|
||||
sharedInfra:
|
||||
mongo:
|
||||
host: mongo-service
|
||||
port: 27017
|
||||
username: admin
|
||||
password: "Admin12345"
|
||||
database: mixingx_audit
|
||||
rabbitmq:
|
||||
host: messaging-service
|
||||
port: 5672
|
||||
username: guest
|
||||
password: guest
|
||||
otlp:
|
||||
endpoint: http://k8s-dashboard-service:18889
|
||||
protocol: grpc
|
||||
|
||||
audit:
|
||||
enabled: true
|
||||
port: 5600
|
||||
replicas: 2
|
||||
|
||||
images:
|
||||
audit:
|
||||
repository: audit
|
||||
tag: ""
|
||||
|
||||
tier:
|
||||
enabled: false
|
||||
nodeLabel: mixingx.io/tier
|
||||
services:
|
||||
audit: { mode: required, tiers: [infra] }
|
||||
Reference in new issue
Block a user