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
Refactor the GSuite Reconciler #3407
Conversation
@upodroid: GitHub didn't allow me to request PR reviews from the following users: evankanderson. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
|
Welcome @upodroid! |
Hi @upodroid. Thanks for your PR. I'm waiting for a kubernetes 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. |
/assign @cblecker |
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.
A few cleanup comments -- a couple are musings on the code that should at most result in a TODO rather than any actual code changes.
I'm also suggesting you walk back a few of the code changes, because the validation seems Kubernetes-specific enough that it's not worth trying to make it generic right now (and we can always figure out how to do that in the future if someone ends up wanting something similar).
} | ||
|
||
PrintConfig(config) | ||
err = restrictionsConfig.Load(config.RestrictionsPath) |
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's odd that there is a restrictions-path
flag, but it's not used here.
Should config
be used to specify these values for the validate
command, or should the plan
and apply
commands consider the restrictions-path
flag?
I'm concerned that having two different ways to load this will cause someone to call validate
with different settings that will actually be used for apply
, and they will think that they are doing something valid and safe when they actually aren't.
log.Fatal(err) | ||
} | ||
|
||
err = groupsConfig.Load(config.GroupsPath, &restrictionsConfig) |
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.
Ditto with groups-path
.
for _, g := range cfg.Groups { | ||
if g.EmailId == "gke-security-groups@kubernetes.io" { | ||
for _, g := range groupsConfig.Groups { | ||
if g.EmailId == "gke-security-groups@"+primaryDomain { |
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 not sure swapping this for primaryDomain
helps much in terms of portability. I'd leave this as k8s-specific and just opt people out of this test.
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 is a useful for feature for anyone doing Google Groups RBAC for GKE. We'll be using this in Knative. In GSuite, there is a primary domain and secondary domains and key features are tied to the primary domain(item 0 in the list)
groups/validate.go
Outdated
} | ||
for email, found := range rbacEmails { | ||
if !found { | ||
t.Errorf("group '%s': must be a member of gke-security-groups@kubernetes.io", email) | ||
log.Printf("group '%s': must be a member of gke-security-groups@"+primaryDomain, email) |
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.
A 👎 on combining log.Printf
and string +
-- but I'd switch these back to @kubernetes.io
anyway.
/ok-to-test |
Forgot about this, will address the remaining feedback from Evan by tomorrow. |
CI failure fixed in #3495 |
e845219
to
7908ba4
Compare
nvm main.go has bad headers |
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 |
/remove-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. |
/reopen |
@upodroid: Reopened 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: upodroid 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 |
@upodroid: 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. |
let's close this for now. it's not getting eyes and it needs a rebase anyway as many things have changed. |
Fixes: #3356
There are a few prowjobs that need to be updated.
/cc @dims @evankanderson