up to git
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- satusehat-service-deployment.yaml
|
||||
- satusehat-service-service.yaml
|
||||
- satusehat-worker-deployment.yaml
|
||||
- satusehat-worker-service.yaml
|
||||
- satusehat-worker-data-pvc.yaml
|
||||
- redis-deployment.yaml
|
||||
- redis-service.yaml
|
||||
- redis-pvc.yaml
|
||||
|
||||
patches:
|
||||
- path: satusehat-service-resources.yaml
|
||||
- path: satusehat-service-probes.yaml
|
||||
- path: satusehat-worker-resources.yaml
|
||||
- path: satusehat-worker-probes.yaml
|
||||
- path: patch-worker-writable-path.yaml
|
||||
- path: patch-worker-wait-service.yaml
|
||||
|
||||
commonLabels:
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: satusehat-worker
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: wait-satusehat-service
|
||||
image: busybox:1.36
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
echo "Waiting for satusehat-service-prod:80..."
|
||||
until nc -z satusehat-service-prod 80; do
|
||||
echo "satusehat-service-prod belum ready, tunggu 3 detik..."
|
||||
sleep 3
|
||||
done
|
||||
echo "satusehat-service-prod ready."
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: satusehat-worker
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65532
|
||||
runAsGroup: 65532
|
||||
fsGroup: 65532
|
||||
fsGroupChangePolicy: OnRootMismatch
|
||||
containers:
|
||||
- name: satusehat-worker
|
||||
workingDir: /app
|
||||
volumeMounts:
|
||||
- name: satusehat-worker-internal-data
|
||||
mountPath: /app/internal
|
||||
volumes:
|
||||
- name: satusehat-worker-internal-data
|
||||
persistentVolumeClaim:
|
||||
claimName: satusehat-worker-data
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis-satusehat
|
||||
labels:
|
||||
app: redis-satusehat
|
||||
app.kubernetes.io/name: redis-satusehat
|
||||
app.kubernetes.io/component: cache
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis-satusehat
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis-satusehat
|
||||
app.kubernetes.io/name: redis-satusehat
|
||||
app.kubernetes.io/component: cache
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
containers:
|
||||
- name: redis-satusehat
|
||||
image: redis:7-alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: redis-satusehat
|
||||
containerPort: 6379
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: redis-env
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
if [ -n "$REDIS_PASSWORD" ]; then
|
||||
exec redis-server --appendonly yes --requirepass "$REDIS_PASSWORD"
|
||||
else
|
||||
exec redis-server --appendonly yes
|
||||
fi
|
||||
volumeMounts:
|
||||
- name: redis-satusehat-data
|
||||
mountPath: /data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
volumes:
|
||||
- name: redis-satusehat-data
|
||||
persistentVolumeClaim:
|
||||
claimName: redis-satusehat-data
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: redis-satusehat-data
|
||||
labels:
|
||||
app: redis-satusehat
|
||||
app.kubernetes.io/name: redis-satusehat
|
||||
app.kubernetes.io/component: cache
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: nas-rx300
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-satusehat
|
||||
labels:
|
||||
app: redis-satusehat
|
||||
app.kubernetes.io/name: redis-satusehat
|
||||
app.kubernetes.io/component: cache
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
selector:
|
||||
app: redis-satusehat
|
||||
ports:
|
||||
- name: redis-satusehat
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: satusehat-service
|
||||
labels:
|
||||
app: satusehat-service
|
||||
app.kubernetes.io/name: satusehat-service
|
||||
app.kubernetes.io/component: api
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: satusehat-service
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: satusehat-service
|
||||
app.kubernetes.io/name: satusehat-service
|
||||
app.kubernetes.io/component: api
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65532
|
||||
runAsGroup: 65532
|
||||
fsGroup: 65532
|
||||
containers:
|
||||
- name: satusehat-service
|
||||
image: git.rssa.top/ryan/satusehat-service:20260624092651-main
|
||||
imagePullPolicy: Always
|
||||
workingDir: /app
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8196
|
||||
- name: grpc
|
||||
containerPort: 8197
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: satusehat-service-env
|
||||
volumeMounts:
|
||||
- name: service-logs
|
||||
mountPath: /app/logs
|
||||
- name: service-tmp
|
||||
mountPath: /tmp
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
volumes:
|
||||
- name: service-logs
|
||||
emptyDir: {}
|
||||
- name: service-tmp
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,73 @@
|
||||
# apiVersion: apps/v1
|
||||
# kind: Deployment
|
||||
# metadata:
|
||||
# name: satusehat-service
|
||||
# spec:
|
||||
# template:
|
||||
# spec:
|
||||
# containers:
|
||||
# - name: satusehat-service
|
||||
# startupProbe:
|
||||
# httpGet:
|
||||
# scheme: HTTP
|
||||
# port: 8196
|
||||
# path: /health
|
||||
# initialDelaySeconds: 5
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 10
|
||||
# failureThreshold: 30
|
||||
# successThreshold: 1
|
||||
# readinessProbe:
|
||||
# httpGet:
|
||||
# scheme: HTTP
|
||||
# port: 8196
|
||||
# path: /ready
|
||||
# initialDelaySeconds: 10
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 10
|
||||
# failureThreshold: 5
|
||||
# successThreshold: 1
|
||||
# livenessProbe:
|
||||
# httpGet:
|
||||
# scheme: HTTP
|
||||
# port: 8196
|
||||
# path: /live
|
||||
# initialDelaySeconds: 90
|
||||
# periodSeconds: 30
|
||||
# timeoutSeconds: 10
|
||||
# failureThreshold: 5
|
||||
# successThreshold: 1
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: satusehat-service
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: satusehat-service
|
||||
startupProbe:
|
||||
tcpSocket:
|
||||
port: 8196
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 18
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 8196
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 8196
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: satusehat-service
|
||||
spec:
|
||||
replicas: 2
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: satusehat-service
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 2Gi
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: satusehat-service
|
||||
labels:
|
||||
app: satusehat-service
|
||||
app.kubernetes.io/name: satusehat-service
|
||||
app.kubernetes.io/component: api
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
selector:
|
||||
app: satusehat-service
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8196
|
||||
- name: grpc
|
||||
port: 8197
|
||||
targetPort: 8197
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: satusehat-worker-data
|
||||
labels:
|
||||
app: satusehat-worker
|
||||
app.kubernetes.io/name: satusehat-worker
|
||||
app.kubernetes.io/component: worker
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: nas-rx300
|
||||
@@ -0,0 +1,52 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: satusehat-worker
|
||||
labels:
|
||||
app: satusehat-worker
|
||||
app.kubernetes.io/name: satusehat-worker
|
||||
app.kubernetes.io/component: worker
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: satusehat-worker
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: satusehat-worker
|
||||
app.kubernetes.io/name: satusehat-worker
|
||||
app.kubernetes.io/component: worker
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65532
|
||||
runAsGroup: 65532
|
||||
fsGroup: 65532
|
||||
containers:
|
||||
- name: satusehat-worker
|
||||
image: git.rssa.top/ryan/satusehat-worker:20260612104704-main
|
||||
imagePullPolicy: Always
|
||||
workingDir: /app
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: satusehat-worker-env
|
||||
volumeMounts:
|
||||
- name: worker-logs
|
||||
mountPath: /app/logs
|
||||
- name: worker-tmp
|
||||
mountPath: /tmp
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
volumes:
|
||||
- name: worker-logs
|
||||
emptyDir: {}
|
||||
- name: worker-tmp
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,73 @@
|
||||
# apiVersion: apps/v1
|
||||
# kind: Deployment
|
||||
# metadata:
|
||||
# name: satusehat-worker
|
||||
# spec:
|
||||
# template:
|
||||
# spec:
|
||||
# containers:
|
||||
# - name: satusehat-worker
|
||||
# startupProbe:
|
||||
# httpGet:
|
||||
# scheme: HTTP
|
||||
# port: 8080
|
||||
# path: /health
|
||||
# initialDelaySeconds: 5
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 10
|
||||
# failureThreshold: 30
|
||||
# successThreshold: 1
|
||||
# readinessProbe:
|
||||
# httpGet:
|
||||
# scheme: HTTP
|
||||
# port: 8080
|
||||
# path: /ready
|
||||
# initialDelaySeconds: 10
|
||||
# periodSeconds: 10
|
||||
# timeoutSeconds: 10
|
||||
# failureThreshold: 5
|
||||
# successThreshold: 1
|
||||
# livenessProbe:
|
||||
# httpGet:
|
||||
# scheme: HTTP
|
||||
# port: 8080
|
||||
# path: /live
|
||||
# initialDelaySeconds: 90
|
||||
# periodSeconds: 30
|
||||
# timeoutSeconds: 10
|
||||
# failureThreshold: 5
|
||||
# successThreshold: 1
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: satusehat-worker
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: satusehat-worker
|
||||
startupProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 18
|
||||
successThreshold: 1
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 2
|
||||
failureThreshold: 3
|
||||
successThreshold: 1
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: satusehat-worker
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: satusehat-worker
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 2Gi
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: satusehat-worker
|
||||
labels:
|
||||
app: satusehat-worker
|
||||
app.kubernetes.io/name: satusehat-worker
|
||||
app.kubernetes.io/component: worker
|
||||
app.kubernetes.io/part-of: satusehat
|
||||
spec:
|
||||
selector:
|
||||
app: satusehat-worker
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
Reference in New Issue
Block a user