-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix connect pod service account values when launcher is enabled #593
Conversation
@@ -77,7 +77,7 @@ spec: | |||
* https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-multiple-service-accounts | |||
*/}} | |||
{{- if and .Values.rbac.create .Values.launcher.enabled }} | |||
{{ $serviceAccountName := default (default .Values.rbac.serviceAccount.name .Values.pod.serviceAccountName) (include "rstudio-connect.fullname" .) }} |
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.
pod.serviceAccountName
is already fully deprecated
» helm template ./ --set pod.serviceAccountName=asdf
Error: execution error at (rstudio-connect/templates/NOTES.txt:55:4):
`pod.serviceAccountName` is no longer used. Use `rbac.serviceAccount.name` instead.
Use --debug flag to render out invalid YAML
Not immediately related to your PR itself - but it does feel like something in CI should have caught this, yeah? |
There are not many |
@jforest I'm not very familiar with |
I don't think so, I believe you can create a values file (ending in Could you merge main into this branch please? It should fix the linting error |
…o/helm into kegs-fix-launcher-service-account
That makes sense, seems like we have the install half but are missing the assertions. I believe we just need to write some tests that live in the https://helm.sh/docs/topics/chart_tests/ cc @plascaray
Done! |
@jforest would you mind taking another look at this CI failure? I pulled from main and the branch seems to have passed all the linting but it's failing to add the linting results to the PR with the following error:
|
Yah, I've got a test PR trying to fix this, I think I'm just going to pull out trying to post the output to the PR, it's causing more trouble than it's worth. People can just check the GHA output directly I'll let you know when I've gotten that merged to main so you can merge main again |
Thanks @jforest ! It's working now, would you mind reviewing/approving for infraops so we can get this fix released? |
@@ -1,7 +1,7 @@ | |||
{{- if and (.Values.rbac.create) (.Values.launcher.enabled) }} | |||
{{ $namespace := $.Release.Namespace }} | |||
{{ $targetNamespace := default $.Release.Namespace .Values.launcher.namespace }} | |||
{{ $serviceAccountName := default .Values.rbac.serviceAccount.name (include "rstudio-connect.fullname" .) }} | |||
{{ $serviceAccountName := default (include "rstudio-connect.fullname" .) .Values.rbac.serviceAccount.name }} |
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.
The changes of order here are just to ensure that if we have .Values.rbac.serviceAccount.name
set, it will override the default of rstudio-connect.fullname
?
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.
Yep, that's exactly right
Fixes #584
The connect pod service account values were being incorrectly applied when the job launcher is enabled. This PR fixes the Connect pod's serviceAccount value and removes some dead code.
Before:
After: