mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-04-22 02:36:40 +00:00
- Helm chart: use quay image, add color env var, rename backend env var, adjust deployment strategy and set liveness probe to 2s
80 lines
1.7 KiB
YAML
80 lines
1.7 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: podinfo
|
|
labels:
|
|
app: podinfo
|
|
spec:
|
|
replicas: 3
|
|
minReadySeconds: 15
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxUnavailable: 1
|
|
maxSurge: 1
|
|
selector:
|
|
matchLabels:
|
|
app: podinfo
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: podinfo
|
|
annotations:
|
|
prometheus.io/scrape: 'true'
|
|
spec:
|
|
terminationGracePeriodSeconds: 30
|
|
containers:
|
|
- name: podinfod
|
|
image: quay.io/stefanprodan/podinfo:0.6.0
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- sleep 3
|
|
command:
|
|
- ./podinfo
|
|
- -port=9898
|
|
- -logLevel=debug
|
|
ports:
|
|
- name: http
|
|
containerPort: 9898
|
|
protocol: TCP
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /readyz
|
|
port: 9898
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 2
|
|
failureThreshold: 1
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 9898
|
|
initialDelaySeconds: 1
|
|
periodSeconds: 10
|
|
failureThreshold: 2
|
|
resources:
|
|
requests:
|
|
memory: "32Mi"
|
|
cpu: "10m"
|
|
env:
|
|
- name: color
|
|
value: "blue"
|
|
- name: message
|
|
value: "Greetings from podinfo blue"
|
|
- name: backendURL
|
|
value: "http://podinfo-backend:9898/echo"
|
|
- name: configPath
|
|
value: "/var/secrets"
|
|
volumeMounts:
|
|
- name: auth
|
|
readOnly: true
|
|
mountPath: "/var/secrets"
|
|
volumes:
|
|
- name: auth
|
|
secret:
|
|
secretName: basic-auth
|