From c8647519a278570af07b1fae8803f935a6ae997e Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Sun, 17 Jan 2021 19:36:16 +0500 Subject: [PATCH 1/2] Deployments only support Always restart policy for containers --- test/ix-chart/2012.0.0/README.md | 1 - test/ix-chart/2012.0.0/questions.yaml | 15 --------------- test/ix-chart/2012.0.0/templates/_workload.tpl | 2 +- test/ix-chart/2012.0.0/test_values.yaml | 1 - test/ix-chart/2012.0.0/values.yaml | 1 - 5 files changed, 1 insertion(+), 19 deletions(-) diff --git a/test/ix-chart/2012.0.0/README.md b/test/ix-chart/2012.0.0/README.md index e9cdf2092e..ed5e97a908 100644 --- a/test/ix-chart/2012.0.0/README.md +++ b/test/ix-chart/2012.0.0/README.md @@ -22,7 +22,6 @@ their default values. | `image.tag` | The image tag to pull from | `latest` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `updateStrategy` | Upgrade Policy | `RollingUpdate` | -| `restartPolicy` | Restart Policy for containers in workload | `Always` | | `jobRestartPolicy` | Restart Policy for job type workload ( only applicable if `workloadType` is `Job`/`CronJob` | `OnFailure` | | `containerCommand` | Commands to execute inside container overriding image CMD default | `null` | | `containerArgs` | Specify arguments for container command | `null` | diff --git a/test/ix-chart/2012.0.0/questions.yaml b/test/ix-chart/2012.0.0/questions.yaml index 15a5dc2a56..eff5c35cdd 100644 --- a/test/ix-chart/2012.0.0/questions.yaml +++ b/test/ix-chart/2012.0.0/questions.yaml @@ -99,21 +99,6 @@ questions: description: "Kill existing pods before creating new ones" # Restart Policy - - variable: restartPolicy - description: "Restart Policy for workload" - label: "Restart Policy" - group: "Restart Policy" - schema: - type: string - show_if: [["workloadType", "=", "Deployment"]] - default: "Always" - enum: - - value: "Always" - description: "Always restart containers in a pod if they exit" - - value: "OnFailure" - description: "Only restart containers if they exit with a failure" - - value: "Never" - description: "Never restart containers if they exit" - variable: jobRestartPolicy description: "Restart Policy for workload" label: "Restart Policy" diff --git a/test/ix-chart/2012.0.0/templates/_workload.tpl b/test/ix-chart/2012.0.0/templates/_workload.tpl index 14daccd9aa..344adeda74 100644 --- a/test/ix-chart/2012.0.0/templates/_workload.tpl +++ b/test/ix-chart/2012.0.0/templates/_workload.tpl @@ -39,7 +39,7 @@ Get Restart policy based on workload type */}} {{- define "restartPolicy" -}} {{- if eq (include "workloadIsDeployment" .) "true" }} -{{- printf "%s" .Values.restartPolicy }} +{{- print "Always" }} {{- else }} {{- printf "%s" .Values.jobRestartPolicy }} {{- end }} diff --git a/test/ix-chart/2012.0.0/test_values.yaml b/test/ix-chart/2012.0.0/test_values.yaml index 522688359d..6ba83274f8 100644 --- a/test/ix-chart/2012.0.0/test_values.yaml +++ b/test/ix-chart/2012.0.0/test_values.yaml @@ -7,7 +7,6 @@ image: tag: latest # Restart / Update policy -restartPolicy: Always updateStrategy: RollingUpdate # Container CMD / entrypoint diff --git a/test/ix-chart/2012.0.0/values.yaml b/test/ix-chart/2012.0.0/values.yaml index 8647639113..af4b34a1d5 100644 --- a/test/ix-chart/2012.0.0/values.yaml +++ b/test/ix-chart/2012.0.0/values.yaml @@ -7,7 +7,6 @@ image: tag: "latest" # Restart / Update policy -restartPolicy: Always updateStrategy: RollingUpdate # Container CMD / entrypoint From bb72611ca860dbf6ae80db21f2cf0502cd874fb7 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Sun, 17 Jan 2021 19:37:27 +0500 Subject: [PATCH 2/2] Update chart to 21.0.0 --- test/ix-chart/{2012.0.0 => 2101.0.0}/.helmignore | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/Chart.yaml | 2 +- test/ix-chart/{2012.0.0 => 2101.0.0}/README.md | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/app-readme.md | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/questions.yaml | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/templates/NOTES.txt | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_containers.tpl | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_helpers.tpl | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_networking.tpl | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_volumes.tpl | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_workload.tpl | 0 .../{2012.0.0 => 2101.0.0}/templates/external-interfaces.yaml | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/templates/service.yaml | 0 .../templates/tests/deployment-check.yaml | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/templates/workload.yaml | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/test_values.yaml | 0 test/ix-chart/{2012.0.0 => 2101.0.0}/values.yaml | 0 17 files changed, 1 insertion(+), 1 deletion(-) rename test/ix-chart/{2012.0.0 => 2101.0.0}/.helmignore (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/Chart.yaml (98%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/README.md (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/app-readme.md (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/questions.yaml (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/NOTES.txt (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_containers.tpl (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_helpers.tpl (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_networking.tpl (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_volumes.tpl (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/_workload.tpl (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/external-interfaces.yaml (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/service.yaml (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/tests/deployment-check.yaml (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/templates/workload.yaml (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/test_values.yaml (100%) rename test/ix-chart/{2012.0.0 => 2101.0.0}/values.yaml (100%) diff --git a/test/ix-chart/2012.0.0/.helmignore b/test/ix-chart/2101.0.0/.helmignore similarity index 100% rename from test/ix-chart/2012.0.0/.helmignore rename to test/ix-chart/2101.0.0/.helmignore diff --git a/test/ix-chart/2012.0.0/Chart.yaml b/test/ix-chart/2101.0.0/Chart.yaml similarity index 98% rename from test/ix-chart/2012.0.0/Chart.yaml rename to test/ix-chart/2101.0.0/Chart.yaml index 74f67019b7..3d45a108e3 100644 --- a/test/ix-chart/2012.0.0/Chart.yaml +++ b/test/ix-chart/2101.0.0/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: 2012.0.0 +version: 2101.0.0 # 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/test/ix-chart/2012.0.0/README.md b/test/ix-chart/2101.0.0/README.md similarity index 100% rename from test/ix-chart/2012.0.0/README.md rename to test/ix-chart/2101.0.0/README.md diff --git a/test/ix-chart/2012.0.0/app-readme.md b/test/ix-chart/2101.0.0/app-readme.md similarity index 100% rename from test/ix-chart/2012.0.0/app-readme.md rename to test/ix-chart/2101.0.0/app-readme.md diff --git a/test/ix-chart/2012.0.0/questions.yaml b/test/ix-chart/2101.0.0/questions.yaml similarity index 100% rename from test/ix-chart/2012.0.0/questions.yaml rename to test/ix-chart/2101.0.0/questions.yaml diff --git a/test/ix-chart/2012.0.0/templates/NOTES.txt b/test/ix-chart/2101.0.0/templates/NOTES.txt similarity index 100% rename from test/ix-chart/2012.0.0/templates/NOTES.txt rename to test/ix-chart/2101.0.0/templates/NOTES.txt diff --git a/test/ix-chart/2012.0.0/templates/_containers.tpl b/test/ix-chart/2101.0.0/templates/_containers.tpl similarity index 100% rename from test/ix-chart/2012.0.0/templates/_containers.tpl rename to test/ix-chart/2101.0.0/templates/_containers.tpl diff --git a/test/ix-chart/2012.0.0/templates/_helpers.tpl b/test/ix-chart/2101.0.0/templates/_helpers.tpl similarity index 100% rename from test/ix-chart/2012.0.0/templates/_helpers.tpl rename to test/ix-chart/2101.0.0/templates/_helpers.tpl diff --git a/test/ix-chart/2012.0.0/templates/_networking.tpl b/test/ix-chart/2101.0.0/templates/_networking.tpl similarity index 100% rename from test/ix-chart/2012.0.0/templates/_networking.tpl rename to test/ix-chart/2101.0.0/templates/_networking.tpl diff --git a/test/ix-chart/2012.0.0/templates/_volumes.tpl b/test/ix-chart/2101.0.0/templates/_volumes.tpl similarity index 100% rename from test/ix-chart/2012.0.0/templates/_volumes.tpl rename to test/ix-chart/2101.0.0/templates/_volumes.tpl diff --git a/test/ix-chart/2012.0.0/templates/_workload.tpl b/test/ix-chart/2101.0.0/templates/_workload.tpl similarity index 100% rename from test/ix-chart/2012.0.0/templates/_workload.tpl rename to test/ix-chart/2101.0.0/templates/_workload.tpl diff --git a/test/ix-chart/2012.0.0/templates/external-interfaces.yaml b/test/ix-chart/2101.0.0/templates/external-interfaces.yaml similarity index 100% rename from test/ix-chart/2012.0.0/templates/external-interfaces.yaml rename to test/ix-chart/2101.0.0/templates/external-interfaces.yaml diff --git a/test/ix-chart/2012.0.0/templates/service.yaml b/test/ix-chart/2101.0.0/templates/service.yaml similarity index 100% rename from test/ix-chart/2012.0.0/templates/service.yaml rename to test/ix-chart/2101.0.0/templates/service.yaml diff --git a/test/ix-chart/2012.0.0/templates/tests/deployment-check.yaml b/test/ix-chart/2101.0.0/templates/tests/deployment-check.yaml similarity index 100% rename from test/ix-chart/2012.0.0/templates/tests/deployment-check.yaml rename to test/ix-chart/2101.0.0/templates/tests/deployment-check.yaml diff --git a/test/ix-chart/2012.0.0/templates/workload.yaml b/test/ix-chart/2101.0.0/templates/workload.yaml similarity index 100% rename from test/ix-chart/2012.0.0/templates/workload.yaml rename to test/ix-chart/2101.0.0/templates/workload.yaml diff --git a/test/ix-chart/2012.0.0/test_values.yaml b/test/ix-chart/2101.0.0/test_values.yaml similarity index 100% rename from test/ix-chart/2012.0.0/test_values.yaml rename to test/ix-chart/2101.0.0/test_values.yaml diff --git a/test/ix-chart/2012.0.0/values.yaml b/test/ix-chart/2101.0.0/values.yaml similarity index 100% rename from test/ix-chart/2012.0.0/values.yaml rename to test/ix-chart/2101.0.0/values.yaml