Skip to content

Commit

Permalink
looker: prepare for Kubernetes 1.25
Browse files Browse the repository at this point in the history
  • Loading branch information
ylascombe committed Jun 27, 2023
1 parent 8679e23 commit 4a592ac
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion looker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ home: https://github.com/honestica/lifen-charts
description: A Looker Helm chart for Kubernetes.
icon: https://looker.com/assets/img/images/logos/looker.svg
# type: application
version: 0.1.3
version: 0.2.0
keywords:
- looker
- google
Expand Down
18 changes: 17 additions & 1 deletion looker/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
{{- if .Capabilities.APIVersions.Has "autoscaling/v2/HorizontalPodAutoscaler" }}
apiVersion: autoscaling/v2
{{- else }}
apiVersion: autoscaling/v2beta2
{{- end }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "looker.fullname" . }}
Expand All @@ -17,12 +21,24 @@ spec:
- type: Resource
resource:
name: cpu
{{- if .Capabilities.APIVersions.Has "autoscaling/v2/HorizontalPodAutoscaler" }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- else }}
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
{{- if .Capabilities.APIVersions.Has "autoscaling/v2/HorizontalPodAutoscaler" }}
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- else }}
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 4a592ac

Please sign in to comment.