Fix teleport-cluster chart service account logic causing ArgoCD deployments to fail#49066
Merged
Fix teleport-cluster chart service account logic causing ArgoCD deployments to fail#49066
teleport-cluster chart service account logic causing ArgoCD deployments to fail#49066Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
teleport-cluster chart service account logic causing ArgoCD deployments to fail
webvictim
approved these changes
Nov 15, 2024
| Create the name of the service account to use in the auth config check hook. | ||
|
|
||
| If the chart is creating service accounts, we know we can create new arbitrary service accounts. | ||
| We cannot reuse the same name as the deployment SA because the non-hook sevrice account might |
Contributor
There was a problem hiding this comment.
Suggested change
| We cannot reuse the same name as the deployment SA because the non-hook sevrice account might | |
| We cannot reuse the same name as the deployment SA because the non-hook service account might |
| Create the name of the service account to use in the proxy config check hook. | ||
|
|
||
| If the chart is creating service accounts, we know we can create new arbitrary service accounts. | ||
| We cannot reuse the same name as the deployment SA because the non-hook sevrice account might |
Contributor
There was a problem hiding this comment.
Suggested change
| We cannot reuse the same name as the deployment SA because the non-hook sevrice account might | |
| We cannot reuse the same name as the deployment SA because the non-hook service account might |
| value: helm-test-sa-hook | ||
|
|
||
| - it: should use serviceAccount.name for auth predeploy job SA when set in values | ||
| - it: should use serviceAccount.name for auth predeploy job SA when set in values and we're not cretaing SAs |
Contributor
There was a problem hiding this comment.
Suggested change
| - it: should use serviceAccount.name for auth predeploy job SA when set in values and we're not cretaing SAs | |
| - it: should use serviceAccount.name for auth predeploy job SA when set in values and we're not creating SAs |
| value: helm-test-sa-proxy-hook | ||
|
|
||
| - it: should use serviceAccount.name for proxy predeploy job SA when set in values | ||
| - it: should use serviceAccount.name for proxy predeploy job SA when set in values and we're not cretaing SAs |
Contributor
There was a problem hiding this comment.
Suggested change
| - it: should use serviceAccount.name for proxy predeploy job SA when set in values and we're not cretaing SAs | |
| - it: should use serviceAccount.name for proxy predeploy job SA when set in values and we're not creating SAs |
| {{- include "teleport-cluster.auth.serviceAccountName" . -}} | ||
| {{- if .Values.serviceAccount.create -}} | ||
| -hook | ||
| {{- end}} |
Contributor
There was a problem hiding this comment.
Suggested change
| {{- end}} | |
| {{- end }} |
Just for consistency with all other usage.
| {{- include "teleport-cluster.proxy.serviceAccountName" . -}} | ||
| {{- if .Values.serviceAccount.create -}} | ||
| -hook | ||
| {{- end}} |
Contributor
There was a problem hiding this comment.
Suggested change
| {{- end}} | |
| {{- end }} |
Just for consistency with all other usage.
r0mant
approved these changes
Nov 15, 2024
|
@hugoShaka See the table below for backport results.
|
This was referenced Nov 15, 2024
Merged
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #48976
This PR's logic is a bit tricky because:
serviceAccount.create: false(so we can't introduce new SAs for them)serviceAccount.create: truebecause Argo's hook implementation differs from the Helm one and we can't have nice things.This PR also ensure the hook SAs are not created when the user sets
validateConfigOnDeploy: false.Changelog: Fix a bug in the
teleport-clusterHelm chart that can cause token mount to fail when using ArgoCD.Changelog: Fix a bug in the
teleport-clusterHelm chart that caused hook service accounts to get deployed even whenvalidateConfigOnDeploywasfalse.