bootstrap ircs-prod gitops config

This commit is contained in:
Prodiglagla
2026-06-14 11:46:13 +08:00
commit f83d1157b1
41 changed files with 3879 additions and 0 deletions
@@ -0,0 +1,147 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ircs-storage-service
namespace: ircs-prod
labels:
app: ircs-storage-service
app.kubernetes.io/part-of: ircs
environment: prod
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: ircs-storage-service
template:
metadata:
labels:
app: ircs-storage-service
app.kubernetes.io/part-of: ircs
environment: prod
spec:
imagePullSecrets:
- name: harbor-secret
containers:
- name: app
image: harbor.mnnu.eu.org/ircs/ircs-storage-service@sha256:d84e61ee19b84a77a0cd1c608eb51cf673b0d8fc47571366742542ff5a00b88c
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
envFrom:
- configMapRef:
name: ircs-prod-app-config
env:
- name: SPRING_APPLICATION_NAME
value: ircs-storage-service
- name: SPRING_RABBITMQ_HOST
valueFrom:
configMapKeyRef:
name: ircs-prod-app-config
key: RABBITMQ_HOST
- name: SPRING_RABBITMQ_USERNAME
value: admin
- name: SPRING_RABBITMQ_PASSWORD
valueFrom:
secretKeyRef:
name: ircs-prod-secrets
key: RABBITMQ_PASSWORD
- name: SPRING_DATASOURCE_URL
valueFrom:
configMapKeyRef:
name: ircs-prod-app-config
key: DB_URL
- name: SPRING_DATASOURCE_USERNAME
value: postgres
- name: SPRING_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef:
name: ircs-prod-secrets
key: DB_PASSWORD
- name: SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE
value: "2"
- name: SPRING_DATASOURCE_HIKARI_MINIMUM_IDLE
value: "0"
- name: SPRING_DATASOURCE_HIKARI_IDLE_TIMEOUT
value: "30000"
- name: APP_STORAGE_BASE_PATH
value: /app/storage
- name: APP_STORAGE_LISTENER_ENABLED
value: "true"
- name: APP_STORAGE_CONFIG_LISTENER_ENABLED
value: "true"
- name: APP_STORAGE_INTERNAL_ACCESS_REQUIRE_TOKEN
value: "true"
- name: APP_STORAGE_INTERNAL_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: ircs-prod-secrets
key: INTERNAL_CREDENTIAL_TOKEN
- name: APP_STORAGE_INTERNAL_ACCESS_AVATAR_SCOPE
value: storage:avatar
- name: APP_STORAGE_R2_ENABLED
value: "false"
- name: APP_STORAGE_IMAGE_MAX_UPLOAD_BYTES
value: "10485760"
- name: APP_STORAGE_R2_WATCHDOG_ENABLED
value: "false"
- name: APP_STORAGE_R2_BUCKET_NAME
valueFrom:
configMapKeyRef:
name: ircs-prod-app-config
key: R2_BUCKET_NAME
- name: APP_STORAGE_R2_PUBLIC_DOMAIN
valueFrom:
configMapKeyRef:
name: ircs-prod-app-config
key: R2_PUBLIC_DOMAIN
volumeMounts:
- name: storage-volume
mountPath: /app/storage
startupProbe:
httpGet:
path: /actuator/health/liveness
port: http
failureThreshold: 30
periodSeconds: 5
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: http
periodSeconds: 10
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: http
periodSeconds: 30
resources:
requests:
cpu: 25m
memory: 128Mi
limits:
cpu: 250m
memory: 512Mi
volumes:
- name: storage-volume
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: ircs-storage-service
namespace: ircs-prod
labels:
app: ircs-storage-service
app.kubernetes.io/part-of: ircs
environment: prod
spec:
type: ClusterIP
selector:
app: ircs-storage-service
ports:
- name: http
port: 8080
targetPort: http