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

[GCLB] Gracefully handle lack of IAM rights for modifying firewall #1484

Closed
wants to merge 1 commit into from

Conversation

nicksardo
Copy link
Contributor

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 6, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 6, 2017
type FirewallSyncError struct {
Internal error
Message string
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if you have any better ideas on how this error should look.

Copy link
Contributor

Choose a reason for hiding this comment

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

lgtm

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 43.987% when pulling c968e75 on nicksardo:alt-xpn-firewall into 51248f8 on kubernetes:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 43.945% when pulling c968e75 on nicksardo:alt-xpn-firewall into 51248f8 on kubernetes:master.

} else if utils.IsForbiddenError(err) && fr.cloud.OnXPN() {
gcloudCmd := gce.FirewallToGCloudDeleteCmd(name, fr.cloud.NetworkProjectID())
glog.V(3).Infof("Could not attempt delete of L7 firewall on XPN cluster. %q needs to be ran.", gcloudCmd)
// FirewallXPN error is not returned here because there is no ingress for attaching.
Copy link
Contributor

Choose a reason for hiding this comment

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

It should return an error irrespective? The caller knows that there is no ingress and hence it will just log it

type FirewallSyncError struct {
Internal error
Message string
}
Copy link
Contributor

Choose a reason for hiding this comment

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

lgtm

NetworkURL() string
OnXPN() bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment saying this will return true if XPN is enabled in GCP project.
optional: Probably also link to some XPN documentation?

@nikhiljindal
Copy link
Contributor

Thanks this looks a lot cleaner now!

minor comments. mostly looks good

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a061b2f on nicksardo:alt-xpn-firewall into ** on kubernetes:master**.

@nicksardo
Copy link
Contributor Author

Moving to new repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants