Skip to content
Snippets Groups Projects
Commit 78a1bd30 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

put maxReplicas to 1 when present and autoscaling become disabled, fixed #11

parent fee46947
No related branches found
No related tags found
No related merge requests found
Pipeline #122298 passed
Pipeline: shiny-k8s-example

#122299

    {{- if .Values.autoscaling.enabled }} {{- if or (.Values.autoscaling.enabled) (lookup "autoscaling/v2" "HorizontalPodAutoscaler" .Release.Namespace (include "chart.fullname" .)) }}
    apiVersion: autoscaling/v2 apiVersion: autoscaling/v2
    kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
    metadata: metadata:
    ...@@ -10,8 +10,13 @@ spec: ...@@ -10,8 +10,13 @@ spec:
    apiVersion: apps/v1 apiVersion: apps/v1
    kind: Deployment kind: Deployment
    name: {{ include "chart.fullname" . }} name: {{ include "chart.fullname" . }}
    {{ if $.Values.autoscaling.enabled }}
    minReplicas: {{ .Values.autoscaling.minReplicas }} minReplicas: {{ .Values.autoscaling.minReplicas }}
    maxReplicas: {{ .Values.autoscaling.maxReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }}
    {{ else }}
    minReplicas: 1
    maxReplicas: 1
    {{ end }}
    metrics: metrics:
    {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
    - type: Resource - type: Resource
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment