Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(charts): flags to control the helm test templates on/off #241

Merged
merged 1 commit into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/daemonset-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: daemonset-app
description: Default DaemonSet Helm Chart
type: application
version: 0.12.1
version: 0.13.0
appVersion: latest
maintainers:
- name: diranged
Expand Down
2 changes: 1 addition & 1 deletion charts/daemonset-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Default DaemonSet Helm Chart

![Version: 0.12.1](https://img.shields.io/badge/Version-0.12.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 0.13.0](https://img.shields.io/badge/Version-0.13.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
[hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Expand Down
3 changes: 2 additions & 1 deletion charts/daemonset-app/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.tests.connection.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand Down Expand Up @@ -28,4 +29,4 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.hostIP

{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.ports .Values.service.enabled }}
{{- if and .Values.ports .Values.service.enabled .Values.tests.svcConnection.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand Down
6 changes: 6 additions & 0 deletions charts/daemonset-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ prometheusRules:

tests:
connection:
# -- Controls whether or not this Helm test component is enabled.
enabled: true

# -- The command used to trigger the test.
command: [curl, --verbose, --retry-connrefused, --retry, '5', --retry-delay, '10']
# -- A list of arguments passed into the command. These are run through the tpl function.
Expand All @@ -527,6 +530,9 @@ tests:
# Identical to above, but used to test the `Service` endpoint rather than
# pointing to the HOST_IP.
svcConnection:
# -- Controls whether or not this Helm test component is enabled.
enabled: true

# -- The command used to trigger the test.
command: [curl, --verbose, --retry-connrefused, --retry, '5', --retry-delay, '10']
# -- A list of arguments passed into the command. These are run through the tpl function.
Expand Down
2 changes: 1 addition & 1 deletion charts/rollout-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: rollout-app
description: Argo Rollout-based Application Helm Chart
type: application
version: 0.4.1
version: 0.5.0
appVersion: latest
maintainers:
- name: diranged
Expand Down
3 changes: 2 additions & 1 deletion charts/rollout-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Argo Rollout-based Application Helm Chart

![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[analysistemplate]: https://argoproj.github.io/argo-rollouts/features/analysis/?query=AnalysisTemplate#background-analysis
[argo_rollouts]: https://argoproj.github.io/argo-rollouts/
Expand Down Expand Up @@ -309,6 +309,7 @@ kmsSecretsRegion: us-west-2 (AWS region where the KMS key is located)
| terminationGracePeriodSeconds | string | `nil` | https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution |
| tests.connection.args | list | `["{{ include \"nd-common.fullname\" . }}"]` | A list of arguments passed into the command. These are run through the tpl function. |
| tests.connection.command | list | `["curl","--retry-connrefused","--retry","5"]` | The command used to trigger the test. |
| tests.connection.enabled | bool | `true` | Controls whether or not this Helm test component is enabled. |
| tests.connection.image.repository | string | `"curlimages/curl"` | Sets the image-name that will be used in the "connection" integration test. If this is left empty, then the .image.repository value will be used instead (and the .image.tag will also be used). By default, prefer the latest official version to handle cases where the app image provides either no curl binary or an outdated one. |
| tests.connection.image.tag | string | `nil` | Sets the tag that will be used in the "connection" integration test. If this is left empty, the default is "latest" |
| tolerations | list | `[]` | |
Expand Down
2 changes: 2 additions & 0 deletions charts/rollout-app/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.tests.connection.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -23,3 +24,4 @@ spec:
{{- range $arg := index .Values.tests.connection.args }}
- {{ tpl $arg $global }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/rollout-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,9 @@ datadog:

tests:
connection:
# -- Controls whether or not this Helm test component is enabled.
enabled: true

# -- The command used to trigger the test.
command: ['curl', '--retry-connrefused', '--retry', '5']
# -- A list of arguments passed into the command. These are run through the tpl function.
Expand Down
2 changes: 1 addition & 1 deletion charts/simple-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: simple-app
description: Default Microservice Helm Chart
type: application
version: 1.3.1
version: 1.4.0
appVersion: latest
maintainers:
- name: diranged
Expand Down
3 changes: 2 additions & 1 deletion charts/simple-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Default Microservice Helm Chart

![Version: 1.3.1](https://img.shields.io/badge/Version-1.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 1.4.0](https://img.shields.io/badge/Version-1.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[deployments]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
[hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Expand Down Expand Up @@ -438,6 +438,7 @@ kmsSecretsRegion: us-west-2 (AWS region where the KMS key is located)
| terminationGracePeriodSeconds | string | `nil` | https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution |
| tests.connection.args | list | `["{{ include \"nd-common.fullname\" . }}"]` | A list of arguments passed into the command. These are run through the tpl function. |
| tests.connection.command | list | `["curl","--retry-connrefused","--retry","5"]` | The command used to trigger the test. |
| tests.connection.enabled | bool | `true` | Controls whether or not this Helm test component is enabled. |
| tests.connection.image.repository | string | `"curlimages/curl"` | Sets the image-name that will be used in the "connection" integration test. If this is left empty, then the .image.repository value will be used instead (and the .image.tag will also be used). By default, prefer the latest official version to handle cases where the app image provides either no curl binary or an outdated one. |
| tests.connection.image.tag | string | `nil` | Sets the tag that will be used in the "connection" integration test. If this is left empty, the default is "latest" |
| tolerations | list | `[]` | |
Expand Down
2 changes: 2 additions & 0 deletions charts/simple-app/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.tests.connection.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -23,3 +24,4 @@ spec:
{{- range $arg := index .Values.tests.connection.args }}
- {{ tpl $arg $global | quote }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/simple-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,9 @@ datadog:

tests:
connection:
# -- Controls whether or not this Helm test component is enabled.
enabled: true

# -- The command used to trigger the test.
command: ['curl', '--retry-connrefused', '--retry', '5']
# -- A list of arguments passed into the command. These are run through the tpl function.
Expand Down
2 changes: 1 addition & 1 deletion charts/stateful-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: stateful-app
description: Default StatefulSet Helm Chart
type: application
version: 0.13.1
version: 0.14.0
appVersion: latest
maintainers:
- name: diranged
Expand Down
3 changes: 2 additions & 1 deletion charts/stateful-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Default StatefulSet Helm Chart

![Version: 0.13.1](https://img.shields.io/badge/Version-0.13.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 0.14.0](https://img.shields.io/badge/Version-0.14.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

[statefulsets]: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
[hpa]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Expand Down Expand Up @@ -362,6 +362,7 @@ kmsSecretsRegion: us-west-2 (AWS region where the KMS key is located)
| terminationGracePeriodSeconds | string | `nil` | https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#hook-handler-execution |
| tests.connection.args | list | `["{{ include \"nd-common.fullname\" . }}"]` | A list of arguments passed into the command. These are run through the tpl function. |
| tests.connection.command | list | `["curl","--retry-connrefused","--retry","5"]` | The command used to trigger the test. |
| tests.connection.enabled | bool | `true` | Controls whether or not this Helm test component is enabled. |
| tests.connection.image.repository | string | `nil` | Sets the image-name that will be used in the "connection" integration test. If this is left empty, then the .image.repository value will be used instead (and the .image.tag will also be used). |
| tests.connection.image.tag | string | `nil` | Sets the tag that will be used in the "connection" integration test. If this is left empty, the default is "latest" |
| tolerations | list | `[]` | |
Expand Down
2 changes: 2 additions & 0 deletions charts/stateful-app/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.tests.connection.enabled }}
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -23,3 +24,4 @@ spec:
{{- range $arg := index .Values.tests.connection.args }}
- {{ tpl $arg $global }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/stateful-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ datadog:

tests:
connection:
# -- Controls whether or not this Helm test component is enabled.
enabled: true

# -- The command used to trigger the test.
command: ['curl', '--retry-connrefused', '--retry', '5']
# -- A list of arguments passed into the command. These are run through the tpl function.
Expand Down
Loading