Skip to content

Commit

Permalink
feat(metering): add hpa config for aio/base overlays (#442)
Browse files Browse the repository at this point in the history
* fix(gnocchi): increase max unavailable to 20%

* feat(gnocchi): add base and aio hpa config

* fix(ceilometer): increase max_unavailable to 20%

* feat(ceilomter): add base and aio hpa config
  • Loading branch information
LukeRepko authored Sep 16, 2024
1 parent c0e2652 commit 589974d
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@ pod:
compute:
enabled: true
min_ready_seconds: 0
max_unavailable: 1
max_unavailable: 20%
resources:
enabled: false
compute:
Expand Down
6 changes: 3 additions & 3 deletions base-helm-configs/gnocchi/gnocchi-helm-overrides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ pod:
init_container: null
gnocchi_tests:
replicas:
api: 3
api: 1
lifecycle:
upgrades:
deployments:
Expand All @@ -246,11 +246,11 @@ pod:
metricd:
enabled: true
min_ready_seconds: 0
max_unavailable: 1
max_unavailable: 20%
statsd:
enabled: true
min_ready_seconds: 0
max_unavailable: 1
max_unavailable: 20%
disruption_budget:
api:
min_available: 0
Expand Down
14 changes: 14 additions & 0 deletions base-kustomize/ceilometer/aio/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
bases:
- ../base

patches:
- target:
kind: HorizontalPodAutoscaler
name: ceilometer-notification
patch: |-
- op: replace
path: /spec/minReplicas
value: 1
- op: replace
path: /spec/maxReplicas
value: 1
19 changes: 19 additions & 0 deletions base-kustomize/ceilometer/base/hpa-ceilometer-notification.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: ceilometer-notification
namespace: openstack
spec:
maxReplicas: 9
minReplicas: 3
metrics:
- resource:
name: cpu
target:
averageUtilization: 50
type: Utilization
type: Resource
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: ceilometer-notification
3 changes: 3 additions & 0 deletions base-kustomize/ceilometer/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- all.yaml
- hpa-ceilometer-notification.yaml
14 changes: 14 additions & 0 deletions base-kustomize/gnocchi/aio/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
bases:
- ../base

patches:
- target:
kind: HorizontalPodAutoscaler
name: gnocchi-api
patch: |-
- op: replace
path: /spec/minReplicas
value: 1
- op: replace
path: /spec/maxReplicas
value: 1
19 changes: 19 additions & 0 deletions base-kustomize/gnocchi/base/hpa-gnocchi-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: gnocchi-api
namespace: openstack
spec:
maxReplicas: 9
minReplicas: 3
metrics:
- resource:
name: cpu
target:
averageUtilization: 50
type: Utilization
type: Resource
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: gnocchi-api
1 change: 1 addition & 0 deletions base-kustomize/gnocchi/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
resources:
- gnocchi-temp-keyring.yaml
- all.yaml
- hpa-gnocchi-api.yaml

patches:
- path: configmap-bin.yaml
Expand Down
4 changes: 3 additions & 1 deletion docs/openstack-ceilometer.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ rabbit://glance:$(kubectl --namespace openstack get secret glance-rabbitmq-passw
rabbit://heat:$(kubectl --namespace openstack get secret heat-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/heat,\
rabbit://keystone:$(kubectl --namespace openstack get secret keystone-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/keystone,\
rabbit://neutron:$(kubectl --namespace openstack get secret neutron-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/neutron,\
rabbit://nova:$(kubectl --namespace openstack get secret nova-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/nova}"
rabbit://nova:$(kubectl --namespace openstack get secret nova-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)@rabbitmq.openstack.svc.cluster.local:5672/nova}" \
--post-renderer /opt/genestack/base-kustomize/kustomize.sh \
--post-renderer-args ceilometer/base
```

!!! tip
Expand Down

0 comments on commit 589974d

Please sign in to comment.