stabilize prod statefulset gitops drift

This commit is contained in:
Prodiglagla
2026-06-14 12:41:42 +08:00
parent 5932f37fc0
commit a89e26b839
6 changed files with 85 additions and 5 deletions
-1
View File
@@ -17,7 +17,6 @@ resources:
- manifests/interaction-service.yaml
- manifests/magnet-service.yaml
- manifests/metadata-worker.yaml
- manifests/migrator-job.yaml
- manifests/normalization-worker.yaml
- manifests/notification-worker.yaml
- manifests/observability-monitoring.yaml
+24 -2
View File
@@ -51,9 +51,15 @@ spec:
app.kubernetes.io/part-of: ircs
environment: prod
spec:
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
initContainers:
- name: install-plugins
image: alpine:3.19
imagePullPolicy: IfNotPresent
command:
- sh
- -c
@@ -87,6 +93,8 @@ spec:
volumeMounts:
- name: plugins-volume
mountPath: /plugins
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
containers:
- name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:9.1.4
@@ -94,8 +102,10 @@ spec:
ports:
- name: http
containerPort: 9200
protocol: TCP
- name: transport
containerPort: 9300
protocol: TCP
env:
- name: discovery.type
value: single-node
@@ -115,31 +125,43 @@ spec:
port: http
failureThreshold: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
tcpSocket:
port: http
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
tcpSocket:
port: http
failureThreshold: 3
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 1
resources:
requests:
cpu: 100m
memory: 1Gi
limits:
cpu: 1000m
cpu: "1"
memory: 2Gi
volumeMounts:
- name: elasticsearch-data
mountPath: /usr/share/elasticsearch/data
- name: plugins-volume
mountPath: /usr/share/elasticsearch/plugins
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumes:
- name: plugins-volume
emptyDir: {}
volumeClaimTemplates:
- metadata:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: elasticsearch-data
labels:
app: elasticsearch
+19 -1
View File
@@ -48,6 +48,11 @@ spec:
app.kubernetes.io/part-of: ircs
environment: prod
spec:
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
containers:
- name: postgres
image: postgres:18-alpine
@@ -55,6 +60,7 @@ spec:
ports:
- name: postgres
containerPort: 5432
protocol: TCP
env:
- name: POSTGRES_DB
value: ircs
@@ -72,14 +78,22 @@ spec:
command: ["pg_isready", "-U", "postgres", "-d", "ircs"]
failureThreshold: 30
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
exec:
command: ["pg_isready", "-U", "postgres", "-d", "ircs"]
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
livenessProbe:
exec:
command: ["pg_isready", "-U", "postgres", "-d", "ircs"]
failureThreshold: 3
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 1
resources:
requests:
cpu: 100m
@@ -90,8 +104,12 @@ spec:
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeClaimTemplates:
- metadata:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-data
labels:
app: postgres
+17 -1
View File
@@ -51,6 +51,11 @@ spec:
app.kubernetes.io/part-of: ircs
environment: prod
spec:
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
containers:
- name: rabbitmq
image: rabbitmq:4.1.8-management
@@ -58,8 +63,10 @@ spec:
ports:
- name: amqp
containerPort: 5672
protocol: TCP
- name: management
containerPort: 15672
protocol: TCP
env:
- name: RABBITMQ_DEFAULT_USER
value: admin
@@ -73,16 +80,21 @@ spec:
command: ["rabbitmq-diagnostics", "-q", "ping"]
failureThreshold: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
readinessProbe:
exec:
command: ["rabbitmq-diagnostics", "-q", "ping"]
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
livenessProbe:
exec:
command: ["rabbitmq-diagnostics", "-q", "ping"]
failureThreshold: 3
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
resources:
requests:
@@ -94,8 +106,12 @@ spec:
volumeMounts:
- name: rabbitmq-data
mountPath: /var/lib/rabbitmq
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeClaimTemplates:
- metadata:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rabbitmq-data
labels:
app: rabbitmq
+4
View File
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../core/manifests/migrator-job.yaml