-
Notifications
You must be signed in to change notification settings - Fork 776
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
Workaround helm template bug when testing for APIVersions #1533
Workaround helm template bug when testing for APIVersions #1533
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1533 +/- ##
==========================================
- Coverage 53.35% 53.25% -0.11%
==========================================
Files 84 84
Lines 7547 7547
==========================================
- Hits 4027 4019 -8
- Misses 3163 3168 +5
- Partials 357 360 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
5c8ca7b
to
5f7f16d
Compare
Signed-off-by: Mathieu Parent <[email protected]>
5f7f16d
to
562342f
Compare
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.
This fixed it for my installation to a Kubernetes 1.20 cluster.
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.
LGTM, thanks for the fix!
for reference, the whole picture is at argoproj/argo-cd#7291. |
What this PR does / why we need it:
#1502 broke gatekeeper installation with ArgoCD.
The reason is ArgoCD is using
helm template
command, passing all supported APIVersions, but Helm pre-fill this with the supported versions of the Kubernetes used during helm build (i.e. k8s 1.21).There are a few related bug reports like in argoproj/argo-cd#6351, argoproj/argo-cd#3594.
This PR change the behavior to match on exact resource type, as Helm is not pre-filling those.
Other possible workarounds include:
{{- if .Capabilities.APIVersions.Has "policy/v1beta1" }}
(will still raise deprecation warnings)Side node:
The behavior of
helm template
should also be fixed when--api-version
is passed.