Skip to content

Commit

Permalink
Merge pull request #460 from karun-singh/4.5.0
Browse files Browse the repository at this point in the history
ES autoscaler fix [4.5.0]
  • Loading branch information
abhi4578 authored Apr 28, 2023
2 parents 9f6d0ed + edabce2 commit 96d9eeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions K8s-deployment/Charts/elk/elasticsearch/autoscale-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ rules:
verbs: ["get", "list","watch","create","update","delete"]
- apiGroups: [""]
resources: ["configmaps"]
resourceNames: ["elasticsearch-data-nodes-config"]
resourceNames: ["elasticsearch-data-node-config"]
verbs: ["get","list"]
- apiGroups: ["policy"]
resources: ["poddisruptionbudgets"]
resourceNames: ["elasticsearch-data-nodes-pdb"]
verbs: ["get", "patch"]
- apiGroups: [""]
resources: ["services"]
resourceNames: ["elasticsearch-data-nodes-hl","elasticsearch"]
verbs: ["get"]
resourceNames: ["elasticsearch-data-nodes-hl","elasticsearch-mcd-hl","elasticsearch","elasticsearch-metrics"]
verbs: ["get","patch"]
- apiGroups: ["apps"]
resources: ["statefulsets"]
resourceNames: ["elasticsearch-data-nodes","elasticsearch-mcd"]
verbs: ["get", "patch"]
- apiGroups: ["apps"]
resources: ["deployments"]
resourceNames: ["elasticsearch-metrics"]
verbs: ["get", "patch"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
2 changes: 1 addition & 1 deletion K8s-deployment/Charts/elk/elasticsearch/es-autoscaler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [ $totalDataNodesRequired -gt $es_nodes ]
then
echo "Scale up es-data-node by $(($totalDataNodesRequired - $es_nodes))"
# total data nodes required - 3 master nodes to get total data-only nodes required and set scale
helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami && helm upgrade --reuse-values --set data.replicas=$(($totalDataNodesRequired - 3)) --version 19.2.4 elasticsearch bitnami/elasticsearch -n elastic
helm repo add bitnami https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami && helm upgrade --reuse-values --set data.replicaCount=$(($totalDataNodesRequired - 3)) --version 19.2.4 elasticsearch bitnami/elasticsearch -n elastic
exit 0
else
echo "No need to scale up"
Expand Down

0 comments on commit 96d9eeb

Please sign in to comment.