Skip to content
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

fix: chart fixes for labels #6264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ spec:
matchLabels:
{{- if .Values.customMatchLabels }}
{{ toYaml .Values.customMatchLabels | indent 6 }}
{{- else }}
{{- else }}
app: {{ template ".Chart.Name .name" $ }}
release: {{ $.Release.Name }}
{{- end }}
{{- end }}
replicas: {{ $.Values.replicaCount }}
minReadySeconds: {{ $.Values.MinReadySeconds }}
template:
Expand All @@ -71,20 +71,20 @@ spec:
{{- end }}
{{- end }}
labels:
app: {{ template ".Chart.Name .name" $ }}
release: {{ $.Release.Name }}
appId: {{ $.Values.app | quote }}
envId: {{ $.Values.env | quote }}
{{- if .Values.appLabels }}
{{ toYaml .Values.appLabels | indent 8 }}
{{- end }}
release: {{ $.Release.Name }}
{{- if .Values.customPodLabels }}
{{ toYaml .Values.customPodLabels | indent 8 }}
{{- else }}
app: {{ template ".Chart.Name .name" $ }}
release: {{ $.Release.Name }}
{{ toYaml .Values.customPodLabels | indent 8 }}
{{- end }}
{{- if .Values.appLabels }}
{{ toYaml .Values.appLabels | indent 8 }}
{{- end }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- end }}
{{- end }}
spec:
{{- if $.Values.podExtraSpecs }}
{{ toYaml .Values.podExtraSpecs | indent 6 }}
Expand Down Expand Up @@ -492,7 +492,7 @@ spec:
{{- end }}
{{- end }}
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) }} []{{- end }}
{{- if and (eq (len .Values.volumeMounts) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} [] {{- end }}
{{- if and (eq (len .Values.volumeMounts) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} [] {{- end }}
{{- if $.Values.appMetrics }}
- name: envoy
image: {{ $.Values.envoyproxy.image | default "quay.io/devtron/envoy:v1.16.0"}}
Expand Down Expand Up @@ -666,9 +666,10 @@ spec:
matchLabels:
{{- if .Values.customMatchLabels }}
{{ toYaml .Values.customMatchLabels | indent 6 }}
{{- end }}
{{- else }}
app: {{ template ".Chart.Name .name" $ }}
release: {{ $.Release.Name }}
{{- end }}
replicas: {{ $.Values.secondaryWorkload.replicaCount | default 1 }}
minReadySeconds: {{ $.Values.MinReadySeconds }}
template:
Expand Down Expand Up @@ -1102,7 +1103,7 @@ spec:
{{- end }}
{{- end }}
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) }} []{{- end }}
{{- if and (eq (len .Values.volumeMounts) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} [] {{- end }}
{{- if and (eq (len .Values.volumeMounts) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} [] {{- end }}
{{- if $.Values.appMetrics }}
- name: envoy
image: {{ $.Values.envoyproxy.image | default "quay.io/devtron/envoy:v1.16.0"}}
Expand Down Expand Up @@ -1233,7 +1234,7 @@ spec:
{{- end }}
{{- end }}
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (or (eq (.Values.ConfigSecrets.enabled) true) (eq (.Values.ConfigMaps.enabled) true)) (eq ($hasCMVolumeExists) false) (eq ($hasSecretVolumeExists) false) (eq (.Values.appMetrics) false) }} []{{- end }}
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) (eq (.Values.appMetrics) false)}} [] {{- end }}
{{- if and (eq (len .Values.volumes) 0) (eq ($hasPVCExists) false) (eq (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) (eq (.Values.appMetrics) false) }} [] {{- end }}

revisionHistoryLimit: 3
## pauseForSecondsBeforeSwitchActive: {{ $.Values.pauseForSecondsBeforeSwitchActive }}
Expand All @@ -1248,4 +1249,5 @@ spec:
{{- if eq .Values.deploymentType "RECREATE" }}
type: "Recreate"
{{- end }}
{{- end }}
{{- end }}

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ metadata:
{{- if .Values.autoscaling.labels }}
{{ toYaml .Values.autoscaling.labels | indent 4 }}
{{- end }}
{{- if $.Values.appLabels }}
{{ toYaml $.Values.appLabels | indent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: apps/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ metadata:
release: {{ $.Release.Name }}
appId: {{ $.Values.app | quote }}
envId: {{ $.Values.env | quote }}

{{- if .Values.appLabels }}
{{ toYaml .Values.appLabels | indent 4 }}
{{- end }}
spec:
{{ toYaml $.Values.kedaAutoscaling.triggerAuthentication.spec | indent 2 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ affinity:
topologyKey: topology.kubernetes.io/zone

secondaryWorkload:
enabled: true
enabled: false
postfix: "od"
replicaCount: 1
affinity: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ spec:
matchLabels:
{{- if .Values.customMatchLabels }}
{{ toYaml .Values.customMatchLabels | indent 6 }}
{{- else }}
{{- else }}
app: {{ template ".Chart.Name .name" $ }}
release: {{ $.Release.Name }}
{{- end }}
{{- end }}
replicas: {{ $.Values.replicaCount }}
minReadySeconds: {{ $.Values.MinReadySeconds }}
template:
Expand All @@ -70,20 +70,19 @@ spec:
{{- end }}
{{- end }}
labels:
app: {{ template ".Chart.Name .name" $ }}
appId: {{ $.Values.app | quote }}
envId: {{ $.Values.env | quote }}
{{- if .Values.appLabels }}
{{ toYaml .Values.appLabels | indent 8 }}
{{- end }}
release: {{ $.Release.Name }}
{{- if .Values.customPodLabels }}
{{ toYaml .Values.customPodLabels | indent 8 }}
{{- else }}
app: {{ template ".Chart.Name .name" $ }}
release: {{ $.Release.Name }}
{{ toYaml .Values.customPodLabels | indent 8 }}
{{- end }}
{{- if .Values.appLabels }}
{{ toYaml .Values.appLabels | indent 8 }}
{{- end }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- end }}
{{- end }}
spec:
{{- if $.Values.podExtraSpecs }}
{{ toYaml .Values.podExtraSpecs | indent 6 }}
Expand Down Expand Up @@ -622,4 +621,4 @@ spec:
maxUnavailable: {{ $.Values.deployment.strategy.canary.maxUnavailable }}
steps:
{{ toYaml .Values.deployment.strategy.canary.steps | indent 8 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ metadata:
{{- if .Values.autoscaling.labels }}
{{ toYaml .Values.autoscaling.labels | indent 4 }}
{{- end }}
{{- if $.Values.appLabels }}
{{ toYaml $.Values.appLabels | indent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: argoproj.io/v1alpha1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ metadata:
release: {{ $.Release.Name }}
appId: {{ $.Values.app | quote }}
envId: {{ $.Values.env | quote }}

{{- if .Values.appLabels }}
{{ toYaml .Values.appLabels | indent 4 }}
{{- end }}
spec:
{{ toYaml $.Values.kedaAutoscaling.triggerAuthentication.spec | indent 2 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ tolerations: []
# value: "value"
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"

appMetrics: false
appMetrics: true
serviceAccount:
## @param serviceAccount.create Enable creation of ServiceAccount for pods
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ ContainerPort:
useHTTP2: false
supportStreaming: false
idleTimeout: 1800s
protocol: TCP
resizePolicy: []
# servicemonitor:
# enabled: true
# path: /abc
Expand Down Expand Up @@ -223,6 +225,10 @@ Spec:
# Key: kops.k8s.io/instancegroup
Values:

affinity:
enabled: false
values: {}

ambassadorMapping:
enabled: false
labels: {}
Expand All @@ -247,6 +253,10 @@ autoscaling:
annotations: {}
labels: {}
behavior: {}
containerResource:
enabled: false
TargetCPUUtilizationPercentage: 90
TargetMemoryUtilizationPercentage: 80
# scaleDown:
# stabilizationWindowSeconds: 300
# policies:
Expand Down Expand Up @@ -299,7 +309,7 @@ servicemonitor:
additionalLabels: {}

envoyproxy:
image: docker.io/envoyproxy/envoy:v1.16.0
image: quay.io/devtron/envoy:v1.16.0
configMapName: ""
lifecycle: {}
resources:
Expand Down Expand Up @@ -425,3 +435,8 @@ hostAliases: []
# hostnames:
# - "foo.remote"
# - "bar.remote"
peristentVolumeClaim: {}


verticalPodScaling:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,11 @@ Create chart name and version as used by the chart label.
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{- define "VerticalPodAutoScalingEnabled" -}}
{{- $SMenabled := false -}}
{{- if and .Values.verticalPodScaling.enabled }}
{{- $SMenabled = true -}}
{{- end }}
{{- $SMenabled -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .name}}-{{ $.Values.app }}
{{- if $.Values.appLabels }}
labels:
appId: {{ $.Values.app | quote }}
envId: {{ $.Values.env | quote }}
app: {{ template ".Chart.Name .name" $ }}
chart: {{ template ".Chart.Name .chart" $ }}
release: {{ $.Release.Name }}
{{- if $.Values.appLabels }}
{{ toYaml $.Values.appLabels | indent 4 }}
{{- end }}
data:
Expand Down
Loading
Loading