Add HPA example

test
Stefan Prodan 2018-11-16 20:39:40 +02:00
parent ee1284fcb3
commit 5c9c5b1a2c
3 changed files with 26 additions and 1 deletions

View File

@ -3,6 +3,13 @@
We published a step-by-step run-through on how to use Flux and Helm Operator [over
here](https://github.com/weaveworks/flux/blob/master/site/helm-get-started.md).
### Workloads
podinfo
* Kubernetes deployment, ClusterIP service and Horizontal Pod Autoscaler
* init container automated image updates (regular expression filter)
* container automated image updates (semantic versioning filter)
### Helm releases
Mongodb

View File

@ -11,7 +11,6 @@ metadata:
flux.weave.works/tag.init: regexp:^3.*
flux.weave.works/tag.podinfod: semver:~1.3
spec:
replicas: 1
strategy:
rollingUpdate:
maxUnavailable: 0

View File

@ -0,0 +1,19 @@
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: podinfo
namespace: demo
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 (10m)
targetAverageUtilization: 99