69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: attic
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: attic
|
|
# strategy:
|
|
# type: Recreate
|
|
strategy:
|
|
rollingUpdate:
|
|
maxSurge: 25%
|
|
maxUnavailable: 25%
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: attic
|
|
spec:
|
|
containers:
|
|
- name: attic
|
|
image: ghcr.io/zhaofengli/attic:latest
|
|
args:
|
|
- -f
|
|
- /config.toml
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
env:
|
|
- name: ATTIC_SERVER_TOKEN_HS256_SECRET_BASE64
|
|
value: "r0To/djPCwwXRtFcHakhiEHLkEuOQQJtPPeRsfyg8XAkp0A8Tu+AwGz12RFR65JvyhWXSPg7RUIwXzbg6YLcmA=="
|
|
# valueFrom:
|
|
# secretKeyRef:
|
|
# name: server
|
|
# key: token
|
|
- name: ATTIC_SERVER_DATABASE_URL
|
|
value: "http://attic-db.svc.cluster.local:5432"
|
|
# valueFrom:
|
|
# secretKeyRef:
|
|
# name: database
|
|
# key: url
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /attic
|
|
- name: attic-config
|
|
mountPath: /config.toml
|
|
subPath: config.toml
|
|
volumes:
|
|
- name: server
|
|
secret:
|
|
secretName: server
|
|
- name: attic-config
|
|
configMap:
|
|
defaultMode: 420
|
|
name: attic-config
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: attic
|