From 6f480658ae39b4276f8579756788383a6d928014 Mon Sep 17 00:00:00 2001 From: adnan Date: Sun, 6 Aug 2023 15:19:53 +0200 Subject: [PATCH] update --- charts/helm-interface/Chart.yaml | 2 +- charts/helm-interface/templates/workloads.yaml | 8 ++++++-- examples/values-full.yaml | 5 +++-- examples/values-simple.yaml | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/charts/helm-interface/Chart.yaml b/charts/helm-interface/Chart.yaml index 107d1e6..3be15e5 100644 --- a/charts/helm-interface/Chart.yaml +++ b/charts/helm-interface/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.4 +version: 0.1.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/helm-interface/templates/workloads.yaml b/charts/helm-interface/templates/workloads.yaml index 89f2504..0a80a16 100644 --- a/charts/helm-interface/templates/workloads.yaml +++ b/charts/helm-interface/templates/workloads.yaml @@ -171,8 +171,9 @@ spec: {{- /* START SERVICE */}} {{- range .deployment.pod.containers }} {{- range .ports }} +{{- if and (hasKey . "service") }} +{{- if .service.enabled }} {{- $portName := default $defaultPortName .name }} -{{- if and (hasKey . "service") .service.enabled }} {{- $computedNameService := ternary $computedDeploymentName (printf "%s-%s" $computedDeploymentName .service.nameSuffix) (empty .service.nameSuffix) }} --- apiVersion: {{ default "v1" .service.apiVersion }} @@ -199,14 +200,16 @@ spec: {{- end }} {{- end }} {{- end }} +{{- end }} {{- /* END SERVICES */}} {{- /* START INGRESS */}} {{- range .deployment.pod.containers }} {{- range .ports }} +{{- if (hasKey . "ingress") }} +{{- if .ingress.enabled }} {{- $portName := default $defaultPortName .name }} {{- $portNumber := default .containerPort .service.port }} -{{- if and (hasKey . "ingress") .ingress.enabled }} {{- $computedNameIngress := ternary $computedDeploymentName (printf "%s-%s" $computedDeploymentName .ingress.nameSuffix) (empty .ingress.nameSuffix) }} {{- $computedNameService := ternary $computedDeploymentName (printf "%s-%s" $computedDeploymentName .service.nameSuffix) (empty .service.nameSuffix) }} --- @@ -253,6 +256,7 @@ spec: {{- end }} {{- end }} {{- end }} +{{- end }} {{- /* END INGRESS */}} {{- /* START HPA */}} diff --git a/examples/values-full.yaml b/examples/values-full.yaml index 3db1f59..2c9b9fb 100644 --- a/examples/values-full.yaml +++ b/examples/values-full.yaml @@ -35,7 +35,8 @@ defaults: # Deployments list including deployment, hpa, # service and ingress deployments: - - name: nginx + nginx: + name: nginx enabled: true deployment: enabled: true @@ -228,4 +229,4 @@ daemonsets: - name: nginx image: registry: nginx - tag: 1.14.2 \ No newline at end of file + tag: 1.14.2 diff --git a/examples/values-simple.yaml b/examples/values-simple.yaml index 68d3684..ab945c9 100644 --- a/examples/values-simple.yaml +++ b/examples/values-simple.yaml @@ -8,7 +8,8 @@ defaults: tag: latest workloads: - - name: nginx + nginx: + name: nginx enabled: true deployment: enabled: true