-
Notifications
You must be signed in to change notification settings - Fork 523
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
chart: fix service account name #570
Conversation
Welcome @kd7lxl! |
Hi @kd7lxl. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/area helm |
@@ -38,7 +38,7 @@ spec: | |||
labels: | |||
component: scheduler | |||
spec: | |||
serviceAccountName: scheduler-plugins-scheduler | |||
serviceAccountName: {{ .Values.scheduler.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.
could you also update L18 to make controller's SA name parametrizable?
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.
Updated.
Strictly speaking, it's not a bug :) /remove-kind bug Could you also update the release-note section to:
|
@Huang-Wei: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
hi @kd7lxl, I have found some time to look into the PR, and I found that you use the could you please add a scheduler:
serviceAccount:
name: and later, we can raise another PR, or keep it in the one that would also be great, to implement the RBAC related in our chart. ref: https://helm.sh/docs/chart_best_practices/rbac/ WDYT @Huang-Wei |
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.
/kind feature
Sorry, I'm not sure what you're requesting. The chart already has RBAC, and already uses the parameterized name. That's why this was marked /kind bug. The names need to match everywhere for it to work. scheduler-plugins/manifests/install/charts/as-a-second-scheduler/templates/rbac.yaml Line 87 in ac60529
I would prefer to keep any enhancements, like the ability to customize the service account name separate from the deployment name, in a separate PR so that this one is limited to the bug fix. |
Oops, sorry for the mistake... what I say is that we should expose the rbac related in it's ok for this PR to go with the enhancement with this |
.github/workflows/chart.yaml
Outdated
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) |
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.
we may need to specify the --chart-dirs
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 set the default working-directory
to achieve this. Need to run it to know if it works this way. (The checkout docs say it checks out to $GITHUB_WORKSPACE
by default, not current working directory, so I expect it to work as-is as long as those docs are accurate.) Not sure how to trigger a test run in this project.
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.
why is there 2 empty default yaml?
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.
Oops, fixed.
I added a chart test with a test case for the name override feature that is currently broken in the default branch. If the test passes, we will know this PR fixes the problem. The test was implemented in Github Actions, and I'm not sure how to run it in this project. It appears the project does not yet utilize Github Actions, but from past experience, that's the easiest tool for implementing chart testing. Can someone help? |
Now it's running. Let's wait and see. |
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 file is empty, is it intended?
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.
Yes, it tells ct
to run a test case with the default values (no overrides).
.github/workflows/chart.yaml
Outdated
@@ -0,0 +1,48 @@ | |||
name: Lint and Test Chart |
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.
nit: maybe adding "helm" to it? like "Helm Chart Lint and Test"
Thanks @kd7lxl for the Helm testing bits. It runs successfully. To keep a linear git history, would you mind squashing the commits into two: one is core changes, the other for helm CI? |
Hmm, it looks like it ran, but skipped the test cases. Need to figure that out. |
maybe you need to define the output, and |
@kd7lxl if it's too much work, I'm fine with only focus on parameterize the service account in this PR, and follow up the CI bits in another PR. But it's up to you :) |
Sorry, was away from the computer for a few days. Squashed and rebased now to just the service account name fix. I'll open another PR to add chart tests. |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Huang-Wei, kd7lxl 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
The scheduler name, and subsequently the scheduler service account name can be configured by a value, but the deployment still referenced a hardcoded service account name. This resulted in the deployment failing whenever the scheduler name was overridden.
scheduler-plugins/manifests/install/charts/as-a-second-scheduler/templates/serviceaccount.yaml
Line 4 in ac60529
scheduler-plugins/manifests/install/charts/as-a-second-scheduler/templates/deployment.yaml
Line 41 in ac60529
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?