-
Notifications
You must be signed in to change notification settings - Fork 554
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
Add psp rbac helm #279
Add psp rbac helm #279
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
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. I understand the commands that are listed here. |
Welcome @quizy101! |
Hi @quizy101. 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. |
492fd25
to
738a706
Compare
Hi all, what's the status of this PR? |
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: |
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.
namespace seems to be missing?
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.
Ah actually no. Helm just includes it if the value is empty.
/ok-to-test |
/retest |
@quizy101 - Any objection to pulling in the changes from this PR? - #288 |
/assign |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: quizy101 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
helm/Chart.yaml
Outdated
description: A Helm chart for AWS EFS CSI Driver | ||
version: 0.3.0 | ||
name: aws-efs-csi-driver | ||
version: 0.3.1 |
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.
Since values that used to work in the templates are no longer being used the version should go to 0.4.0 if the project isn't ready to move to 1.0.0
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 agree on changing to 0.4.0, it is a lot of changes, I don't think I can make the call to 1.0.0.
Create the name of the service account to use | ||
*/}} | ||
{{- define "aws-efs-csi-driver.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} |
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 believe this could just be default (ternary .Values.serviceAccount.create (include "aws-efs-csi-driver.fullname" .) "default") .Values.serviceAccount.name
but I haven't tested 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.
Looks like ternary is a helm3 supported function but not in helm2. Since the chart api version is still set to v1, it would cause some issues to change the chart to be only helm3 supported. As it is right now, the chart is compatible with helm2 and helm3.
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.
Helm 2 is no longer supported, even for security patches. Helm is strongly recommending migrating charts to helm 3 might be worth considering. If the owners weigh in on the namespace part maybe they would have an opinion about switching to only supporting helm 3
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 conflicted on how to proceed between helm2 and helm3. There are several parts that I am trying to address from the original chart that definitely help those that are still on helm2. I would propose that with this PR we get it to a stable helm2 supported version and maybe as a v1 the switch to helm3 happens going forward?
I'm open to whichever the maintainers would like to go with this but my original need was to get PSP and RBAC enabled on the chart. I'm also ok with doing the helm3 cutover PR later.
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 do not think it is important to continue supporting helm 2. I agree with you @quizy101 that it can be left as a follow-up PR/discussion though: if you don't need to take advantage of helm 3 features to achieve the goals of this PR then let's leave it for later.
If I understand correctly, we'll simply need to flip chart version to v2 to signal to users that our chart will only support helm v3 from then on.
To be totally clear, since #292 just merged, there is only one chart version in existence: 0.1.0. I want to next release a 0.2.0 with various fixes over the last few monnthsp, including this one if we can get it merged soon. Then 0.3.0 or 1.0.0 could become the helm3 cutoff.
helm/templates/daemonset.yaml
Outdated
@@ -3,7 +3,9 @@ kind: DaemonSet | |||
apiVersion: apps/v1 | |||
metadata: | |||
name: efs-csi-node | |||
namespace: kube-system | |||
namespace: {{ .Values.namespace }} |
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 am not sure about this project but in general you either hard code a namespace because it is required to run in a specific namespace or you leave it out completely and allow the user to decide which namespace is goes in based on the namespace flag with the helm command. I would generally not expect to have to set a value to control the namespace. Maybe an owner would weigh in on whether to leave it hardcoded or remove it in favor of typical helm behavior.
@d-nishi @leakingtapan @justinsb @jsafrane @wongma7 @nckturner @jqmichael
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 had trouble with this, originally I had removed the hardcoded namespace because I felt that it would be up to the individual who installed the driver where they would like it to do. The problem is that once I was OK to test, the tests assume the chart is installed in kube-system, so without a default namespace set, it installs in the default namespace and the tests fail. Wasn't sure what to do so I went with a middle approach.
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 haven't looked at these tests much but I think at least this helm install would need to change to have --namespace kube-system
added to it if the hard coded namespace were removed.
helm install aws-efs-csi-driver \ |
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.
Thanks for pointing that out, I changed the install to include the namespace and went back to my original commit with using the namespace from the release. e2e works perfectly now and this is the behavior that I would expect.
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 seems subject to a lot of debate. helm/helm#5465 I don't mind whether we hardcode the namespace or do this Release.namespace thing, as long as the helm install
in the test script AND the README work.
tolerations: | ||
- operator: Exists |
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.
Sorry, I didn't notice this before but with this being a daemonset it should probably have a default set of tolerations that will work in many cases. This toleration is one that tolerates any taint that exists. In the ebs project they kept this as a default with a boolean value to turn it on an off.
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 see the relevant PRs for that. I give way too much credit to the admin for how they want to configure their tolerations. I can move - operator: Exists
into values.yaml as the default for the chart, then the admin can configure it how they want later if they need to. This should keep the default behavior without the need of a bool.
|
||
imagePullSecrets: [] | ||
nameOverride: "" | ||
fullnameOverride: "" | ||
priorityClassName: system-node-critical |
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.
now that there is a controller component (the deployment in controller.yaml), probably need to prefix this with nodePriorityClassName
and also have `controllerPrijorityClassName?
description: A Helm chart for AWS EFS CSI Driver | ||
version: 0.3.0 | ||
name: aws-efs-csi-driver | ||
version: 0.4.0 |
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.
|
||
tolerations: [] | ||
|
||
affinity: {} | ||
|
||
node: |
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.
Let's keep this, continuing my comment above, since there is a controller component now we are going to need to separate node values from controller values.
# If not set and create is true, a name is generated using the fullname template | ||
name: "" | ||
|
||
rbac: |
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 should be named less ambiguously, it means the psp-related rbac, not the other rbac resopurces that are necessary for the driver to run
The merging of #274 has caused some conflict for this PR. I DON'T expect you to add all the same values you did for the node daemonset to the new controller deployment, but PR needs rebase and we now have to disambiguate values based on whehter they will touch the node daemonset or the controller deployment thanks, I'll try to get this in for the next helm release |
@quizy101: PR needs rebase. 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. |
Hey folks, any news solving these conflicts? |
Thank you @quizy101 for this very valuable PR! It would be so cool if you could review the changes and resolve the conflicts so the reviewers can push this forward, thank you very much! |
There are a few conflicting files at this point so it will take a moment to sort out but I would love to get this completed. Thanks @aquam8 for the poke. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. 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. |
Is this a bug fix or adding new feature?
New feature.
What is this PR about? / Why do we need it?
This was needed in my setup when our cluster required ServiceAccounts and a PodSecurityPolicy to allow access due to our restricted default PSP.
Added:
Configuration:
What testing is done?
Currently using in our own cluster.