Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/apache] Update templates to have conditionals for HPA #29489

Merged
merged 3 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bitnami/apache/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 11.2.18 (2024-09-15)
## 11.2.19 (2024-09-18)

* [bitnami/apache] Release 11.2.18 ([#29418](https://github.com/bitnami/charts/pull/29418))
* [bitnami/apache] Update templates to have conditionals for HPA ([#29489](https://github.com/bitnami/charts/pull/29489))

## <small>11.2.18 (2024-09-15)</small>

* [bitnami/apache] Release 11.2.18 (#29418) ([665ff2b](https://github.com/bitnami/charts/commit/665ff2be8f372b4cf2a75c4d4c7e7c8bcd647310)), closes [#29418](https://github.com/bitnami/charts/issues/29418)

## <small>11.2.17 (2024-09-03)</small>

Expand Down
2 changes: 1 addition & 1 deletion bitnami/apache/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ maintainers:
name: apache
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/apache
version: 11.2.18
version: 11.2.19
2 changes: 1 addition & 1 deletion bitnami/apache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ As an alternative, you can use the preset configurations for pod affinity, pod
| `git.digest` | Git image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
| `git.pullPolicy` | Git image pull policy | `IfNotPresent` |
| `git.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
| `replicaCount` | Number of replicas of the Apache deployment | `1` |
| `replicaCount` | Number of replicas of the Apache deployment, Ignored if `autoscaling.enabled` set to `true` | `1` |
| `revisionHistoryLimit` | The number of old history to retain to allow rollback | `10` |
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
Expand Down
3 changes: 3 additions & 0 deletions bitnami/apache/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ spec:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
# Have replicas Only if autoscaling is disabled
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
Expand Down
16 changes: 8 additions & 8 deletions bitnami/apache/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ spec:
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPU }}
{{- if .Values.autoscaling.targetMemory }}
- type: Resource
resource:
name: cpu
name: memory
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.autoscaling.targetCPU }}
targetAverageUtilization: {{ .Values.autoscaling.targetMemory }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPU }}
averageUtilization: {{ .Values.autoscaling.targetMemory }}
{{- end }}
{{- end }}
{{- if .Values.autoscaling.targetMemory }}
{{- if .Values.autoscaling.targetCPU }}
- type: Resource
resource:
name: memory
name: cpu
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
targetAverageUtilization: {{ .Values.autoscaling.targetMemory }}
targetAverageUtilization: {{ .Values.autoscaling.targetCPU }}
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemory }}
averageUtilization: {{ .Values.autoscaling.targetCPU }}
{{- end }}
{{- end }}
{{- end }}
Loading