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

Add support for nginx ingress controller #170

Merged
merged 10 commits into from
May 8, 2019
Prev Previous commit
Next Next commit
Add HPA to nginx demo
  • Loading branch information
stefanprodan committed May 7, 2019
commit a233b99f0b53d75bc73f12f36769903500e67ced
5 changes: 5 additions & 0 deletions artifacts/nginx/canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ spec:
apiVersion: extensions/v1beta1
kind: Ingress
name: podinfo
# HPA reference (optional)
autoscalerRef:
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
name: podinfo
# the maximum time in seconds for the canary deployment
# to make progress before it is rollback (default 600s)
progressDeadlineSeconds: 60
Expand Down
19 changes: 19 additions & 0 deletions artifacts/nginx/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: podinfo
namespace: test
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
minReplicas: 2
maxReplicas: 4
metrics:
- type: Resource
resource:
name: cpu
# scale up if usage is above
# 99% of the requested CPU (100m)
targetAverageUtilization: 99