Skip to content

Instantly share code, notes, and snippets.

@initcron
Created August 28, 2025 14:10
Show Gist options
  • Select an option

  • Save initcron/ac2d0ca530496a73f6d6d0f13926551f to your computer and use it in GitHub Desktop.

Select an option

Save initcron/ac2d0ca530496a73f6d6d0f13926551f to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: vote
labels:
role: vote
annotations:
kubernetes.io/change-cause: "image updated to v5"
spec:
minReadySeconds: 20
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 2
maxUnavailable: 1
replicas: 1
selector:
matchLabels:
app: python
role: vote
matchExpressions:
- key: version
operator: Exists
template:
metadata:
name: vote
labels:
app: python
role: vote
version: v5
spec:
containers:
- name: app
image: schoolofdevops/vote:v5
envFrom:
- configMapRef:
name: vote
optional: true
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "250m"
volumeMounts:
- name: config
mountPath: "/app/config"
readOnly: true
volumes:
- name: config
configMap:
name: vote
items:
- key: "development_config.py"
path: "development_config.py"
- key: "production_config.py"
path: "production_config.py"
optional: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment