Helm test only pod should be ignored
See original GitHub issueDescription of the bug:
When using the Helm
construct to load a helm chart, the generated k8s yaml file contains pod that is test only. According to helm doc https://helm.sh/docs/topics/charts_hooks/ , those are only used when run helm test
. The Helm
construct should ignore it.
Reproduction Steps:
One helm chart can be used to reproduce is
- name: elasticsearch
repository: https://helm.elastic.co
version: 7.6.2
condition: elasticsearch.enabled
The final k8s yaml file will contain something like this when it should not
apiVersion: "v1"
kind: "Pod"
metadata:
annotations:
helm.sh/hook: "test-success"
name: "temporal-fjobr-test"
spec:
containers:
- command:
- "sh"
- "-c"
- "#!/usr/bin/env bash -e
curl -XGET --fail
'elasticsearch-master:9200/_cluster/health?wait_for_status=green&time\
out=1s'\n"
image: "docker.elastic.co/elasticsearch/elasticsearch:7.10.1"
name: "temporal-yuizz-test"
restartPolicy: "Never"
Error Log:
After kubectl apply
you will see this
temporal-fjobr-test 0/1 Error 0 33s
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
[Proposal] helm test should perform automatic cleanup (pre ...
Currently, executing the helm test command runs a number of defined test pods and returns while not removing any of those pods.
Read more >Should helm test pod be a "full copy" of production pod?
My question is regarding Helm tests and their basic philosophy. The simple question is, should the helm test pod be a "full copy"...
Read more >The .helmignore file - Helm
helmignore file is used to specify files you don't want to include in your helm chart. If this file exists, the helm package...
Read more >13 Best Practices for using Helm - Coder Society
Helm is an indispensable tool for deploying applications to Kubernetes clusters. But it is only by following best practices that you'll ...
Read more >Taints and Tolerations | Kubernetes
if there is at least one un-ignored taint with effect NoSchedule then Kubernetes will not schedule the pod onto that node ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I confirm --skip-tests works. Need to have helm version >= 3.5
@mbonig Elasticsearch is the only chart I encountered doing this but any helm chart with test pods will encounter this.
I’ll try the
helmFlags
property. Thank you very much!