From 78ce433a488af19aeb8c7980e936b4b7244596ca Mon Sep 17 00:00:00 2001 From: Ankit Agrawal Date: Sun, 18 Apr 2021 16:26:58 +0530 Subject: [PATCH 1/2] New chart version 3-11-0 --- .../reference-chart_3-11-0/.helmignore | 22 ++ .../.image_descriptor_template.json | 1 + .../reference-chart_3-11-0/Chart.yaml | 5 + .../reference-chart_3-11-0/app-values.yaml | 202 ++++++++++ .../reference-chart_3-11-0/env-values.yaml | 41 ++ .../pipeline-values.yaml | 24 ++ .../release-values.yaml | 14 + .../secrets-test-values.yaml | 1 + .../templates/NOTES.txt | 19 + .../templates/_helpers.tpl | 133 +++++++ .../templates/configmap.yaml | 14 + .../templates/deployment.yaml | 343 +++++++++++++++++ .../templates/generic.yaml | 4 + .../reference-chart_3-11-0/templates/hpa.yaml | 34 ++ .../templates/ingress.yaml | 72 ++++ .../templates/metrics-service-monitor.yaml | 30 ++ .../templates/poddisruptionbudget.yaml | 21 ++ .../templates/pre-sync-job.yaml | 23 ++ .../templates/prometheusrules.yaml | 22 ++ .../templates/secret.yaml | 57 +++ .../templates/service.yaml | 65 ++++ .../templates/servicemonitor.yaml | 48 +++ .../templates/sidecar-configmap.yaml | 163 ++++++++ .../reference-chart_3-11-0/test_values.yaml | 349 +++++++++++++++++ .../reference-chart_3-11-0/values.yaml | 351 ++++++++++++++++++ 25 files changed, 2058 insertions(+) create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/.helmignore create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/.image_descriptor_template.json create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/Chart.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/app-values.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/env-values.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/pipeline-values.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/release-values.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/secrets-test-values.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/NOTES.txt create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/_helpers.tpl create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/configmap.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/deployment.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/generic.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/hpa.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/ingress.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/metrics-service-monitor.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/poddisruptionbudget.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/pre-sync-job.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/prometheusrules.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/secret.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/service.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/servicemonitor.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/sidecar-configmap.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/test_values.yaml create mode 100644 scripts/devtron-reference-helm-charts/reference-chart_3-11-0/values.yaml diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/.helmignore b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/.image_descriptor_template.json b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/.image_descriptor_template.json new file mode 100644 index 0000000000..8a99a95664 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/.image_descriptor_template.json @@ -0,0 +1 @@ +{"server":{"deployment":{"image_tag":"{{.Tag}}","image":"{{.Name}}"}},"pipelineName": "{{.PipelineName}}","releaseVersion":"{{.ReleaseVersion}}","deploymentType": "{{.DeploymentType}}", "app": "{{.App}}", "env": "{{.Env}}", "appMetrics": {{.AppMetrics}}} \ No newline at end of file diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/Chart.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/Chart.yaml new file mode 100644 index 0000000000..1f24464aa0 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: reference-chart_3-11-0 +version: 3.11.0 diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/app-values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/app-values.yaml new file mode 100644 index 0000000000..c5959433f2 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/app-values.yaml @@ -0,0 +1,202 @@ +# Mandatory configs +replicaCount: 1 +MinReadySeconds: 60 +GracePeriod: 30 +image: + pullPolicy: IfNotPresent +service: + type: ClusterIP + #name: "service-1234567890" + annotations: {} + # test1: test2 + # test3: test4 +ContainerPort: + - name: app + port: 8080 + servicePort: 80 + envoyPort: 8799 + useHTTP2: true + supportStreaming: true + idleTimeout: 1800s +# servicemonitor: +# enabled: true +# path: /abc +# scheme: 'http' +# interval: 30s +# scrapeTimeout: 20s +# metricRelabelings: +# - sourceLabels: [namespace] +# regex: '(.*)' +# replacement: myapp +# targetLabel: target_namespace +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 1 + memory: 200Mi + requests: + cpu: 0.10 + memory: 100Mi + + +# Optional configs +LivenessProbe: + Path: "" + port: 8080 + scheme: "" + httpHeader: + name: "" + value: "" + tcp: false + command: [] + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + failureThreshold: 3 + +ReadinessProbe: + Path: "" + port: 8080 + scheme: "" + httpHeader: + name: "" + value: "" + tcp: false + command: [] + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + failureThreshold: 3 + +ingress: + enabled: false + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$2 + nginx.ingress.kubernetes.io/force-ssl-redirect: 'false' + nginx.ingress.kubernetes.io/ssl-redirect: 'false' + kubernetes.io/ingress.class: nginx +# kubernetes.io/ingress.class: nginx +# kubernetes.io/tls-acme: "true" +# nginx.ingress.kubernetes.io/canary: "true" +# nginx.ingress.kubernetes.io/canary-weight: "10" + + path: "" + host: "" + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +command: + enabled: false + value: [] + +args: + enabled: false + value: + - /bin/sh + - -c + - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600 + +#For adding custom labels to pods +#podLabels: +# customKey: customValue + +rawYaml: [] + +initContainers: [] + ## Additional init containers to run before the Scheduler pods. + ## for example, be used to run a sidecar that chown Logs storage . + #- name: volume-mount-hack + # image: busybox + # command: ["sh", "-c", "chown -R 1000:1000 logs"] + # volumeMounts: + # - mountPath: /usr/local/airflow/logs + # name: logs-data + +containers: [] + ## Additional containers to run along with application pods. + ## for example, be used to run a sidecar that chown Logs storage . + #- name: volume-mount-hack + # image: busybox + # command: ["sh", "-c", "chown -R 1000:1000 logs"] + # volumeMounts: + # - mountPath: /usr/local/airflow/logs + # name: logs-data + +ingressInternal: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # nginx.ingress.kubernetes.io/canary: "true" + # nginx.ingress.kubernetes.io/canary-weight: "10" + + path: "" + host: "" + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +volumeMounts: [] +# - name: log-volume +# mountPath: /var/log + +volumes: [] +# - name: log-volume +# emptyDir: {} + +dbMigrationConfig: + enabled: false + +tolerations: [] + +Spec: + Affinity: + Key: + # Key: kops.k8s.io/instancegroup + Values: + +autoscaling: + enabled: false + MinReplicas: 1 + MaxReplicas: 2 + TargetCPUUtilizationPercentage: 70 + TargetMemoryUtilizationPercentage: 80 + extraMetrics: [] +# - external: +# metricName: pubsub.googleapis.com|subscription|num_undelivered_messages +# metricSelector: +# matchLabels: +# resource.labels.subscription_id: echo-read +# targetAverageValue: "2" +# type: External +# + +prometheus: + release: monitoring + +server: + deployment: + image_tag: 1-95af053 + image: "" + +servicemonitor: + additionalLabels: {} + +envoyproxy: + image: envoyproxy/envoy:v1.14.1 + configMapName: "" + resources: + limits: + cpu: 50m + memory: 50Mi + requests: + cpu: 50m + memory: 50Mi diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/env-values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/env-values.yaml new file mode 100644 index 0000000000..92992aa494 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/env-values.yaml @@ -0,0 +1,41 @@ +replicaCount: 1 +MaxSurge: 1 +MaxUnavailable: 0 +GracePeriod: 30 +pauseForSecondsBeforeSwitchActive: 30 +waitForSecondsBeforeScalingDown: 30 + +Spec: + Affinity: + key: "" + Values: nodes + +autoscaling: + enabled: false + MinReplicas: 1 + MaxReplicas: 2 + TargetCPUUtilizationPercentage: 90 + TargetMemoryUtilizationPercentage: 80 + +secret: + enabled: false + data: {} +# my_own_secret: S3ViZXJuZXRlcyBXb3Jrcw== + +EnvVariables: [] +# - name: FLASK_ENV +# value: qa + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: "0.05" + memory: 50Mi + requests: + cpu: "0.01" + memory: 10Mi + + diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/pipeline-values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/pipeline-values.yaml new file mode 100644 index 0000000000..40a5ec633d --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/pipeline-values.yaml @@ -0,0 +1,24 @@ +deployment: + strategy: + blueGreen: + autoPromotionSeconds: 30 + scaleDownDelaySeconds: 30 + previewReplicaCount: 1 + autoPromotionEnabled: false + rolling: + maxSurge: "25%" + maxUnavailable: 1 + canary: + maxSurge: "25%" + maxUnavailable: 1 + steps: + - setWeight: 25 + - pause: + duration: 15 # 1 min + - setWeight: 50 + - pause: + duration: 15 # 1 min + - setWeight: 75 + - pause: + duration: 15 # 1 min + recreate: {} \ No newline at end of file diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/release-values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/release-values.yaml new file mode 100644 index 0000000000..48eb3f482c --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/release-values.yaml @@ -0,0 +1,14 @@ +server: + deployment: + image_tag: IMAGE_TAG + image: IMAGE_REPO + enabled: false +dbMigrationConfig: + enabled: false + +pauseForSecondsBeforeSwitchActive: 0 +waitForSecondsBeforeScalingDown: 0 +autoPromotionSeconds: 30 + +#used for deployment algo selection +orchestrator.deploymant.algo: 1 diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/secrets-test-values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/secrets-test-values.yaml new file mode 100644 index 0000000000..4a20404db8 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/secrets-test-values.yaml @@ -0,0 +1 @@ +{"ConfigSecrets":{"enabled":true,"secrets":[{"data":{"standard_key":"c3RhbmRhcmQtdmFsdWU="},"external":false,"externalType":"","mountPath":"/test","name":"normal-secret","type":"volume"},{"data":{"secret_key":"U0VDUkVUIERBVEE="},"external":true,"externalType":"AWSSecretsManager","mountPath":"","name":"external-secret-3","type":"environment"}]}} \ No newline at end of file diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/NOTES.txt b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/NOTES.txt new file mode 100644 index 0000000000..2b14478168 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/NOTES.txt @@ -0,0 +1,19 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range $.Values.ingress.paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }}{{ . }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include ".Chart.Name .fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include ".Chart.Name .fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include ".Chart.Name .fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include ".Chart.Name .name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +{{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/_helpers.tpl b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/_helpers.tpl new file mode 100644 index 0000000000..884c4adfed --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/_helpers.tpl @@ -0,0 +1,133 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define ".Chart.Name .name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create service name +*/}} +{{- define ".servicename" -}} +{{- if .Values.service.name -}} +{{- .Values.service.name | trunc 63 | trimSuffix "-" -}} +{{- else if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 55 | trimSuffix "-" -}}-service +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 55 | trimSuffix "-" -}}-service +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 55 | trimSuffix "-" -}}-service +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create preview service name +*/}} +{{- define ".previewservicename" -}} +{{- if .Values.service.name -}} +{{- .Values.service.name | trunc 55 | trimSuffix "-" -}}-preview +{{- else if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 47 | trimSuffix "-" -}}-preview-service +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 47 | trimSuffix "-" -}}-preview-service +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 47 | trimSuffix "-" -}}-preview-service +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define ".Chart.Name .fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define ".Chart.Name .chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define ".Chart.Name .color" -}} +{{- $active0 := (index .Values.server.deployment 0).enabled -}} +{{/* +{{- $active1 := (index .Values.server.deployment 1).enabled -}} +*/}} +{{- $active1 := include "safeenabledcheck" . -}} +{{- $active := and $active0 $active1 -}} +{{- $active -}} +{{- end -}} + +{{- define "safeenabledcheck" -}} +{{- if (eq (len .Values.server.deployment) 2) -}} + {{- if (index .Values.server.deployment 1).enabled -}} + {{- $active := true -}} + {{- $active -}} + {{- else -}} + {{- $active := false -}} + {{- $active -}} + {{- end -}} +{{- else -}} + {{- $active := false -}} + {{- $active -}} +{{- end -}} +{{- end -}} + + +{{- define "isCMVolumeExists" -}} + {{- $isCMVolumeExists := false -}} + {{- if .Values.ConfigMaps.enabled }} + {{- range .Values.ConfigMaps.maps }} + {{- if eq .type "volume"}} + {{- $isCMVolumeExists = true}} + {{- end }} + {{- end }} + {{- end }} + {{- $isCMVolumeExists -}} +{{- end -}} + +{{- define "isSecretVolumeExists" -}} + {{- $isSecretVolumeExists := false -}} + {{- if .Values.ConfigSecrets.enabled }} + {{- range .Values.ConfigSecrets.secrets }} + {{- if eq .type "volume"}} + {{- $isSecretVolumeExists = true}} + {{- end }} + {{- end }} + {{- end }} + {{- $isSecretVolumeExists -}} +{{- end -}} + + + + +{{- define "serviceMonitorEnabled" -}} + {{- $SMenabled := false -}} + {{- range .Values.ContainerPort }} + {{- if .servicemonitor }} + {{- if and .servicemonitor.enabled }} + {{- $SMenabled = true -}} + {{- end }} + {{- end }} + {{- end }} + {{- $SMenabled -}} +{{- end -}} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/configmap.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/configmap.yaml new file mode 100644 index 0000000000..ac7f15fafb --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/configmap.yaml @@ -0,0 +1,14 @@ +{{- if .Values.ConfigMaps.enabled }} + {{- range .Values.ConfigMaps.maps }} + {{if eq .external false}} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + creationTimestamp: 2019-08-12T18:38:34Z + name: {{ .name}}-{{ $.Values.app }} +data: +{{ toYaml .data | trim | indent 2 }} + {{- end}} + {{- end}} +{{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/deployment.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/deployment.yaml new file mode 100644 index 0000000000..0f2cf25dfb --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/deployment.yaml @@ -0,0 +1,343 @@ + {{- $hasCMEnvExists := false -}} + {{- $hasCMVolumeExists := false -}} + {{- if .Values.ConfigMaps.enabled }} + {{- range .Values.ConfigMaps.maps }} + {{- if eq .type "volume"}} + {{- $hasCMVolumeExists = true}} + {{- end }} + {{- if eq .type "environment"}} + {{- $hasCMEnvExists = true}} + {{- end }} + {{- end }} + {{- end }} + + {{- $hasSecretEnvExists := false -}} + {{- $hasSecretVolumeExists := false -}} + {{- if .Values.ConfigSecrets.enabled }} + {{- range .Values.ConfigSecrets.secrets }} + {{- if eq .type "volume"}} + {{- $hasSecretVolumeExists = true}} + {{- end }} + {{- if eq .type "environment"}} + {{- $hasSecretEnvExists = true}} + {{- end }} + {{- end }} + {{- end }} + + +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: {{ include ".Chart.Name .fullname" $ }} + labels: + app: {{ template ".Chart.Name .name" $ }} + chart: {{ template ".Chart.Name .chart" $ }} + release: {{ $.Release.Name }} + releaseVersion: {{ $.Values.releaseVersion | quote }} + pipelineName: {{ .Values.pipelineName }} +spec: + selector: + matchLabels: + app: {{ template ".Chart.Name .name" $ }} + release: {{ $.Release.Name }} + replicas: {{ $.Values.replicaCount }} + minReadySeconds: {{ $.Values.MinReadySeconds }} + template: + metadata: + labels: + app: {{ template ".Chart.Name .name" $ }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + release: {{ $.Release.Name }} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels | indent 8 }} +{{- end }} + spec: + terminationGracePeriodSeconds: {{ $.Values.GracePeriod }} + restartPolicy: Always +{{- if and $.Values.Spec.Affinity.Key $.Values.Spec.Affinity.Values }} + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: {{ $.Values.Spec.Affinity.Key }} + operator: In + values: + - {{ $.Values.Spec.Affinity.Values | default "nodes" }} +{{- end }} + +{{- if $.Values.serviceAccountName }} + serviceAccountName: {{ $.Values.serviceAccountName }} +{{- end }} + {{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} + {{- end }} + + +{{- if $.Values.initContainers}} + initContainers: +{{ toYaml $.Values.initContainers | indent 8 -}} +{{- end}} + containers: +{{- if $.Values.appMetrics }} + - name: envoy + image: {{ $.Values.envoyproxy.image | default "envoyproxy/envoy:v1.14.1"}} + resources: +{{ toYaml $.Values.envoyproxy.resources | trim | indent 12 }} + ports: + - containerPort: 9901 + protocol: TCP + name: envoy-admin + {{- range $index, $element := .Values.ContainerPort }} + - name: {{ $element.name}} + containerPort: {{ $element.envoyPort | default (add 8790 $index) }} + protocol: TCP + {{- end }} + command: ["/usr/local/bin/envoy"] + args: ["-c", "/etc/envoy-config/envoy-config.json", "-l", "info", "--log-format", "[METADATA][%Y-%m-%d %T.%e][%t][%l][%n] %v"] + volumeMounts: + - name: {{ $.Values.envoyproxy.configMapName | default "envoy-config-volume" }} + mountPath: /etc/envoy-config/ +{{- end}} +{{- if $.Values.containers }} +{{ toYaml $.Values.containers | indent 8 -}} +{{- end}} + - name: {{ $.Chart.Name }} + image: "{{ .Values.server.deployment.image }}:{{ .Values.server.deployment.image_tag }}" + imagePullPolicy: {{ $.Values.image.pullPolicy }} +{{- if $.Values.privileged }} + securityContext: + privileged: true +{{- end}} + ports: + {{- range $.Values.ContainerPort }} + - name: {{ .name}} + containerPort: {{ .port }} + protocol: TCP + {{- end}} +{{- if and $.Values.command.value $.Values.command.enabled}} + command: +{{ toYaml $.Values.command.value | indent 12 -}} +{{- end}} +{{- if and $.Values.args.value $.Values.args.enabled}} + args: +{{ toYaml $.Values.args.value | indent 12 -}} +{{- end }} + env: + - name: CONFIG_HASH + value: {{ include (print $.Chart.Name "/templates/configmap.yaml") . | sha256sum }} + - name: SECRET_HASH + value: {{ include (print $.Chart.Name "/templates/secret.yaml") . | sha256sum }} + - name: DEVTRON_APP_NAME + value: {{ template ".Chart.Name .name" $ }} + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + {{- range $.Values.EnvVariables }} + - name: {{ .name}} + value: {{ .value | quote }} + {{- end}} + {{- if or (and ($hasCMEnvExists) (.Values.ConfigMaps.enabled)) (and ($hasSecretEnvExists) (.Values.ConfigSecrets.enabled)) }} + envFrom: + {{- if .Values.ConfigMaps.enabled }} + {{- range .Values.ConfigMaps.maps }} + {{- if eq .type "environment" }} + - configMapRef: + {{- if eq .external true }} + name: {{ .name }} + {{- else if eq .external false }} + name: {{ .name}}-{{ $.Values.app }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.ConfigSecrets.enabled }} + {{- range .Values.ConfigSecrets.secrets }} + {{- if eq .type "environment" }} + - secretRef: + {{if eq .external true}} + name: {{ .name }} + {{else if eq .external false}} + name: {{ .name}}-{{ $.Values.app }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + +{{- if or $.Values.LivenessProbe.Path $.Values.LivenessProbe.command $.Values.LivenessProbe.tcp }} + livenessProbe: +{{- if $.Values.LivenessProbe.Path }} + httpGet: + path: {{ $.Values.LivenessProbe.Path }} + port: {{ $.Values.LivenessProbe.port }} +{{- end }} +{{- if $.Values.LivenessProbe.command }} + exec: + command: +{{ toYaml .Values.LivenessProbe.command | indent 16 }} +{{- end}} +{{- if and $.Values.LivenessProbe.tcp }} + tcpSocket: + port: {{ $.Values.LivenessProbe.port }} +{{- end}} + initialDelaySeconds: {{ $.Values.LivenessProbe.initialDelaySeconds }} + periodSeconds: {{ $.Values.LivenessProbe.periodSeconds }} + successThreshold: {{ $.Values.LivenessProbe.successThreshold }} + timeoutSeconds: {{ $.Values.LivenessProbe.timeoutSeconds }} + failureThreshold: {{ $.Values.LivenessProbe.failureThreshold }} +{{- end }} +{{- if or $.Values.ReadinessProbe.Path $.Values.ReadinessProbe.command $.Values.ReadinessProbe.tcp }} + readinessProbe: +{{- if $.Values.ReadinessProbe.Path }} + httpGet: + path: {{ $.Values.ReadinessProbe.Path }} + port: {{ $.Values.ReadinessProbe.port }} +{{- end }} +{{- if $.Values.ReadinessProbe.command }} + exec: + command: +{{ toYaml .Values.ReadinessProbe.command | indent 16 }} +{{- end}} +{{- if and $.Values.ReadinessProbe.tcp }} + tcpSocket: + port: {{ $.Values.ReadinessProbe.port }} +{{- end}} + initialDelaySeconds: {{ $.Values.ReadinessProbe.initialDelaySeconds }} + periodSeconds: {{ $.Values.ReadinessProbe.periodSeconds }} + successThreshold: {{ $.Values.ReadinessProbe.successThreshold }} + timeoutSeconds: {{ $.Values.ReadinessProbe.timeoutSeconds }} + failureThreshold: {{ $.Values.ReadinessProbe.failureThreshold }} +{{- end }} + resources: +{{ toYaml $.Values.resources | trim | indent 12 }} + + volumeMounts: +{{- with .Values.volumeMounts }} +{{ toYaml . | trim | indent 12 }} +{{- end }} + {{- if .Values.ConfigMaps.enabled }} + {{- range .Values.ConfigMaps.maps }} + {{- if eq .type "volume"}} + {{- $cmName := .name -}} + {{- $cmMountPath := .mountPath -}} + {{- if eq .subPath false }} + - name: {{ $cmName }}-vol + mountPath: {{ $cmMountPath }} + {{- else }} + {{- range $k, $v := .data }} + - name: {{ $cmName }}-vol + mountPath: {{ $cmMountPath }}/{{ $k}} + subPath: {{ $k}} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.ConfigSecrets.enabled }} + {{- range .Values.ConfigSecrets.secrets }} + {{- if eq .type "volume"}} + {{- $cmName := .name -}} + {{- $cmMountPath := .mountPath -}} + {{- if eq .subPath false }} + - name: {{ $cmName }}-vol + mountPath: {{ $cmMountPath }} + {{- else if and (eq (.subPath) true) (eq (.externalType) "KubernetesSecret") }} + {{- else if and (eq (.subPath) true) (eq (.external) true) }} + {{- range .secretData }} + - name: {{ $cmName }}-vol + mountPath: {{ $cmMountPath}}/{{ .name }} + subPath: {{ .name }} + {{- end }} + {{- else }} + {{- range $k, $v := .data }} + - name: {{ $cmName}}-vol + mountPath: {{ $cmMountPath}}/{{ $k}} + subPath: {{ $k}} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- if and (eq (len .Values.volumes) 0) (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 (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) }} []{{- end }} + + volumes: + {{- if $.Values.appMetrics }} + - name: envoy-config-volume + configMap: + name: sidecar-config-{{ template ".Chart.Name .name" $ }} + {{- end }} +{{- with .Values.volumes }} +{{ toYaml . | trim | indent 8 }} +{{- end }} + {{- if .Values.ConfigMaps.enabled }} + {{- range .Values.ConfigMaps.maps }} + {{- if eq .type "volume"}} + - name: {{ .name}}-vol + configMap: + {{- if eq .external true }} + name: {{ .name }} + {{- else if eq .external false }} + name: {{ .name}}-{{ $.Values.app }} + {{- end }} + {{- if eq (len .filePermission) 0 }} + {{- else }} + defaultMode: {{ .filePermission}} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + + {{- if .Values.ConfigSecrets.enabled }} + {{- range .Values.ConfigSecrets.secrets }} + {{- if eq .type "volume"}} + - name: {{ .name}}-vol + secret: + {{- if eq .external true }} + secretName: {{ .name }} + {{- else if eq .external false }} + secretName: {{ .name}}-{{ $.Values.app }} + {{- end }} + {{- if eq (len .filePermission) 0 }} + {{- else }} + defaultMode: {{ .filePermission}} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- if and (eq (len .Values.volumes) 0) (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 (.Values.ConfigSecrets.enabled) false) (eq (.Values.ConfigMaps.enabled) false) (eq (.Values.appMetrics) false) }} []{{- end }} + + revisionHistoryLimit: 3 +## pauseForSecondsBeforeSwitchActive: {{ $.Values.pauseForSecondsBeforeSwitchActive }} +# waitForSecondsBeforeScalingDown: {{ $.Values.waitForSecondsBeforeScalingDown }} + strategy: + {{- if eq .Values.deploymentType "BLUE-GREEN" }} + blueGreen: # A new field that used to provide configurable options for a BlueGreenUpdate strategy + previewService: {{ template ".previewservicename" . }} # Reference to a service that can serve traffic to a new image before it receives the active traffic + activeService: {{ template ".servicename" . }} # Reference to a service that serves end-user traffic to the replica set + autoPromotionSeconds: {{ $.Values.deployment.strategy.blueGreen.autoPromotionSeconds }} + scaleDownDelaySeconds: {{ $.Values.deployment.strategy.blueGreen.scaleDownDelaySeconds }} + previewReplicaCount: {{ $.Values.deployment.strategy.blueGreen.previewReplicaCount }} + autoPromotionEnabled: {{ $.Values.deployment.strategy.blueGreen.autoPromotionEnabled }} + {{- else if eq .Values.deploymentType "ROLLING" }} + canary: + stableService: {{ template ".servicename" . }} # Reference to a service that serves end-user traffic to the replica set + maxSurge: {{ $.Values.deployment.strategy.rolling.maxSurge }} + maxUnavailable: {{ $.Values.deployment.strategy.rolling.maxUnavailable }} + {{- else if eq .Values.deploymentType "RECREATE" }} + recreate: + activeService: {{ template ".servicename" . }} # Reference to a service that serves end-user traffic to the replica set + {{- else if eq .Values.deploymentType "CANARY" }} + canary: + stableService: {{ template ".servicename" . }} # Reference to a service that serves end-user traffic to the replica set + maxSurge: {{ $.Values.deployment.strategy.canary.maxSurge }} + maxUnavailable: {{ $.Values.deployment.strategy.canary.maxUnavailable }} + steps: +{{ toYaml .Values.deployment.strategy.canary.steps | indent 8 }} + {{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/generic.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/generic.yaml new file mode 100644 index 0000000000..7b13e628bd --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/generic.yaml @@ -0,0 +1,4 @@ +{{- range .Values.rawYaml -}} +--- +{{ toYaml . }} + {{- end -}} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/hpa.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/hpa.yaml new file mode 100644 index 0000000000..2a2937338a --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/hpa.yaml @@ -0,0 +1,34 @@ +{{- if $.Values.autoscaling.enabled }} +--- +apiVersion: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ template ".Chart.Name .fullname" $ }}-hpa +spec: + scaleTargetRef: + apiVersion: argoproj.io/v1alpha1 + kind: Rollout + name: {{ include ".Chart.Name .fullname" $ }} + minReplicas: {{ $.Values.autoscaling.MinReplicas }} + maxReplicas: {{ $.Values.autoscaling.MaxReplicas }} + {{- if $.Values.autoscaling.TargetMemoryUtilizationPercentage }} + metrics: + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ $.Values.autoscaling.TargetMemoryUtilizationPercentage }} + {{- end }} + {{- if $.Values.autoscaling.TargetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ $.Values.autoscaling.TargetCPUUtilizationPercentage }} + {{- end }} + {{- if $.Values.autoscaling.extraMetrics }} + {{toYaml $.Values.autoscaling.extraMetrics | indent 4 }} + {{- end}} + {{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/ingress.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/ingress.yaml new file mode 100644 index 0000000000..76e280689a --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/ingress.yaml @@ -0,0 +1,72 @@ +{{ $svcName := include ".servicename" . }} +{{ $svcPort := (index .Values.ContainerPort 0).servicePort }} +{{- if $.Values.ingress.enabled -}} +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template ".Chart.Name .fullname" . }}-ingress + namespace: {{ $.Values.NameSpace }} + labels: + app: {{ template ".Chart.Name .name" . }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + chart: {{ template ".Chart.Name .chart" . }} + release: {{ .Release.Name }} +{{- if .Values.ingress.annotations }} + annotations: +{{ toYaml .Values.ingress.annotations | indent 4 }} +{{- end }} +spec: + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + backend: + serviceName: {{ $svcName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: +{{ toYaml .Values.ingress.tls | indent 4 }} + {{- end -}} +{{- end }} +{{- if $.Values.ingressInternal.enabled }} +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template ".Chart.Name .fullname" . }}-ingress-internal + namespace: {{ $.Values.NameSpace }} + labels: + app: {{ template ".Chart.Name .name" . }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + chart: {{ template ".Chart.Name .chart" . }} + release: {{ .Release.Name }} +{{- if .Values.ingressInternal.annotations }} + annotations: +{{ toYaml .Values.ingressInternal.annotations | indent 4 }} +{{- end }} +spec: + rules: + {{- range .Values.ingressInternal.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + backend: + serviceName: {{ $svcName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- if .Values.ingressInternal.tls }} + tls: +{{ toYaml .Values.ingressInternal.tls | indent 4 }} + {{- end -}} +{{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/metrics-service-monitor.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/metrics-service-monitor.yaml new file mode 100644 index 0000000000..563de843b0 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/metrics-service-monitor.yaml @@ -0,0 +1,30 @@ +{{- if $.Values.appMetrics -}} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template ".Chart.Name .fullname" $ }} + labels: + app: {{ template ".Chart.Name .name" . }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + chart: {{ template ".Chart.Name .chart" . }} + release: monitoring +spec: + jobLabel: {{ template ".Chart.Name .name" $ }} + endpoints: + - port: envoy-admin + interval: 30s + path: /stats/prometheus + selector: + matchLabels: + app: {{ template ".Chart.Name .name" $ }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + namespaceSelector: + matchNames: + - {{.Release.Namespace}} + podTargetLabels: + - appId + - envId + - rollouts-pod-template-hash +{{- end }} \ No newline at end of file diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/poddisruptionbudget.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/poddisruptionbudget.yaml new file mode 100644 index 0000000000..4808b3970c --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/poddisruptionbudget.yaml @@ -0,0 +1,21 @@ +{{- if .Values.podDisruptionBudget }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ include ".Chart.Name .fullname" $ }} + labels: + app: {{ template ".Chart.Name .name" $ }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} +spec: + {{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + {{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/pre-sync-job.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/pre-sync-job.yaml new file mode 100644 index 0000000000..cd733d4857 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/pre-sync-job.yaml @@ -0,0 +1,23 @@ +{{- if $.Values.dbMigrationConfig.enabled }} +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ template ".Chart.Name .fullname" $ }}-migrator + annotations: + argocd.argoproj.io/hook: PreSync +# argocd.argoproj.io/hook-delete-policy: HookSucceeded +spec: + template: + spec: + containers: + - name: migrator + image: 686244538589.dkr.ecr.us-east-2.amazonaws.com/migrator:0.0.1-rc14 + env: + {{- range $.Values.dbMigrationConfig.envValues }} + - name: {{ .key}} + value: {{ .value | quote }} + {{- end}} + restartPolicy: Never + backoffLimit: 0 +{{- end }} \ No newline at end of file diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/prometheusrules.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/prometheusrules.yaml new file mode 100644 index 0000000000..90f398bff4 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/prometheusrules.yaml @@ -0,0 +1,22 @@ +{{- if .Values.prometheusRule.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ template ".Chart.Name .fullname" . }} + {{- if .Values.prometheusRule.namespace }} + namespace: {{ .Values.prometheusRule.namespace }} + {{- end }} + labels: + kind: Prometheus + chart: {{ template ".Chart.Name .chart" . }} + release: {{ .Values.prometheus.release }} + {{- if .Values.prometheusRule.additionalLabels }} +{{ toYaml .Values.prometheusRule.additionalLabels | indent 4 }} + {{- end }} +spec: + {{- with .Values.prometheusRule.rules }} + groups: + - name: {{ template ".Chart.Name .fullname" $ }} + rules: {{- toYaml . | nindent 6 }} + {{- end }} + {{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/secret.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/secret.yaml new file mode 100644 index 0000000000..3956beaf65 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/secret.yaml @@ -0,0 +1,57 @@ +{{- if $.Values.secret.enabled }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: app-secret +type: Opaque +data: +{{ toYaml $.Values.secret.data | indent 2 }} +{{- end }} + + +{{- if .Values.ConfigSecrets.enabled }} + {{- range .Values.ConfigSecrets.secrets }} + {{if eq .external false}} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ .name}}-{{ $.Values.app }} +type: Opaque +data: +{{ toYaml .data | trim | indent 2 }} +{{- end}} + {{if eq .external true }} + {{if (or (eq .externalType "AWSSecretsManager") (eq .externalType "AWSSystemManager") (eq .externalType "HashiCorpVault"))}} +--- +apiVersion: kubernetes-client.io/v1 +kind: ExternalSecret +metadata: + name: {{ .name}} +spec: + {{- if .roleARN }} + roleArn: .roleArn + {{- end}} + {{- if eq .externalType "AWSSecretsManager"}} + backendType: secretsManager + {{- end}} + {{- if eq .externalType "AWSSystemManager"}} + backendType: systemManager + {{- end}} + {{- if eq .externalType "HashiCorpVault"}} + backendType: vault + {{- end}} + data: + {{- range .secretData }} + - key: {{.key}} + name: {{.name}} + {{- if .property }} + property: {{.property}} + {{- end}} + isBinary: {{.isBinary}} + {{- end}} + {{- end}} + {{- end}} + {{- end}} + {{- end}} \ No newline at end of file diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/service.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/service.yaml new file mode 100644 index 0000000000..2afbb48f8e --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/service.yaml @@ -0,0 +1,65 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template ".servicename" . }} + labels: + app: {{ template ".Chart.Name .name" . }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + chart: {{ template ".Chart.Name .chart" . }} + release: {{ .Release.Name }} +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end}} +spec: + type: {{ .Values.service.type | default "ClusterIP" }} + ports: + {{- range .Values.ContainerPort }} + {{- if .servicePort }} + - port: {{ .servicePort }} + {{- else }} + - port: {{ .port }} + {{- end }} + targetPort: {{ .name }} + protocol: TCP + name: {{ .name }} + {{- end }} + {{- if $.Values.appMetrics }} + - port: 9901 + name: envoy-admin + {{- end }} + selector: + app: {{ template ".Chart.Name .name" . }} +{{- if eq .Values.deploymentType "BLUE-GREEN" }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ template ".previewservicename" . }} + labels: + app: {{ template ".Chart.Name .name" . }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + chart: {{ template ".Chart.Name .chart" . }} + release: {{ .Release.Name }} +spec: + type: ClusterIP + ports: + {{- range .Values.ContainerPort }} + {{- if .servicePort }} + - port: {{ .servicePort }} + {{- else }} + - port: {{ .port }} + {{- end }} + targetPort: {{ .name }} + protocol: TCP + name: {{ .name }} + {{- end }} + {{- if $.Values.appMetrics }} + - port: 9901 + name: envoy-admin + {{- end }} + selector: + app: {{ template ".Chart.Name .name" . }} +{{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/servicemonitor.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/servicemonitor.yaml new file mode 100644 index 0000000000..1f90c722cb --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/servicemonitor.yaml @@ -0,0 +1,48 @@ +{{ $serviceMonitorEnabled := include "serviceMonitorEnabled" . }} +{{- if eq "true" $serviceMonitorEnabled -}} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template ".Chart.Name .fullname" . }}-sm + labels: + kind: Prometheus + app: {{ template ".Chart.Name .name" . }} + appId: {{ $.Values.app | quote }} + envId: {{ $.Values.env | quote }} + chart: {{ template ".Chart.Name .chart" . }} + release: {{ .Values.prometheus.release }} + {{- if .Values.servicemonitor.additionalLabels }} +{{ toYaml .Values.servicemonitor.additionalLabels | indent 4 }} + {{- end }} +spec: + endpoints: + {{- range .Values.ContainerPort }} + {{- if .servicemonitor }} + {{- if .servicemonitor.enabled}} + {{- if .servicePort }} + - port: {{ .name }} + {{- if .servicemonitor.path }} + path: {{ .servicemonitor.path}} + {{- end }} + {{- if .servicemonitor.scheme }} + scheme: {{ .servicemonitor.scheme}} + {{- end }} + {{- if .servicemonitor.interval }} + interval: {{ .servicemonitor.interval}} + {{- end }} + {{- if .servicemonitor.scrapeTimeout }} + scrapeTimeout: {{ .servicemonitor.scrapeTimeout}} + {{- end }} + {{- if .servicemonitor.metricRelabelings}} + metricRelabelings: +{{toYaml .servicemonitor.metricRelabelings | indent 8 }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + selector: + matchLabels: + app: {{ template ".Chart.Name .name" $ }} +{{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/sidecar-configmap.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/sidecar-configmap.yaml new file mode 100644 index 0000000000..7e8da7796f --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/templates/sidecar-configmap.yaml @@ -0,0 +1,163 @@ +{{- if .Values.appMetrics }} +apiVersion: v1 +kind: ConfigMap +metadata: + creationTimestamp: 2019-08-12T18:38:34Z + name: sidecar-config-{{ template ".Chart.Name .name" $ }} +data: + envoy-config.json: | + { + "stats_config": { + "use_all_default_tags": false, + "stats_tags": [ + { + "tag_name": "cluster_name", + "regex": "^cluster\\.((.+?(\\..+?\\.svc\\.cluster\\.local)?)\\.)" + }, + { + "tag_name": "tcp_prefix", + "regex": "^tcp\\.((.*?)\\.)\\w+?$" + }, + { + "tag_name": "response_code", + "regex": "_rq(_(\\d{3}))$" + }, + { + "tag_name": "response_code_class", + "regex": ".*_rq(_(\\dxx))$" + }, + { + "tag_name": "http_conn_manager_listener_prefix", + "regex": "^listener(?=\\.).*?\\.http\\.(((?:[_.[:digit:]]*|[_\\[\\]aAbBcCdDeEfF[:digit:]]*))\\.)" + }, + { + "tag_name": "http_conn_manager_prefix", + "regex": "^http\\.(((?:[_.[:digit:]]*|[_\\[\\]aAbBcCdDeEfF[:digit:]]*))\\.)" + }, + { + "tag_name": "listener_address", + "regex": "^listener\\.(((?:[_.[:digit:]]*|[_\\[\\]aAbBcCdDeEfF[:digit:]]*))\\.)" + }, + { + "tag_name": "mongo_prefix", + "regex": "^mongo\\.(.+?)\\.(collection|cmd|cx_|op_|delays_|decoding_)(.*?)$" + } + ], + "stats_matcher": { + "inclusion_list": { + "patterns": [ + { + "regex": ".*_rq_\\dxx$" + }, + { + "regex": ".*_rq_time$" + }, + { + "regex": "cluster.*" + }, + ] + } + } + }, + "admin": { + "access_log_path": "/dev/null", + "address": { + "socket_address": { + "address": "0.0.0.0", + "port_value": 9901 + } + } + }, + "static_resources": { + "clusters": [ + {{- range $index, $element := .Values.ContainerPort }} + { + "name": "{{ $.Values.app }}-{{ $index }}", + "type": "STATIC", + "connect_timeout": "0.250s", + "lb_policy": "ROUND_ROBIN", +{{- if $element.idleTimeout }} + "common_http_protocol_options": { + "idle_timeout": {{ $element.idleTimeout | quote }} + }, +{{- end }} +{{- if or $element.useHTTP2 $element.useGRPC }} + "http2_protocol_options": {}, +{{- end }} + "load_assignment": { + "cluster_name": "9", + "endpoints": { + "lb_endpoints": [ + { + "endpoint": { + "address": { + "socket_address": { + "protocol": "TCP", + "address": "127.0.0.1", + "port_value": {{ $element.port }} + } + } + } + } + ] + } + } + }, + {{- end }} + ], + "listeners":[ + {{- range $index, $element := .Values.ContainerPort }} + { + "address": { + "socket_address": { + "protocol": "TCP", + "address": "0.0.0.0", + "port_value": {{ $element.envoyPort | default (add 8790 $index) }} + } + }, + "filter_chains": [ + { + "filters": [ + { + "name": "envoy.filters.network.http_connection_manager", + "config": { + "codec_type": "AUTO", + "stat_prefix": "stats", + "route_config": { + "virtual_hosts": [ + { + "name": "backend", + "domains": [ + "*" + ], + "routes": [ + { + "match": { + "prefix": "/" + }, + "route": { +{{- if $element.supportStreaming }} + "timeout": "0s", +{{- end }} + "cluster": "{{ $.Values.app }}-{{ $index }}" + } + } + ] + } + ] + }, + "http_filters": { + "name": "envoy.filters.http.router" + } + } + } + ] + } + ] + }, + {{- end }} + ] + } + } +--- +{{- end }} diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/test_values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/test_values.yaml new file mode 100644 index 0000000000..6204c56fd4 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/test_values.yaml @@ -0,0 +1,349 @@ +# Default values for myapp. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 +MinReadySeconds: 5 +MaxSurge: 1 +MaxUnavailable: 0 +GracePeriod: 30 +ContainerPort: + - name: app + port: 8080 + servicePort: 80 + envoyPort: 8799 + useHTTP2: true + supportStreaming: true + idleTimeout: 1800s + servicemonitor: + enabled: true + path: /abc + scheme: 'http' + interval: 30s + scrapeTimeout: 20s + metricRelabelings: + - sourceLabels: [namespace] + regex: '(.*)' + replacement: myapp + targetLabel: target_namespace + + - name: app1 + port: 8090 + servicePort: 8080 + useGRPC: true + servicemonitor: + enabled: true + - name: app2 + port: 8091 + servicePort: 8081 + useGRPC: true + +pauseForSecondsBeforeSwitchActive: 30 +waitForSecondsBeforeScalingDown: 30 +autoPromotionSeconds: 30 + +Spec: + Affinity: + Key: + # Key: kops.k8s.io/instancegroup + Values: + + +image: + pullPolicy: IfNotPresent + +autoscaling: + enabled: true + MinReplicas: 1 + MaxReplicas: 2 + TargetCPUUtilizationPercentage: 90 + TargetMemoryUtilizationPercentage: 80 + extraMetrics: [] +# - external: +# metricName: pubsub.googleapis.com|subscription|num_undelivered_messages +# metricSelector: +# matchLabels: +# resource.labels.subscription_id: echo-read +# targetAverageValue: "2" +# type: External +# + +secret: + enabled: false + +service: + type: ClusterIP + # name: "1234567890123456789012345678901234567890123456789012345678901234567890" + annotations: {} + # test1: test2 + # test3: test4 + +server: + deployment: + image_tag: 1-95af053 + image: "" +deploymentType: "RECREATE" + + +EnvVariables: + - name: FLASK_ENV + value: qa + +LivenessProbe: + Path: / + port: 8080 + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + failureThreshold: 3 + +ReadinessProbe: + Path: / + port: 8080 + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + failureThreshold: 3 + +prometheus: + release: monitoring + +servicemonitor: + additionalLabels: {} + + +prometheusRule: + enabled: true + additionalLabels: {} + namespace: "" + rules: + # These are just examples rules, please adapt them to your needs + - alert: TooMany500s + expr: 100 * ( sum( nginx_ingress_controller_requests{status=~"5.+"} ) / sum(nginx_ingress_controller_requests) ) > 5 + for: 1m + labels: + severity: critical + annotations: + description: Too many 5XXs + summary: More than 5% of the all requests did return 5XX, this require your attention + - alert: TooMany400s + expr: 100 * ( sum( nginx_ingress_controller_requests{status=~"4.+"} ) / sum(nginx_ingress_controller_requests) ) > 5 + for: 1m + labels: + severity: critical + annotations: + description: Too many 4XXs + summary: More than 5% of the all requests did return 4XX, this require your attention + + + +ingress: + enabled: false + annotations: {} + # nginx.ingress.kubernetes.io/rewrite-target: / + # nginx.ingress.kubernetes.io/ssl-redirect: "false" + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # nginx.ingress.kubernetes.io/canary: "true" + # nginx.ingress.kubernetes.io/canary-weight: "10" + + path: '/path(/|$)(.*)' + host: "" + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +ingressInternal: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # nginx.ingress.kubernetes.io/canary: "true" + # nginx.ingress.kubernetes.io/canary-weight: "10" + + path: "" + host: "" + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +dbMigrationConfig: + enabled: false + +command: + enabled: false + value: [] + +args: + enabled: false + value: [] + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 1 + memory: 200Mi + requests: + cpu: 0.10 + memory: 100Mi + +volumeMounts: [] +# - name: log-volume +# mountPath: /var/log + +volumes: [] +# - name: log-volume +# emptyDir: {} + + +nodeSelector: {} + + +#used for deployment algo selection +orchestrator.deploymant.algo: 1 + +ConfigMaps: + enabled: false + maps: [] +# - name: config-map-1 +# type: environment +# external: false +# data: +# key1: key1value-1 +# key2: key2value-1 +# key3: key3value-1 +# - name: config-map-2 +# type: volume +# external: false +# mountPath: /etc/config/2 +# data: +# key1: | +# club : manchester utd +# nation : england +# key2: abc-2 +# key3: abc-2 +# - name: config-map-3 +# type: environment +# external: true +# mountPath: /etc/config/3 +# data: [] +# - name: config-map-4 +# type: volume +# external: true +# mountPath: /etc/config/4 +# data: [] + + +ConfigSecrets: + enabled: false + secrets: [] +# - name: config-secret-1 +# type: environment +# external: false +# data: +# key1: key1value-1 +# key2: key2value-1 +# key3: key3value-1 +# - name: config-secret-2 +# type: volume +# external: false +# mountPath: /etc/config/2 +# data: +# key1: | +# club : manchester utd +# nation : england +# key2: abc-2 + + +initContainers: [] + ## Additional init containers to run before the Scheduler pods. + ## for example, be used to run a sidecar that chown Logs storage . + #- name: volume-mount-hack + # image: busybox + # command: ["sh", "-c", "chown -R 1000:1000 logs"] + # volumeMounts: + # - mountPath: /usr/local/airflow/logs +# name: logs-data + +containers: [] + ## Additional init containers to run before the Scheduler pods. + ## for example, be used to run a sidecar that chown Logs storage . + #- name: volume-mount-hack + # image: busybox + # command: ["sh", "-c", "chown -R 1000:1000 logs"] + # volumeMounts: + # - mountPath: /usr/local/airflow/logs +# name: logs-data + + +rawYaml: [] +# - apiVersion: v1 +# kind: Service +# metadata: +# annotations: +# labels: +# app: sample-metrics-app +# name: sample-metrics-app +# namespace: default +# spec: +# ports: +# - name: web +# port: 80 +# protocol: TCP +# targetPort: 8080 +# selector: +# app: sample-metrics-app +# sessionAffinity: None +# type: ClusterIP +# - apiVersion: v1 +# kind: Service +# metadata: +# annotations: +# labels: +# app: sample-metrics-app +# name: sample-metrics-app +# namespace: default +# spec: +# ports: +# - name: web +# port: 80 +# protocol: TCP +# targetPort: 8080 +# selector: +# app: sample-metrics-app +# sessionAffinity: None +# type: ClusterIP + +envoyproxy: + image: envoyproxy/envoy:v1.14.1 + configMapName: "" + resources: + limits: + cpu: 50m + memory: 50Mi + requests: + cpu: 50m + memory: 50Mi + +podDisruptionBudget: {} + # minAvailable: 1 + # maxUnavailable: 1 + + ## Node tolerations for server scheduling to nodes with taints + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ +## + +tolerations: [] + # - key: "key" + # operator: "Equal|Exists" + # value: "value" +# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + +appMetrics: false \ No newline at end of file diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/values.yaml new file mode 100644 index 0000000000..6ddcae6e98 --- /dev/null +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/values.yaml @@ -0,0 +1,351 @@ +# Default values for myapp. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 +MinReadySeconds: 5 +MaxSurge: 1 +MaxUnavailable: 0 +GracePeriod: 30 +ContainerPort: + - name: app + port: 8080 + servicePort: 80 + envoyPort: 8799 + useHTTP2: true + supportStreaming: true + idleTimeout: 1800s +# servicemonitor: +# enabled: true +# path: /abc +# scheme: 'http' +# interval: 30s +# scrapeTimeout: 20s +# metricRelabelings: +# - sourceLabels: [namespace] +# regex: '(.*)' +# replacement: myapp +# targetLabel: target_namespace + + - name: app1 + port: 8090 + servicePort: 8080 + useGRPC: true + +pauseForSecondsBeforeSwitchActive: 30 +waitForSecondsBeforeScalingDown: 30 +autoPromotionSeconds: 30 + +Spec: + Affinity: + Key: +# Key: kops.k8s.io/instancegroup + Values: + + +image: + pullPolicy: IfNotPresent + +autoscaling: + enabled: true + MinReplicas: 1 + MaxReplicas: 2 + TargetCPUUtilizationPercentage: 90 + TargetMemoryUtilizationPercentage: 80 + extraMetrics: [] +# - external: +# metricName: pubsub.googleapis.com|subscription|num_undelivered_messages +# metricSelector: +# matchLabels: +# resource.labels.subscription_id: echo-read +# targetAverageValue: "2" +# type: External +# + +secret: + enabled: false + +service: + type: ClusterIP +# name: "1234567890123456789012345678901234567890123456789012345678901234567890" + annotations: {} + # test1: test2 + # test3: test4 + +server: + deployment: + image_tag: 1-95af053 + image: "" + + +EnvVariables: + - name: FLASK_ENV + value: qa + +LivenessProbe: + Path: / + port: 8080 + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + failureThreshold: 3 + +ReadinessProbe: + Path: / + port: 8080 + initialDelaySeconds: 20 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + failureThreshold: 3 + +prometheus: + release: monitoring + +servicemonitor: + additionalLabels: {} + + +prometheusRule: + enabled: false + additionalLabels: {} + namespace: "" +# rules: +# # These are just examples rules, please adapt them to your needs +# - alert: TooMany500s +# expr: 100 * ( sum( nginx_ingress_controller_requests{status=~"5.+"} ) / sum(nginx_ingress_controller_requests) ) > 5 +# for: 1m +# labels: +# severity: critical +# annotations: +# description: Too many 5XXs +# summary: More than 5% of the all requests did return 5XX, this require your attention +# - alert: TooMany400s +# expr: 100 * ( sum( nginx_ingress_controller_requests{status=~"4.+"} ) / sum(nginx_ingress_controller_requests) ) > 5 +# for: 1m +# labels: +# severity: critical +# annotations: +# description: Too many 4XXs +# summary: More than 5% of the all requests did return 4XX, this require your attention +# + +ingress: + enabled: false + annotations: {} +# nginx.ingress.kubernetes.io/rewrite-target: / +# nginx.ingress.kubernetes.io/ssl-redirect: "false" +# kubernetes.io/ingress.class: nginx +# kubernetes.io/tls-acme: "true" +# nginx.ingress.kubernetes.io/canary: "true" +# nginx.ingress.kubernetes.io/canary-weight: "10" + + hosts: + - host: chart-example1.local + paths: + - /example1 + - host: chart-example2.local + paths: + - /example2 + - /example2/healthz + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +ingressInternal: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # nginx.ingress.kubernetes.io/canary: "true" + # nginx.ingress.kubernetes.io/canary-weight: "10" + + hosts: + - host: chart-example1.internal + paths: + - /example1 + - host: chart-example2.internal + paths: + - /example2 + - /example2/healthz + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +dbMigrationConfig: + enabled: false + +command: + enabled: false + value: [] + +args: + enabled: false + value: [] + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 1 + memory: 200Mi + requests: + cpu: 0.10 + memory: 100Mi + +volumeMounts: [] +# - name: log-volume +# mountPath: /var/log + +volumes: [] +# - name: log-volume +# emptyDir: {} + + +nodeSelector: {} + + +#used for deployment algo selection +orchestrator.deploymant.algo: 1 + +ConfigMaps: + enabled: false + maps: [] +# - name: config-map-1 +# type: environment +# external: false +# data: +# key1: key1value-1 +# key2: key2value-1 +# key3: key3value-1 +# - name: config-map-2 +# type: volume +# external: false +# mountPath: /etc/config/2 +# data: +# key1: | +# club : manchester utd +# nation : england +# key2: abc-2 +# key3: abc-2 +# - name: config-map-3 +# type: environment +# external: true +# mountPath: /etc/config/3 +# data: [] +# - name: config-map-4 +# type: volume +# external: true +# mountPath: /etc/config/4 +# data: [] + + +ConfigSecrets: + enabled: false + secrets: [] +# - name: config-secret-1 +# type: environment +# external: false +# data: +# key1: key1value-1 +# key2: key2value-1 +# key3: key3value-1 +# - name: config-secret-2 +# type: volume +# external: false +# mountPath: /etc/config/2 +# data: +# key1: | +# club : manchester utd +# nation : england +# key2: abc-2 + + +initContainers: [] + ## Additional init containers to run before the Scheduler pods. + ## for example, be used to run a sidecar that chown Logs storage . + #- name: volume-mount-hack + # image: busybox + # command: ["sh", "-c", "chown -R 1000:1000 logs"] + # volumeMounts: + # - mountPath: /usr/local/airflow/logs + # name: logs-data + +containers: [] + ## Additional init containers to run before the Scheduler pods. + ## for example, be used to run a sidecar that chown Logs storage . + #- name: volume-mount-hack + # image: busybox + # command: ["sh", "-c", "chown -R 1000:1000 logs"] + # volumeMounts: + # - mountPath: /usr/local/airflow/logs + # name: logs-data + + +rawYaml: [] +# - apiVersion: v1 +# kind: Service +# metadata: +# annotations: +# labels: +# app: sample-metrics-app +# name: sample-metrics-app +# namespace: default +# spec: +# ports: +# - name: web +# port: 80 +# protocol: TCP +# targetPort: 8080 +# selector: +# app: sample-metrics-app +# sessionAffinity: None +# type: ClusterIP +# - apiVersion: v1 +# kind: Service +# metadata: +# annotations: +# labels: +# app: sample-metrics-app +# name: sample-metrics-app +# namespace: default +# spec: +# ports: +# - name: web +# port: 80 +# protocol: TCP +# targetPort: 8080 +# selector: +# app: sample-metrics-app +# sessionAffinity: None +# type: ClusterIP + +envoyproxy: + image: envoyproxy/envoy:v1.14.1 + configMapName: "" + resources: + limits: + cpu: 50m + memory: 50Mi + requests: + cpu: 50m + memory: 50Mi + +podDisruptionBudget: {} +# minAvailable: 1 +# maxUnavailable: 1 + + ## Node tolerations for server scheduling to nodes with taints + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + ## + +tolerations: [] + # - key: "key" + # operator: "Equal|Exists" + # value: "value" + # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" From e7be2193aa59d1f87a7a235a2daf18c31265bd3c Mon Sep 17 00:00:00 2001 From: Ankit Agrawal Date: Sun, 18 Apr 2021 16:36:22 +0530 Subject: [PATCH 2/2] Updated app and test values --- .../reference-chart_3-11-0/app-values.yaml | 50 +++++++++++-------- .../reference-chart_3-11-0/test_values.yaml | 48 +++++++++++------- 2 files changed, 60 insertions(+), 38 deletions(-) diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/app-values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/app-values.yaml index c5959433f2..f539387404 100644 --- a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/app-values.yaml +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/app-values.yaml @@ -76,17 +76,42 @@ ReadinessProbe: ingress: enabled: false annotations: - nginx.ingress.kubernetes.io/rewrite-target: /$2 nginx.ingress.kubernetes.io/force-ssl-redirect: 'false' nginx.ingress.kubernetes.io/ssl-redirect: 'false' kubernetes.io/ingress.class: nginx -# kubernetes.io/ingress.class: nginx -# kubernetes.io/tls-acme: "true" +# nginx.ingress.kubernetes.io/rewrite-target: /$2 # nginx.ingress.kubernetes.io/canary: "true" # nginx.ingress.kubernetes.io/canary-weight: "10" - path: "" - host: "" + hosts: + - host: chart-example1.local + paths: + - /example1 + - host: chart-example2.local + paths: + - /example2 + - /example2/healthz + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +ingressInternal: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # nginx.ingress.kubernetes.io/canary: "true" + # nginx.ingress.kubernetes.io/canary-weight: "10" + + hosts: + - host: chart-example1.internal + paths: + - /example1 + - host: chart-example2.internal + paths: + - /example2 + - /example2/healthz tls: [] # - secretName: chart-example-tls # hosts: @@ -129,21 +154,6 @@ containers: [] # - mountPath: /usr/local/airflow/logs # name: logs-data -ingressInternal: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - # nginx.ingress.kubernetes.io/canary: "true" - # nginx.ingress.kubernetes.io/canary-weight: "10" - - path: "" - host: "" - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - volumeMounts: [] # - name: log-volume # mountPath: /var/log diff --git a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/test_values.yaml b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/test_values.yaml index 6204c56fd4..f633fb7964 100644 --- a/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/test_values.yaml +++ b/scripts/devtron-reference-helm-charts/reference-chart_3-11-0/test_values.yaml @@ -138,19 +138,24 @@ prometheusRule: summary: More than 5% of the all requests did return 4XX, this require your attention - ingress: enabled: false annotations: {} - # nginx.ingress.kubernetes.io/rewrite-target: / - # nginx.ingress.kubernetes.io/ssl-redirect: "false" - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - # nginx.ingress.kubernetes.io/canary: "true" - # nginx.ingress.kubernetes.io/canary-weight: "10" - - path: '/path(/|$)(.*)' - host: "" +# nginx.ingress.kubernetes.io/rewrite-target: / +# nginx.ingress.kubernetes.io/ssl-redirect: "false" +# kubernetes.io/ingress.class: nginx +# kubernetes.io/tls-acme: "true" +# nginx.ingress.kubernetes.io/canary: "true" +# nginx.ingress.kubernetes.io/canary-weight: "10" + + hosts: + - host: chart-example1.local + paths: + - /example1 + - host: chart-example2.local + paths: + - /example2 + - /example2/healthz tls: [] # - secretName: chart-example-tls # hosts: @@ -159,13 +164,20 @@ ingress: ingressInternal: enabled: false annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - # nginx.ingress.kubernetes.io/canary: "true" - # nginx.ingress.kubernetes.io/canary-weight: "10" - - path: "" - host: "" + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # nginx.ingress.kubernetes.io/canary: "true" + # nginx.ingress.kubernetes.io/canary-weight: "10" + + hosts: + - host: chart-example1.internal + paths: + - /example1 + - host: chart-example2.internal + paths: + - /example2 + - /example2/healthz + tls: [] tls: [] # - secretName: chart-example-tls # hosts: @@ -346,4 +358,4 @@ tolerations: [] # value: "value" # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" -appMetrics: false \ No newline at end of file +appMetrics: false