Add melange/apko build pipeline and Kubernetes manifests
- 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
This commit is contained in:
1 parent
cc3581aa4d
commit
9c49e79657
15 files changed
+382
-7
No files matched your search
@@ -0,0 +1,71 @@
|
||||
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: {}
|
||||
Reference in new issue
Block a user