mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-09 05:06:29 +10:00
[template] update template with latest standardisation changes (#10231)
* Apply some fixes Signed-off-by: Fran Mulero <fmulero@vmware.com> * Use the new helper for HPA API version Signed-off-by: Fran Mulero <fmulero@vmware.com> * Remove extra whitespace Signed-off-by: Fran Mulero <fmulero@vmware.com> Co-authored-by: Miguel Ruiz <miruiz@vmware.com> Co-authored-by: Miguel Ruiz <miruiz@vmware.com>
This commit is contained in:
co-authored by
Miguel Ruiz
parent
cac805f6ee
commit
0911c803fc
@@ -2,7 +2,6 @@ kind: ClusterRoleBinding
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: %%COMPONENT_NAME%%
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
apiVersion: {{ include "common.capabilities.hpa.apiVersion" . }}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
@@ -23,12 +23,24 @@ spec:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
|
||||
targetAverageUtilization: {{ .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.targetMemory }}
|
||||
{{- else }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.worker.autoscaling.targetMemory }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.targetCPU }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
|
||||
targetAverageUtilization: {{ .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.targetCPU }}
|
||||
{{- else }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.worker.autoscaling.targetCPU }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{ if .Values.rbac.create }}
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
|
||||
@@ -45,5 +45,5 @@ spec:
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
- {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user