-
Notifications
You must be signed in to change notification settings - Fork 13
Add kubeconform verification of helm charts #280
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
Conversation
Signed-off-by: Ashley Davis <[email protected]>
## Verify that the Helm chart passes a strict check using kubeconform | ||
## @category [shared] Generate/ Verify | ||
verify-helm-kubeconform: $(helm_chart_archive) | $(NEEDS_KUBECONFORM) | ||
$(HELM) template kubeconform-template-do-not-use $< | $(KUBECONFORM) -strict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use? 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's the [NAME] of the chart:
helm template --help
helm template [NAME] [CHART]
So the rendered output will have the name kubeconform-template-do-not-use in it:
# Source: cert-manager-csi-driver-spiffe/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: default
labels:
app.kubernetes.io/name: cert-manager-csi-driver-spiffe
helm.sh/chart: cert-manager-csi-driver-spiffe-v0.0.0
app.kubernetes.io/instance: kubeconform-template-do-not-use <---------------
app.kubernetes.io/version: "v0.0.0"
app.kubernetes.io/managed-by: Helm
name: cert-manager-csi-driver-spiffe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to avoid anyone using that output for anything else - probably wouldn't happen, maybe more confusing than helpful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a bit confusing, but I understand it better now that you have explained it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand all of this, but I trust you to know what you are doing.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: erikgb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Haha we'll see if I do 😂 |
This catches the issue fixed by cert-manager/csi-driver-spiffe#284 - so it's probably a useful thing to have in the Helm module, globally.