-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Feat: Add HPA & PDB Helm Chart Support #13391 #13512
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
base: dev
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
carlosmt86 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| {{- if .Values.celery.beat.autoscaling.enabled -}} | ||
| {{- $fullName := include "defectdojo.fullname" . -}} | ||
| apiVersion: autoscaling/v2 | ||
| kind: HorizontalPodAutoscaler | ||
| metadata: | ||
| {{- with mergeOverwrite dict .Values.extraAnnotations .Values.celery.annotations .Values.celery.beat.annotations }} | ||
| annotations: | ||
| {{- range $key, $value := . }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| {{- end }} | ||
| name: {{ $fullName }}-celery-beat | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| defectdojo.org/component: celery | ||
| defectdojo.org/subcomponent: beat | ||
| app.kubernetes.io/name: {{ include "defectdojo.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| helm.sh/chart: {{ include "defectdojo.chart" . }} | ||
| {{- range $key, $value := .Values.extraLabels }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| spec: | ||
| scaleTargetRef: | ||
| apiVersion: apps/v1 | ||
| kind: "Deployment" | ||
| name: {{ $fullName }}-celery-beat | ||
| minReplicas: {{ .Values.celery.beat.autoscaling.minReplicas }} | ||
| maxReplicas: {{ .Values.celery.beat.autoscaling.maxReplicas }} | ||
| metrics: | ||
| {{- with .Values.celery.beat.autoscaling.targetCPUUtilizationPercentage }} | ||
| - type: Resource | ||
| resource: | ||
| name: cpu | ||
| target: | ||
| averageUtilization: {{ . }} | ||
| type: Utilization | ||
| {{- end }} | ||
| {{- with .Values.celery.beat.autoscaling.targetMemoryUtilizationPercentage }} | ||
| - type: Resource | ||
| resource: | ||
| name: memory | ||
| target: | ||
| averageUtilization: {{ . }} | ||
| type: Utilization | ||
| {{- end }} | ||
| {{- if .Values.celery.beat.autoscaling.autoscaleBehavior }} | ||
| behavior: {{ toYaml .Values.celery.beat.autoscaling.autoscaleBehavior | nindent 4 }} | ||
| {{- end }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| {{- if .Values.celery.beat.podDisruptionBudget.enabled }} | ||
| {{- $fullName := include "defectdojo.fullname" . -}} | ||
| apiVersion: policy/v1 | ||
| kind: PodDisruptionBudget | ||
| metadata: | ||
| {{- with mergeOverwrite dict .Values.extraAnnotations .Values.celery.annotations .Values.celery.beat.annotations }} | ||
| annotations: | ||
| {{- range $key, $value := . }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| {{- end }} | ||
| labels: | ||
| defectdojo.org/component: celery | ||
| defectdojo.org/subcomponent: beat | ||
| app.kubernetes.io/name: {{ include "defectdojo.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| helm.sh/chart: {{ include "defectdojo.chart" . }} | ||
| {{- range $key, $value := .Values.extraLabels }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| name: {{ $fullName }}-celery-beat | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: {{ .Release.Name }} | ||
| defectdojo.org/component: celery | ||
| defectdojo.org/subcomponent: beat | ||
| {{ toYaml (omit .Values.celery.beat.podDisruptionBudget "enabled" ) | indent 2 }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| {{- if .Values.celery.worker.autoscaling.enabled -}} | ||
| {{- $fullName := include "defectdojo.fullname" . -}} | ||
| apiVersion: autoscaling/v2 | ||
| kind: HorizontalPodAutoscaler | ||
| metadata: | ||
| {{- with mergeOverwrite dict .Values.extraAnnotations .Values.celery.annotations .Values.celery.worker.annotations }} | ||
| annotations: | ||
| {{- range $key, $value := . }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| {{- end }} | ||
| name: {{ $fullName }}-celery-worker | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| defectdojo.org/component: celery | ||
| defectdojo.org/subcomponent: worker | ||
| app.kubernetes.io/name: {{ include "defectdojo.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| helm.sh/chart: {{ include "defectdojo.chart" . }} | ||
| {{- range $key, $value := .Values.extraLabels }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| spec: | ||
| scaleTargetRef: | ||
| apiVersion: apps/v1 | ||
| kind: "Deployment" | ||
| name: {{ $fullName }}-celery-worker | ||
| minReplicas: {{ .Values.celery.worker.autoscaling.minReplicas }} | ||
| maxReplicas: {{ .Values.celery.worker.autoscaling.maxReplicas }} | ||
| metrics: | ||
| {{- with .Values.celery.worker.autoscaling.targetCPUUtilizationPercentage }} | ||
| - type: Resource | ||
| resource: | ||
| name: cpu | ||
| target: | ||
| averageUtilization: {{ . }} | ||
| type: Utilization | ||
| {{- end }} | ||
| {{- with .Values.celery.worker.autoscaling.targetMemoryUtilizationPercentage }} | ||
| - type: Resource | ||
| resource: | ||
| name: memory | ||
| target: | ||
| averageUtilization: {{ . }} | ||
| type: Utilization | ||
| {{- end }} | ||
| {{- if .Values.celery.worker.autoscaling.autoscaleBehavior }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any reason not to use |
||
| behavior: {{ toYaml .Values.celery.worker.autoscaling.autoscaleBehavior | nindent 4 }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shorter version: |
||
| {{- end }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| {{- if .Values.celery.worker.podDisruptionBudget.enabled }} | ||
| {{- $fullName := include "defectdojo.fullname" . -}} | ||
| apiVersion: policy/v1 | ||
| kind: PodDisruptionBudget | ||
| metadata: | ||
| {{- with mergeOverwrite dict .Values.extraAnnotations .Values.celery.annotations .Values.celery.worker.annotations }} | ||
| annotations: | ||
| {{- range $key, $value := . }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| {{- end }} | ||
| labels: | ||
| defectdojo.org/component: celery | ||
| defectdojo.org/subcomponent: worker | ||
| app.kubernetes.io/name: {{ include "defectdojo.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| helm.sh/chart: {{ include "defectdojo.chart" . }} | ||
| {{- range $key, $value := .Values.extraLabels }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| name: {{ $fullName }}-celery-worker | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: {{ .Release.Name }} | ||
carlosmt86 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| defectdojo.org/component: celery | ||
| defectdojo.org/subcomponent: worker | ||
| {{ toYaml (omit .Values.celery.worker.podDisruptionBudget "enabled" ) | indent 2 }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| {{- if .Values.django.autoscaling.enabled -}} | ||
| {{- $fullName := include "defectdojo.fullname" . -}} | ||
| apiVersion: autoscaling/v2 | ||
| kind: HorizontalPodAutoscaler | ||
| metadata: | ||
| {{- if or .Values.extraAnnotations .Values.django.autoscaling.annotations }} | ||
carlosmt86 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| annotations: | ||
| {{- range $key, $value := .Values.extraAnnotations }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| {{- range $key, $value := .Values.django.annotations }} | ||
carlosmt86 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| {{- end }} | ||
| name: {{ $fullName }}-django | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| defectdojo.org/component: django | ||
| app.kubernetes.io/name: {{ include "defectdojo.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| helm.sh/chart: {{ include "defectdojo.chart" . }} | ||
| {{- range $key, $value := .Values.extraLabels }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| spec: | ||
| scaleTargetRef: | ||
| apiVersion: apps/v1 | ||
| kind: "Deployment" | ||
| name: {{ $fullName }}-django | ||
| minReplicas: {{ .Values.django.autoscaling.minReplicas }} | ||
| maxReplicas: {{ .Values.django.autoscaling.maxReplicas }} | ||
| metrics: | ||
| {{- with .Values.django.autoscaling.targetCPUUtilizationPercentage }} | ||
| - type: Resource | ||
| resource: | ||
| name: cpu | ||
| target: | ||
| averageUtilization: {{ . }} | ||
| type: Utilization | ||
| {{- end }} | ||
| {{- with .Values.django.autoscaling.targetMemoryUtilizationPercentage }} | ||
| - type: Resource | ||
| resource: | ||
| name: memory | ||
| target: | ||
| averageUtilization: {{ . }} | ||
| type: Utilization | ||
| {{- end }} | ||
| {{- if .Values.django.autoscaling.autoscaleBehavior }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same ( |
||
| behavior: {{ toYaml .Values.django.autoscaling.autoscaleBehavior | nindent 4 }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same ( |
||
| {{- end }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| {{- if .Values.django.podDisruptionBudget.enabled }} | ||
| {{- $fullName := include "defectdojo.fullname" . -}} | ||
| apiVersion: policy/v1 | ||
| kind: PodDisruptionBudget | ||
| metadata: | ||
| {{- if or .Values.extraAnnotations .Values.django.podDisruptionBudget.annotations }} | ||
carlosmt86 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| annotations: | ||
| {{- range $key, $value := .Values.extraAnnotations }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| {{- range $key, $value := .Values.django.annotations }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| {{- end }} | ||
| labels: | ||
| defectdojo.org/component: django | ||
| app.kubernetes.io/name: {{ include "defectdojo.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| helm.sh/chart: {{ include "defectdojo.chart" . }} | ||
| {{- range $key, $value := .Values.extraLabels }} | ||
| {{ $key }}: {{ quote $value }} | ||
| {{- end }} | ||
| name: {{ $fullName }}-django | ||
| namespace: {{ .Release.Namespace }} | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: {{ .Release.Name }} | ||
| defectdojo.org/component: django | ||
| {{ toYaml (omit .Values.django.podDisruptionBudget "enabled" ) | indent 2 }} | ||
| {{- end }} | ||
Uh oh!
There was an error while loading. Please reload this page.