Add HPA to Horizon
Change-Id: I1ce20cb97ce1f4f6175215c7104c4df71c12d54f
This commit is contained in:
parent
88d3edf72c
commit
c6316af68d
@ -55,6 +55,8 @@ def create_or_resume(name, spec, **_):
|
|||||||
name=name, spec=spec)
|
name=name, spec=spec)
|
||||||
utils.create_or_update('horizon/memcached.yml.j2',
|
utils.create_or_update('horizon/memcached.yml.j2',
|
||||||
name=name, spec=spec)
|
name=name, spec=spec)
|
||||||
|
utils.create_or_update('horizon/horizontalpodautoscaler.yml.j2',
|
||||||
|
name=name)
|
||||||
if "ingress" in spec:
|
if "ingress" in spec:
|
||||||
utils.create_or_update('horizon/ingress.yml.j2',
|
utils.create_or_update('horizon/ingress.yml.j2',
|
||||||
name=name, spec=spec)
|
name=name, spec=spec)
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2020 VEXXHOST, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
apiVersion: autoscaling/v1
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: keystone-{{ name }}
|
||||||
|
labels:
|
||||||
|
{{ labels("horizon", name) | indent(4) }}
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: horizon-{{ name }}
|
||||||
|
minReplicas: 3
|
||||||
|
maxReplicas: 10
|
||||||
|
targetCPUUtilizationPercentage: 90
|
@ -60,7 +60,7 @@ spec:
|
|||||||
name: config
|
name: config
|
||||||
- name: exporter
|
- name: exporter
|
||||||
image: vexxhost/mcrouter_exporter:latest
|
image: vexxhost/mcrouter_exporter:latest
|
||||||
args: ["-mcrouter.address", "localhost:11211", "-mcrouter.timeout", "3s"]
|
args: ["-mcrouter.address", "127.0.0.1:11211", "-mcrouter.timeout", "3s"]
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- name: metrics
|
- name: metrics
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
- role: clear-firewall
|
- role: clear-firewall
|
||||||
- role: install-kubernetes
|
- role: ensure-kubernetes
|
||||||
- role: ensure-helm
|
- role: ensure-helm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user