Skip to content
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 the ability to ignore cluster scoped resources. #187

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

knutejohKLP
Copy link
Contributor

These resources will generally be handled seperatly in a multitenant enviornment. This also gives the ability to control where the service account can create the configmaps, as clusterwide read/write on configmaps could be to broad access for security reasons.

Signed-off-by: Knut-Erik Johnsen knut-erik.johnsen@klp.no

@jetstack-bot jetstack-bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label Dec 20, 2022
@jetstack-bot
Copy link
Contributor

Hi @knutejohKLP. Thanks for your PR.

I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@jetstack-bot jetstack-bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 20, 2022
@knutejohKLP
Copy link
Contributor Author

/cc @JoshVanL

@jetstack-bot jetstack-bot added dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. and removed dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Feb 19, 2023
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: knutejohKLP
To complete the pull request process, please assign joshvanl after the PR has been reviewed.
You can assign the PR to them by writing /assign @joshvanl in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knutejohKLP knutejohKLP force-pushed the feature/ignore-cluster-resources branch from 47091c4 to 7c07ce2 Compare February 19, 2023 22:28
@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. and removed dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels Feb 19, 2023
…ill generally be handled seperatly in a multitenant enviornment.

Signed-off-by: Knut-Erik Johnsen <knut-erik.johnsen@klp.no>
@knutejohKLP knutejohKLP force-pushed the feature/ignore-cluster-resources branch from 7c07ce2 to 0b98cb1 Compare February 19, 2023 22:29
Signed-off-by: Knut-Erik Johnsen <knut-erik.johnsen@klp.no>
@knutejohKLP
Copy link
Contributor Author

knutejohKLP commented Feb 20, 2023

/cc @SgtCoDFish

@SgtCoDFish
Copy link
Member

/ok-to-test

@jetstack-bot jetstack-bot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 20, 2023
@SgtCoDFish
Copy link
Member

Hey, I'm sorry but I don't have the bandwidth to review this right now. I'll raise it with the other maintainers and hopefully someone can take a look!

@@ -21,3 +22,4 @@ rules:
- "tokenreviews"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually work? istio-csr requires the ability to perform a TokenReview... so by not granting this permission, it surely won't be able to do anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here is that the deployments on the cluster level, the role and the rolebinding, could be handled outside of this deployment. We are running multiple deployments of istio and istio-csr in our clusters, but these resources can only be set once, so we can't use the helmtemplates as they are right now. For a single deployment, this should always be created, which is why the default is false on the setting.

@@ -1,3 +1,4 @@
{{- if not .Values.ignoreClusterResources }}
kind: ClusterRole
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this namespaced approach, you are still going to need to grant these permissions on a per namespace basis right? So keeping this ClusterRole would allow users to create namespace-scoped RoleBindings in each namespace that they want enabling for istio-csr use.

Is there a reason to not deploy the ClusterRole? Otherwise this will lead to 1) duplicated resources (everyone needs to create a RoleBinding in every namespace) and 2) uncertainty, as users won't know what permissions to grant in those Roles.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we leave the clusterrole, we can't use the helm charts for more than one deployment, as they will get the same name. The deployments will complain about resources that already exists. The idea is that anything on the clusterlevel is handled outside of this helm chart when running in a multitenant setup. and that the helm charts focus on a single namespace.

@knutejohKLP
Copy link
Contributor Author

Any more feedback on this issue?

@inteon
Copy link
Member

inteon commented Jan 8, 2024

/retest

@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 26, 2024
@jetstack-bot
Copy link
Contributor

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.

@jetstack-bot
Copy link
Contributor

@knutejohKLP: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cert-manager-istio-csr-k8s-v1-26-istio-v1-19 d69cf93 link true /test pull-cert-manager-istio-csr-k8s-v1-26-istio-v1-19
pull-cert-manager-istio-csr-k8s-v1-29-istio-v1-20 d69cf93 link true /test pull-cert-manager-istio-csr-k8s-v1-29-istio-v1-20
pull-cert-manager-istio-csr-k8s-v1-26-istio-v1-18 d69cf93 link true /test pull-cert-manager-istio-csr-k8s-v1-26-istio-v1-18
pull-cert-manager-istio-csr-test-ecc d69cf93 link true /test pull-cert-manager-istio-csr-test-ecc

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants