Skip to content

Commit 104e22a

Browse files
authored
Fix the _hpa.tpl so it produses a valid HorizontalPodAutoscaler (#147)
* Fix the _hpa.tpl so it produses a valid HorizontalPodAutoscaler * set autoscaling enabled to false * update versions * lets try kubeconform for testing * keep temp for a bit longer * dont remake temp * revert helm-test.sh changes and try run helm template * try metrics.enabeld false * reverce kubeconform try * Add line back * revers line * Add line back
1 parent 86bed9e commit 104e22a

File tree

8 files changed

+31
-30
lines changed

8 files changed

+31
-30
lines changed

Diff for: dotnet/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
description: .NET Core Helm Chart
33
name: dotnet
4-
version: 13.0.0
4+
version: 13.0.1
55
dependencies:
66
- name: libchart
7-
version: 4.0.0
7+
version: 4.0.1
88
repository: file://../libchart

Diff for: golang/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
description: golan Helm Chart
33
name: golang
4-
version: 17.0.0
4+
version: 17.0.1
55
dependencies:
66
- name: libchart
7-
version: 4.0.0
7+
version: 4.0.1
88
repository: file://../libchart

Diff for: java/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
description: Java Helm Chart
33
name: java
4-
version: 10.0.0
4+
version: 10.0.1
55
dependencies:
66
- name: libchart
7-
version: 4.0.0
7+
version: 4.0.1
88
repository: file://../libchart

Diff for: java/values.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,5 @@ volumes: []
197197

198198
deployKind: deployment
199199

200-
autoscaling:
201-
enabled: false
202-
203200
# https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
204201
dnsConfig: {}

Diff for: libchart/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: library
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 4.0.0
18+
version: 4.0.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

Diff for: libchart/templates/_hpa.tpl

+20-16
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,27 @@ metadata:
66
labels:
77
{{- include "libchart.labels" . | nindent 4 }}
88
spec:
9+
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
10+
metrics:
11+
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
12+
- resource:
13+
name: cpu
14+
target:
15+
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
16+
type: Utilization
17+
type: Resource
18+
{{- end }}
19+
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
20+
- resource:
21+
name: memory
22+
target:
23+
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
24+
type: Utilization
25+
type: Resource
26+
{{- end }}
27+
minReplicas: {{ .Values.autoscaling.minReplicas }}
928
scaleTargetRef:
1029
apiVersion: apps/v1
1130
kind: Deployment
1231
name: {{ include "libchart.fullname" . }}
13-
minReplicas: {{ .Values.autoscaling.minReplicas }}
14-
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
15-
metrics:
16-
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
17-
- type: Resource
18-
resource:
19-
name: cpu
20-
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
21-
{{- end }}
22-
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
23-
- type: Resource
24-
resource:
25-
name: memory
26-
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
27-
{{- end }}
28-
{{- end }}
32+
{{- end }}

Diff for: nodejs/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
description: Node.js Helm Chart
33
name: nodejs
4-
version: 17.0.0
4+
version: 17.0.1
55
dependencies:
66
- name: libchart
7-
version: 4.0.0
7+
version: 4.0.1
88
repository: file://../libchart

Diff for: web/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
appVersion: "1.0"
33
description: Helm chart for deployment of web servers
44
name: web
5-
version: 14.0.0
5+
version: 14.0.1
66
dependencies:
77
- name: libchart
8-
version: 4.0.0
8+
version: 4.0.1
99
repository: file://../libchart

0 commit comments

Comments
 (0)