mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Allow to scale up the operator pods by using the Helm Chart (#1881)
* Allow to scale up the operator pods by using the Helm Chart * Add support for horizontal pod autoscaling (#1676) * fix: spec.replicas
This commit is contained in:
@@ -235,6 +235,11 @@ AWX:
|
||||
|---|---|---|
|
||||
| `extraDeploy` | array of additional resources to be deployed (supports YAML or literal "\|") | - |
|
||||
|
||||
### Operator
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
| `Operator.replicas` | Number of controller-manager instance replicas | `1` |
|
||||
|
||||
### customSecrets
|
||||
| Value | Description | Default |
|
||||
|---|---|---|
|
||||
|
||||
9
Makefile
9
Makefile
@@ -370,14 +370,21 @@ helm-chart-generate: kustomize helm kubectl-slice yq charts
|
||||
for file in charts/$(CHART_NAME)/raw-files/*rolebinding*; do\
|
||||
$(YQ) -i '.subjects[0].namespace = "{{ .Release.Namespace }}"' $${file};\
|
||||
done
|
||||
# Add .spec.replicas for the controller-manager deployment
|
||||
for file in charts/$(CHART_NAME)/raw-files/deployment-*-controller-manager.yaml; do\
|
||||
$(YQ) -i '.spec.replicas = "{{ (.Values.Operator).replicas | default 1 }}"' $${file};\
|
||||
done
|
||||
# Correct .metadata.name for cluster scoped resources
|
||||
cluster_scoped_files="charts/$(CHART_NAME)/raw-files/clusterrolebinding-awx-operator-proxy-rolebinding.yaml charts/$(CHART_NAME)/raw-files/clusterrole-awx-operator-metrics-reader.yaml charts/$(CHART_NAME)/raw-files/clusterrole-awx-operator-proxy-role.yaml";\
|
||||
for file in $${cluster_scoped_files}; do\
|
||||
$(YQ) -i '.metadata.name += "-{{ .Release.Name }}"' $${file};\
|
||||
done
|
||||
|
||||
# Correct the reference for the clusterrolebinding
|
||||
$(YQ) -i '.roleRef.name += "-{{ .Release.Name }}"' 'charts/$(CHART_NAME)/raw-files/clusterrolebinding-awx-operator-proxy-rolebinding.yaml'
|
||||
# Correct .spec.replicas type for the controller-manager deployment
|
||||
for file in charts/$(CHART_NAME)/raw-files/deployment-*-controller-manager.yaml; do\
|
||||
$(SED_I) "s/'{{ (.Values.Operator).replicas | default 1 }}'/{{ (.Values.Operator).replicas | default 1 }}/g" $${file};\
|
||||
done
|
||||
# move all custom resource definitions to crds folder
|
||||
mkdir charts/$(CHART_NAME)/crds
|
||||
mv charts/$(CHART_NAME)/raw-files/customresourcedefinition*.yaml charts/$(CHART_NAME)/crds/.
|
||||
|
||||
Reference in New Issue
Block a user