- Add melange.yaml for distroless package build - Add apko.yaml for minimal container image - Add GitHub Actions workflow for melange/apko CI build - Add Kubernetes manifests (deployment, service, configmap, secret, redis) - Update Dockerfile, .gitignore, and docker-compose.yml
72 lines
1.8 KiB
YAML
72 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: apcupsd-client
|
|
namespace: apcupsd
|
|
labels:
|
|
app.kubernetes.io/name: apcupsd-client
|
|
app.kubernetes.io/part-of: apcupsd-client
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 0
|
|
maxSurge: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: apcupsd-client
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: apcupsd-client
|
|
spec:
|
|
securityContext:
|
|
runAsUser: 10001
|
|
runAsGroup: 10001
|
|
runAsNonRoot: true
|
|
fsGroup: 10001
|
|
containers:
|
|
- name: web
|
|
image: ghcr.io/k2patel/apcupsd-client:latest
|
|
ports:
|
|
- containerPort: 8000
|
|
protocol: TCP
|
|
envFrom:
|
|
- configMapRef:
|
|
name: apcupsd-client-config
|
|
- secretRef:
|
|
name: apcupsd-client-secret
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8000
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /readyz
|
|
port: 8000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
resources:
|
|
requests:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
limits:
|
|
memory: "256Mi"
|
|
cpu: "500m"
|
|
securityContext:
|
|
readOnlyRootFilesystem: true
|
|
allowPrivilegeEscalation: false
|
|
volumeMounts:
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir: {}
|