From 9f6b9bd7f5e47d905bb747cb076e17032edd95d3 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:06:02 +0000 Subject: [PATCH 01/26] "Added code for Probes & Namespace" --- demo-extended/templates/deployment.yaml | 3 ++- demo-extended/templates/services.yaml | 3 ++- demo-extended/values.schema.json | 7 ++++++- demo-extended/values.yaml | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/demo-extended/templates/deployment.yaml b/demo-extended/templates/deployment.yaml index 151cdc6..17df69d 100644 --- a/demo-extended/templates/deployment.yaml +++ b/demo-extended/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.name }} + namespace: {{ .Values.namespace }} labels: app: {{ .Values.name }} spec: @@ -45,4 +46,4 @@ spec: memory: {{ ((.Values.scaling).resources).memory }}Gi {{- end }} {{- end }} - {{- end }} + {{- end }} \ No newline at end of file diff --git a/demo-extended/templates/services.yaml b/demo-extended/templates/services.yaml index d03819a..5ed79db 100644 --- a/demo-extended/templates/services.yaml +++ b/demo-extended/templates/services.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Service metadata: name: {{ .Values.name }} + namespace: {{ .Values.namespace }} labels: app: {{ .Values.name }} spec: @@ -14,4 +15,4 @@ spec: name: http selector: app: {{ .Values.name }} - {{- end }} + {{- end }} \ No newline at end of file diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index f152a43..2809c73 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -5,6 +5,11 @@ "title": "Name", "description": "Application name" }, + "namespace": { + "type": "string", + "title": "Namespace", + "description": "Namespace for Application" + }, "general": { "type": "object", "title": "General", @@ -106,4 +111,4 @@ ], "title": "Values", "type": "object" -} +} \ No newline at end of file diff --git a/demo-extended/values.yaml b/demo-extended/values.yaml index 903cf6c..76ac144 100644 --- a/demo-extended/values.yaml +++ b/demo-extended/values.yaml @@ -1,5 +1,5 @@ name: my-app - +namespace: default general: image: nginx version: 1.14.2 @@ -11,4 +11,4 @@ scaling: networking: expose: true - port: 8080 + port: 8080 \ No newline at end of file From 647f337a828fb9a496f5691abd1528a2672b0498 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:43:06 +0530 Subject: [PATCH 02/26] Update values.yaml --- demo-extended/values.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/demo-extended/values.yaml b/demo-extended/values.yaml index 76ac144..7b76caa 100644 --- a/demo-extended/values.yaml +++ b/demo-extended/values.yaml @@ -8,7 +8,26 @@ general: scaling: replicas: 3 + resources: + cpu: 1 + memory: 512 + +probes: + startup: + path: "/" + initialDelaySeconds: 5 + periodSeconds: 10 + failureThreshold: 3 + liveness: + path: "/" + initialDelaySeconds: 10 + periodSeconds: 20 + readiness: + path: "/" + initialDelaySeconds: 5 + periodSeconds: 10 + failureThreshold: 3 networking: expose: true - port: 8080 \ No newline at end of file + port: 8080 From 931e99a5e64dc8e73b690d289029bc43200b2afc Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:43:38 +0530 Subject: [PATCH 03/26] Update values.schema.json --- demo-extended/values.schema.json | 79 +++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 2809c73..ec9620e 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -9,7 +9,7 @@ "type": "string", "title": "Namespace", "description": "Namespace for Application" - }, + }, "general": { "type": "object", "title": "General", @@ -79,6 +79,79 @@ "resources" ] }, + "probes": { + "type": "object", + "title": "Probes", + "properties": { + "startup": { + "title": "Startup Probe", + "type": "object", + "properties": { + "path": { + "title": "Path for probe", + "type": "string" + }, + "initialDelaySeconds": { + "title": "Initial Delay Seconds", + "type": "integer" + }, + "periodSeconds": { + "title": "Period Seconds", + "type": "integer" + }, + "failureThreshold": { + "title": "Failure Threshold", + "type": "integer" + } + } + }, + "liveness": { + "title": "Liveness Probe", + "type": "object", + "properties": { + "path": { + "title": "Path for probe", + "type": "string" + }, + "initialDelaySeconds": { + "title": "Initial Delay Seconds", + "type": "integer" + }, + "periodSeconds": { + "title": "Period Seconds", + "type": "integer" + } + } + }, + "readiness": { + "title": "Readiness Probe", + "type": "object", + "properties": { + "path": { + "title": "Path for probe", + "type": "string" + }, + "initialDelaySeconds": { + "title": "Initial Delay Seconds", + "type": "integer" + }, + "periodSeconds": { + "title": "Period Seconds", + "type": "integer" + }, + "failureThreshold": { + "title": "Failure Threshold", + "type": "integer" + } + } + } + }, + "order": [ + "startup", + "liveness", + "readiness" + ] + }, "networking": { "type": "object", "title": "Networking", @@ -105,10 +178,12 @@ ], "order": [ "name", + "namespace", "general", "scaling", + "probes", "networking" ], "title": "Values", "type": "object" -} \ No newline at end of file +} From d39a512f331e512a39878ee37306344a726737a0 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:43:57 +0530 Subject: [PATCH 04/26] Update Chart.yaml --- demo-extended/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo-extended/Chart.yaml b/demo-extended/Chart.yaml index e44ad9c..7795382 100644 --- a/demo-extended/Chart.yaml +++ b/demo-extended/Chart.yaml @@ -1,5 +1,5 @@ -apiVersion: v2 -name: extended-demo +apiVersion: v1 +name: custom-template description: Demo chart with more properties to chose from type: application From d42135599bdfed5523431debb19ed617be7dc7f6 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:44:20 +0530 Subject: [PATCH 05/26] Update deployment.yaml --- demo-extended/templates/deployment.yaml | 54 ++++++++++++++++--------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/demo-extended/templates/deployment.yaml b/demo-extended/templates/deployment.yaml index 17df69d..893bfe5 100644 --- a/demo-extended/templates/deployment.yaml +++ b/demo-extended/templates/deployment.yaml @@ -6,7 +6,7 @@ metadata: labels: app: {{ .Values.name }} spec: - replicas: {{ (.Values.scaling).replicas | default 1 }} + replicas: {{ .Values.scaling.replicas }} selector: matchLabels: app: {{ .Values.name }} @@ -18,32 +18,48 @@ spec: containers: - name: {{ .Values.name }} image: "{{ .Values.general.image }}:{{ .Values.general.version }}" - {{- if ((.Values.networking).expose) }} + + {{- if .Values.networking.expose }} ports: - name: http - containerPort: {{ .Values.networking.port | default 80 }} + containerPort: {{ .Values.networking.port }} protocol: TCP {{- end }} + env: - {{- if ((.Values.general).environment) }} - {{- range $key, $value := (.Values.general).environment }} - - name: {{ $key }} - value: {{ $value | quote }} + {{- if .Values.general.environment }} + {{- toYaml .Values.general.environment | indent 12 }} {{- end }} - {{- end }} - {{- if or ((.Values.scaling).resources).memory ((.Values.scaling).resources).cpu }} + resources: - {{- if ((.Values.scaling).resources).memory }} + {{- if .Values.scaling.resources.memory }} limits: - memory: {{ ((.Values.scaling).resources).memory }}Gi + memory: "{{ .Values.scaling.resources.memory }}Gi" {{- end }} - {{- if or ((.Values.scaling).resources).memory ((.Values.scaling).resources).cpu }} + {{- if .Values.scaling.resources.cpu }} requests: - {{- if ((.Values.scaling).resources).cpu }} - cpu: {{ ((.Values.scaling).resources).cpu }} - {{- end }} - {{- if ((.Values.scaling).resources).memory }} - memory: {{ ((.Values.scaling).resources).memory }}Gi - {{- end }} + cpu: "{{ .Values.scaling.resources.cpu }}" {{- end }} - {{- end }} \ No newline at end of file + + readinessProbe: + httpGet: + path: {{ .Values.probes.readiness.path }} + port: http + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + failureThreshold: {{ .Values.probes.readiness.failureThreshold }} + + livenessProbe: + httpGet: + path: {{ .Values.probes.liveness.path }} + port: http + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + + startupProbe: + httpGet: + path: {{ .Values.probes.startup.path }} + port: http + initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.startup.periodSeconds }} + failureThreshold: {{ .Values.probes.startup.failureThreshold }} From ab32e68d5a8c2bd62d96290255047ec97ca76891 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Fri, 26 Apr 2024 18:38:21 +0530 Subject: [PATCH 06/26] Update Chart.yaml --- demo-extended/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo-extended/Chart.yaml b/demo-extended/Chart.yaml index 7795382..e44ad9c 100644 --- a/demo-extended/Chart.yaml +++ b/demo-extended/Chart.yaml @@ -1,5 +1,5 @@ -apiVersion: v1 -name: custom-template +apiVersion: v2 +name: extended-demo description: Demo chart with more properties to chose from type: application From b2e54fd879857aaddb9c16b71def442153c30018 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Thu, 2 May 2024 23:45:40 +0530 Subject: [PATCH 07/26] Update values.schema.json --- demo-extended/values.schema.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index ec9620e..97e4f11 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -120,6 +120,10 @@ "periodSeconds": { "title": "Period Seconds", "type": "integer" + }, + "failureThreshold": { + "title": "Failure Threshold", + "type": "integer" } } }, From 01d71e2ee030a59c20711cf45e5f9a7ada21b9f6 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Thu, 2 May 2024 23:52:41 +0530 Subject: [PATCH 08/26] Update values.schema.json --- demo-extended/values.schema.json | 40 ++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 97e4f11..92c736a 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -82,70 +82,86 @@ "probes": { "type": "object", "title": "Probes", + "description": "Configuration for container probes", "properties": { "startup": { "title": "Startup Probe", "type": "object", + "description": "Configuration for the startup probe", "properties": { "path": { "title": "Path for probe", - "type": "string" + "type": "string", + "description": "The endpoint to probe for startup readiness" }, "initialDelaySeconds": { "title": "Initial Delay Seconds", - "type": "integer" + "type": "integer", + "description": "The number of seconds to wait before performing the first probe" }, "periodSeconds": { "title": "Period Seconds", - "type": "integer" + "type": "integer", + "description": "The number of seconds between each probe" }, "failureThreshold": { "title": "Failure Threshold", - "type": "integer" + "type": "integer", + "description": "The number of consecutive failures required to consider the probe as failed" } } }, "liveness": { "title": "Liveness Probe", "type": "object", + "description": "Configuration for the liveness probe", "properties": { "path": { "title": "Path for probe", - "type": "string" + "type": "string", + "description": "The endpoint to probe for liveness" }, "initialDelaySeconds": { "title": "Initial Delay Seconds", - "type": "integer" + "type": "integer", + "description": "The number of seconds to wait before performing the first probe" }, "periodSeconds": { "title": "Period Seconds", - "type": "integer" + "type": "integer", + "description": "The number of seconds between each probe" }, "failureThreshold": { "title": "Failure Threshold", - "type": "integer" + "type": "integer", + "description": "The number of consecutive failures required to consider the probe as failed" } } }, "readiness": { "title": "Readiness Probe", "type": "object", + "description": "Configuration for the readiness probe", "properties": { "path": { "title": "Path for probe", - "type": "string" + "type": "string", + "description": "The endpoint to probe for readiness" }, "initialDelaySeconds": { "title": "Initial Delay Seconds", - "type": "integer" + "type": "integer", + "description": "The number of seconds to wait before performing the first probe" }, "periodSeconds": { "title": "Period Seconds", - "type": "integer" + "type": "integer", + "description": "The number of seconds between each probe" }, "failureThreshold": { "title": "Failure Threshold", - "type": "integer" + "type": "integer", + "description": "The number of consecutive failures required to consider the probe as failed" } } } From bb69782faa32d0445847f50160f83a022e4c43ad Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Thu, 2 May 2024 23:57:32 +0530 Subject: [PATCH 09/26] Update values.yaml --- demo-extended/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/demo-extended/values.yaml b/demo-extended/values.yaml index 7b76caa..17b607f 100644 --- a/demo-extended/values.yaml +++ b/demo-extended/values.yaml @@ -22,6 +22,7 @@ probes: path: "/" initialDelaySeconds: 10 periodSeconds: 20 + failureThreshold: 3 readiness: path: "/" initialDelaySeconds: 5 From 4ef0a98ca5f7b24359563948481e946000203f70 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Fri, 3 May 2024 00:01:06 +0530 Subject: [PATCH 10/26] Update values.schema.json --- demo-extended/values.schema.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 92c736a..9514a4d 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -108,6 +108,12 @@ "title": "Failure Threshold", "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" + }, + "enabled": { + "title": "Enabled", + "type": "boolean", + "default": true, + "description": "Toggle to enable or disable the startup probe" } } }, @@ -135,6 +141,12 @@ "title": "Failure Threshold", "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" + }, + "enabled": { + "title": "Enabled", + "type": "boolean", + "default": true, + "description": "Toggle to enable or disable the liveness probe" } } }, @@ -162,6 +174,12 @@ "title": "Failure Threshold", "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" + }, + "enabled": { + "title": "Enabled", + "type": "boolean", + "default": true, + "description": "Toggle to enable or disable the readiness probe" } } } From ba98d11b69de0b8e325bcf338627b6dc6b631e81 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Fri, 3 May 2024 00:01:51 +0530 Subject: [PATCH 11/26] Update values.yaml --- demo-extended/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/demo-extended/values.yaml b/demo-extended/values.yaml index 17b607f..bd7b18b 100644 --- a/demo-extended/values.yaml +++ b/demo-extended/values.yaml @@ -18,16 +18,19 @@ probes: initialDelaySeconds: 5 periodSeconds: 10 failureThreshold: 3 + enabled: false liveness: path: "/" initialDelaySeconds: 10 periodSeconds: 20 failureThreshold: 3 + enabled: true readiness: path: "/" initialDelaySeconds: 5 periodSeconds: 10 failureThreshold: 3 + enabled: true networking: expose: true From 7234332ac29d93c4acd25bce18636439b2989deb Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Fri, 3 May 2024 00:04:25 +0530 Subject: [PATCH 12/26] Update values.yaml --- demo-extended/values.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/demo-extended/values.yaml b/demo-extended/values.yaml index bd7b18b..ad0688b 100644 --- a/demo-extended/values.yaml +++ b/demo-extended/values.yaml @@ -13,24 +13,22 @@ scaling: memory: 512 probes: + enabled: true startup: path: "/" initialDelaySeconds: 5 periodSeconds: 10 failureThreshold: 3 - enabled: false liveness: path: "/" initialDelaySeconds: 10 periodSeconds: 20 failureThreshold: 3 - enabled: true readiness: path: "/" initialDelaySeconds: 5 periodSeconds: 10 failureThreshold: 3 - enabled: true networking: expose: true From b9f58e63e55124d63dce0ebaa714dd01d9914217 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Fri, 3 May 2024 00:05:38 +0530 Subject: [PATCH 13/26] Update values.schema.json --- demo-extended/values.schema.json | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 9514a4d..2f2e54c 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -84,6 +84,12 @@ "title": "Probes", "description": "Configuration for container probes", "properties": { + "enabled": { + "title": "Enabled", + "type": "boolean", + "default": true, + "description": "Toggle to enable or disable all probes" + }, "startup": { "title": "Startup Probe", "type": "object", @@ -108,12 +114,6 @@ "title": "Failure Threshold", "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" - }, - "enabled": { - "title": "Enabled", - "type": "boolean", - "default": true, - "description": "Toggle to enable or disable the startup probe" } } }, @@ -141,12 +141,6 @@ "title": "Failure Threshold", "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" - }, - "enabled": { - "title": "Enabled", - "type": "boolean", - "default": true, - "description": "Toggle to enable or disable the liveness probe" } } }, @@ -174,17 +168,12 @@ "title": "Failure Threshold", "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" - }, - "enabled": { - "title": "Enabled", - "type": "boolean", - "default": true, - "description": "Toggle to enable or disable the readiness probe" } } } }, "order": [ + "enabled", "startup", "liveness", "readiness" From a8df8465b82d9471cb017594837a95f021ce582a Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Fri, 3 May 2024 00:52:43 +0530 Subject: [PATCH 14/26] Update values.schema.json --- demo-extended/values.schema.json | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 2f2e54c..b40b058 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -115,7 +115,13 @@ "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" } - } + }, + "order": [ + "path", + "initialDelaySeconds", + "periodSeconds", + "failureThreshold" + ] }, "liveness": { "title": "Liveness Probe", @@ -142,7 +148,13 @@ "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" } - } + }, + "order": [ + "path", + "initialDelaySeconds", + "periodSeconds", + "failureThreshold" + ] }, "readiness": { "title": "Readiness Probe", @@ -169,7 +181,13 @@ "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" } - } + }, + "order": [ + "path", + "initialDelaySeconds", + "periodSeconds", + "failureThreshold" + ] } }, "order": [ From d0364ace8dcbfb576973ce74541f2858bdb9e0cc Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Fri, 3 May 2024 00:59:36 +0530 Subject: [PATCH 15/26] Update deployment.yaml --- demo-extended/templates/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demo-extended/templates/deployment.yaml b/demo-extended/templates/deployment.yaml index 893bfe5..735acfe 100644 --- a/demo-extended/templates/deployment.yaml +++ b/demo-extended/templates/deployment.yaml @@ -41,6 +41,7 @@ spec: cpu: "{{ .Values.scaling.resources.cpu }}" {{- end }} + {{- if .Values.probes.enabled }} readinessProbe: httpGet: path: {{ .Values.probes.readiness.path }} @@ -63,3 +64,4 @@ spec: initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds }} periodSeconds: {{ .Values.probes.startup.periodSeconds }} failureThreshold: {{ .Values.probes.startup.failureThreshold }} + {{- end }} From d1b7e6291b94ec121cb9177c3777d80155da10af Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 19:41:42 +0530 Subject: [PATCH 16/26] Updated deployment.yaml for env --- demo-extended/templates/deployment.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/demo-extended/templates/deployment.yaml b/demo-extended/templates/deployment.yaml index 735acfe..dc2bdb2 100644 --- a/demo-extended/templates/deployment.yaml +++ b/demo-extended/templates/deployment.yaml @@ -27,9 +27,13 @@ spec: {{- end }} env: - {{- if .Values.general.environment }} - {{- toYaml .Values.general.environment | indent 12 }} + {{- if ((.Values.general).environment) }} + {{- range $key, $value := (.Values.general).environment }} + - name: {{ $key }} + value: {{ $value | quote }} {{- end }} + {{- end }} + {{- if or ((.Values.scaling).resources).memory ((.Values.scaling).resources).cpu }} resources: {{- if .Values.scaling.resources.memory }} From 42035784f81d23a6d9a5e5f34e0e2f00d20e9c0f Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 19:41:59 +0530 Subject: [PATCH 17/26] Update values.yaml --- demo-extended/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-extended/values.yaml b/demo-extended/values.yaml index ad0688b..8742472 100644 --- a/demo-extended/values.yaml +++ b/demo-extended/values.yaml @@ -13,7 +13,7 @@ scaling: memory: 512 probes: - enabled: true + enabled: false startup: path: "/" initialDelaySeconds: 5 From 9630037015877c7aeb2f16495c165b5442e2225b Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 19:46:28 +0530 Subject: [PATCH 18/26] Update values.schema.json --- demo-extended/values.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index b40b058..5b526f9 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -87,7 +87,7 @@ "enabled": { "title": "Enabled", "type": "boolean", - "default": true, + "default": false, "description": "Toggle to enable or disable all probes" }, "startup": { From c9d7c608f4adaaed29ebad6783c607858f088288 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 19:49:37 +0530 Subject: [PATCH 19/26] Update values.schema.json --- demo-extended/values.schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 5b526f9..9bb94c3 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -1,4 +1,6 @@ { + "title": "Values", + "type": "object", "properties": { "name": { "type": "string", @@ -61,8 +63,8 @@ }, "memory": { "title": "Memory", - "description": "Measured in Gi", - "type": "integer" + "type": "integer", + "description": "Measured in Gi" } }, "order": [ @@ -228,7 +230,5 @@ "scaling", "probes", "networking" - ], - "title": "Values", - "type": "object" + ] } From 42a31a497246e7ee76f43f33745b3e4c208be2af Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 19:51:11 +0530 Subject: [PATCH 20/26] Update values.schema.json --- demo-extended/values.schema.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 9bb94c3..d88e468 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -230,5 +230,7 @@ "scaling", "probes", "networking" - ] + ], + "title": "Values", + "type": "object" } From 91b183c79267761e6f2d5f30f262e44e1c748c7e Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 20:01:20 +0530 Subject: [PATCH 21/26] Update values.schema.json --- demo-extended/values.schema.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index d88e468..9bb94c3 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -230,7 +230,5 @@ "scaling", "probes", "networking" - ], - "title": "Values", - "type": "object" + ] } From 9ea33259dc3f7b17d97bb21765d325d1c52d39a9 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 20:11:11 +0530 Subject: [PATCH 22/26] Update values.yaml --- demo-extended/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-extended/values.yaml b/demo-extended/values.yaml index 8742472..ad0688b 100644 --- a/demo-extended/values.yaml +++ b/demo-extended/values.yaml @@ -13,7 +13,7 @@ scaling: memory: 512 probes: - enabled: false + enabled: true startup: path: "/" initialDelaySeconds: 5 From bf9ab27e846b6b1cb3d16805f183931a2aa56d10 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 20:11:24 +0530 Subject: [PATCH 23/26] Update values.schema.json --- demo-extended/values.schema.json | 36 ++++++++------------------------ 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 9bb94c3..2f2e54c 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -1,6 +1,4 @@ { - "title": "Values", - "type": "object", "properties": { "name": { "type": "string", @@ -63,8 +61,8 @@ }, "memory": { "title": "Memory", - "type": "integer", - "description": "Measured in Gi" + "description": "Measured in Gi", + "type": "integer" } }, "order": [ @@ -89,7 +87,7 @@ "enabled": { "title": "Enabled", "type": "boolean", - "default": false, + "default": true, "description": "Toggle to enable or disable all probes" }, "startup": { @@ -117,13 +115,7 @@ "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" } - }, - "order": [ - "path", - "initialDelaySeconds", - "periodSeconds", - "failureThreshold" - ] + } }, "liveness": { "title": "Liveness Probe", @@ -150,13 +142,7 @@ "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" } - }, - "order": [ - "path", - "initialDelaySeconds", - "periodSeconds", - "failureThreshold" - ] + } }, "readiness": { "title": "Readiness Probe", @@ -183,13 +169,7 @@ "type": "integer", "description": "The number of consecutive failures required to consider the probe as failed" } - }, - "order": [ - "path", - "initialDelaySeconds", - "periodSeconds", - "failureThreshold" - ] + } } }, "order": [ @@ -230,5 +210,7 @@ "scaling", "probes", "networking" - ] + ], + "title": "Values", + "type": "object" } From 312d157d0f8484fcb1c2002fe54db3d6a8fafe60 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 20:11:41 +0530 Subject: [PATCH 24/26] Update Chart.yaml From bfcf826d228fa85552cc7f3022f537c3497a4ac3 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Sun, 5 May 2024 20:12:52 +0530 Subject: [PATCH 25/26] Update deployment.yaml From e987067897346797a97a1846d311a80b2f65fa49 Mon Sep 17 00:00:00 2001 From: Rohan Rustagi <110477025+RohanRusta21@users.noreply.github.com> Date: Mon, 22 Jul 2024 18:04:19 +0000 Subject: [PATCH 26/26] modified deployment,values.yaml,schema json --- demo-extended/templates/deployment.yaml | 36 ++--- demo-extended/values.schema.json | 195 +++++++++++------------- demo-extended/values.yaml | 3 - 3 files changed, 106 insertions(+), 128 deletions(-) diff --git a/demo-extended/templates/deployment.yaml b/demo-extended/templates/deployment.yaml index dc2bdb2..2f31b38 100644 --- a/demo-extended/templates/deployment.yaml +++ b/demo-extended/templates/deployment.yaml @@ -18,23 +18,18 @@ spec: containers: - name: {{ .Values.name }} image: "{{ .Values.general.image }}:{{ .Values.general.version }}" - {{- if .Values.networking.expose }} ports: - name: http containerPort: {{ .Values.networking.port }} protocol: TCP {{- end }} - env: - {{- if ((.Values.general).environment) }} - {{- range $key, $value := (.Values.general).environment }} + {{- range $key, $value := .Values.general.environment }} - name: {{ $key }} value: {{ $value | quote }} {{- end }} - {{- end }} {{- if or ((.Values.scaling).resources).memory ((.Values.scaling).resources).cpu }} - resources: {{- if .Values.scaling.resources.memory }} limits: @@ -44,28 +39,29 @@ spec: requests: cpu: "{{ .Values.scaling.resources.cpu }}" {{- end }} - + {{- end }} {{- if .Values.probes.enabled }} + {{- with .Values.probes }} readinessProbe: httpGet: - path: {{ .Values.probes.readiness.path }} + path: {{ .readiness.path }} port: http - initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.readiness.periodSeconds }} - failureThreshold: {{ .Values.probes.readiness.failureThreshold }} - + initialDelaySeconds: {{ .readiness.initialDelaySeconds }} + periodSeconds: {{ .readiness.periodSeconds }} + failureThreshold: {{ .readiness.failureThreshold }} livenessProbe: httpGet: - path: {{ .Values.probes.liveness.path }} + path: {{ .liveness.path }} port: http - initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.liveness.periodSeconds }} - + initialDelaySeconds: {{ .liveness.initialDelaySeconds }} + periodSeconds: {{ .liveness.periodSeconds }} + failureThreshold: {{ .liveness.failureThreshold }} startupProbe: httpGet: - path: {{ .Values.probes.startup.path }} + path: {{ .startup.path }} port: http - initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds }} - periodSeconds: {{ .Values.probes.startup.periodSeconds }} - failureThreshold: {{ .Values.probes.startup.failureThreshold }} + initialDelaySeconds: {{ .startup.initialDelaySeconds }} + periodSeconds: {{ .startup.periodSeconds }} + failureThreshold: {{ .startup.failureThreshold }} + {{- end }} {{- end }} diff --git a/demo-extended/values.schema.json b/demo-extended/values.schema.json index 2f2e54c..61e9f02 100644 --- a/demo-extended/values.schema.json +++ b/demo-extended/values.schema.json @@ -1,178 +1,162 @@ { + "title": "Values", + "type": "object", "properties": { "name": { - "type": "string", - "title": "Name", - "description": "Application name" + "description": "Application name", + "type": "string" }, "namespace": { - "type": "string", - "title": "Namespace", - "description": "Namespace for Application" + "description": "Kubernetes namespace", + "type": "string" }, "general": { + "description": "General configuration", "type": "object", - "title": "General", "properties": { "image": { - "title": "App image", - "type": "string", - "description": "Application image" + "description": "Container image", + "type": "string" }, "version": { - "title": "Image version", - "type": "string", - "description": "Image tag you want to deploy" + "description": "Container image version", + "type": "string" }, "environment": { - "title": "Environment variables", + "description": "Environment variables", "type": "object", - "description": "Set environment variables" + "additionalProperties": { + "type": "string" + } } }, "required": [ "image", "version" - ], - "order": [ - "image", - "version", - "environment" ] }, "scaling": { + "description": "Scaling configuration", "type": "object", - "title": "Scaling", "properties": { "replicas": { - "title": "Replicas", - "type": "integer", - "description": "Number of instances you want to deploy", - "minimum": 0 + "description": "Number of replicas", + "type": "integer" }, "resources": { + "description": "Resource limits and requests", "type": "object", - "title": "Resources", "properties": { "cpu": { - "title": "CPUs", - "type": "integer", - "description": "Number of CPUs your applications needs" + "description": "CPU resource request", + "type": "string" }, "memory": { - "title": "Memory", - "description": "Measured in Gi", - "type": "integer" + "description": "Memory resource limit", + "type": "string" } }, - "order": [ - "cpu", - "memory" - ] + "additionalProperties": false } }, "required": [ "replicas" - ], - "order": [ - "replicas", - "resources" ] }, "probes": { + "description": "Probe configuration", "type": "object", - "title": "Probes", - "description": "Configuration for container probes", "properties": { "enabled": { - "title": "Enabled", - "type": "boolean", - "default": true, - "description": "Toggle to enable or disable all probes" + "description": "Enable probes", + "type": "boolean" }, "startup": { - "title": "Startup Probe", + "description": "Startup probe configuration", "type": "object", - "description": "Configuration for the startup probe", "properties": { "path": { - "title": "Path for probe", - "type": "string", - "description": "The endpoint to probe for startup readiness" + "description": "HTTP path for probe", + "type": "string" }, "initialDelaySeconds": { - "title": "Initial Delay Seconds", - "type": "integer", - "description": "The number of seconds to wait before performing the first probe" + "description": "Initial delay for probe", + "type": "integer" }, "periodSeconds": { - "title": "Period Seconds", - "type": "integer", - "description": "The number of seconds between each probe" + "description": "Period for probe", + "type": "integer" }, "failureThreshold": { - "title": "Failure Threshold", - "type": "integer", - "description": "The number of consecutive failures required to consider the probe as failed" + "description": "Failure threshold for probe", + "type": "integer" } - } + }, + "required": [ + "path", + "initialDelaySeconds", + "periodSeconds", + "failureThreshold" + ] }, "liveness": { - "title": "Liveness Probe", + "description": "Liveness probe configuration", "type": "object", - "description": "Configuration for the liveness probe", "properties": { "path": { - "title": "Path for probe", - "type": "string", - "description": "The endpoint to probe for liveness" + "description": "HTTP path for probe", + "type": "string" }, "initialDelaySeconds": { - "title": "Initial Delay Seconds", - "type": "integer", - "description": "The number of seconds to wait before performing the first probe" + "description": "Initial delay for probe", + "type": "integer" }, "periodSeconds": { - "title": "Period Seconds", - "type": "integer", - "description": "The number of seconds between each probe" + "description": "Period for probe", + "type": "integer" }, "failureThreshold": { - "title": "Failure Threshold", - "type": "integer", - "description": "The number of consecutive failures required to consider the probe as failed" + "description": "Failure threshold for probe", + "type": "integer" } - } + }, + "required": [ + "path", + "initialDelaySeconds", + "periodSeconds", + "failureThreshold" + ] }, "readiness": { - "title": "Readiness Probe", + "description": "Readiness probe configuration", "type": "object", - "description": "Configuration for the readiness probe", "properties": { "path": { - "title": "Path for probe", - "type": "string", - "description": "The endpoint to probe for readiness" + "description": "HTTP path for probe", + "type": "string" }, "initialDelaySeconds": { - "title": "Initial Delay Seconds", - "type": "integer", - "description": "The number of seconds to wait before performing the first probe" + "description": "Initial delay for probe", + "type": "integer" }, "periodSeconds": { - "title": "Period Seconds", - "type": "integer", - "description": "The number of seconds between each probe" + "description": "Period for probe", + "type": "integer" }, "failureThreshold": { - "title": "Failure Threshold", - "type": "integer", - "description": "The number of consecutive failures required to consider the probe as failed" + "description": "Failure threshold for probe", + "type": "integer" } - } + }, + "required": [ + "path", + "initialDelaySeconds", + "periodSeconds", + "failureThreshold" + ] } }, - "order": [ + "required": [ "enabled", "startup", "liveness", @@ -180,29 +164,24 @@ ] }, "networking": { + "description": "Networking configuration", "type": "object", - "title": "Networking", "properties": { "expose": { - "title": "Expose", - "type": "boolean", - "description": "Create a Service for your application" + "description": "Expose container port", + "type": "boolean" }, "port": { - "title": "Port", - "type": "integer", - "description": "Port to expose for your application" + "description": "Container port", + "type": "integer" } }, - "order": [ + "required": [ "expose", "port" ] } }, - "required": [ - "name" - ], "order": [ "name", "namespace", @@ -211,6 +190,12 @@ "probes", "networking" ], - "title": "Values", - "type": "object" + "required": [ + "name", + "namespace", + "general", + "scaling", + "probes", + "networking" + ] } diff --git a/demo-extended/values.yaml b/demo-extended/values.yaml index ad0688b..5745bfb 100644 --- a/demo-extended/values.yaml +++ b/demo-extended/values.yaml @@ -5,13 +5,11 @@ general: version: 1.14.2 environment: ENVIRONMENT: production - scaling: replicas: 3 resources: cpu: 1 memory: 512 - probes: enabled: true startup: @@ -29,7 +27,6 @@ probes: initialDelaySeconds: 5 periodSeconds: 10 failureThreshold: 3 - networking: expose: true port: 8080