Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): create PoC deployment for Clapfire #115

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat(demo): show HPA and reliability example
  • Loading branch information
nicklasfrahm committed Nov 28, 2024
commit ba76923a0954993a0da67a87ee3e292ef514ce8f
75 changes: 75 additions & 0 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/name: blue
name: blue
namespace: blue
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: blue
template:
metadata:
labels:
app.kubernetes.io/name: blue
spec:
containers:
- image: gcr.io/kuar-demo/kuard-amd64:blue
imagePullPolicy: IfNotPresent
name: nginx
ports:
- containerPort: 8080
name: http
protocol: TCP
resources:
requests:
cpu: 100m
memory: 64Mi
limits:
memory: 64Mi
topologySpreadConstraints:
- topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
minDomains: 3
maxSkew: 1
labelSelector:
matchLabels:
app.kubernetes.io/name: blue
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: blue
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: blue
minReplicas: 3
maxReplicas: 20
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 75
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 75
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: blue
spec:
# stateless
maxUnavailable: 50%
selector:
matchLabels:
app.kubernetes.io/name: blue