86 lines
2.3 KiB
YAML
86 lines
2.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: backstage
|
|
namespace: backstage
|
|
labels:
|
|
app.kubernetes.io/name: backstage
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: backstage
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: backstage
|
|
spec:
|
|
serviceAccountName: backstage
|
|
securityContext:
|
|
fsGroup: 1000
|
|
runAsNonRoot: true
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: backstage
|
|
image: zot.ad.ddupan.top/panxiao81/backstage@sha256:97ebaf4b1086bff2e70ddc4a02e90c95d347db0803becec388c781e463d40b97
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: BACKSTAGE_BASE_URL
|
|
value: https://backstage.ad.ddupan.top
|
|
- name: POSTGRES_HOST
|
|
value: shared-postgresql-rw.shared-db.svc.cluster.local
|
|
- name: POSTGRES_PORT
|
|
value: "5432"
|
|
- name: POSTGRES_USER
|
|
value: backstage
|
|
- name: POSTGRES_DATABASE
|
|
value: backstage
|
|
- name: GITEA_HOST
|
|
value: git.ddupan.top
|
|
- name: GITEA_ORG
|
|
value: panxiao81
|
|
envFrom:
|
|
- secretRef:
|
|
name: backstage
|
|
ports:
|
|
- containerPort: 7007
|
|
name: http
|
|
protocol: TCP
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /.backstage/health/v1/readiness
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 3
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /.backstage/health/v1/liveness
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 20
|
|
timeoutSeconds: 3
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 1Gi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop: [ALL]
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
volumeMounts:
|
|
- mountPath: /tmp
|
|
name: tmp
|
|
volumes:
|
|
- emptyDir: {}
|
|
name: tmp
|