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

Make k8s permissions test optional #4618

Merged
merged 2 commits into from
Oct 23, 2020

Conversation

awly
Copy link
Contributor

@awly awly commented Oct 21, 2020

There are several legitimate cases where it can fail:

  • root proxy running inside k8s but without access to local k8s cluster
  • root proxy running with a dummy kubeconfig that we recommended in the
    past

Leave a ForwarderConfig flag to enforce this check, it will be useful in
kubernetes_service later that should always have the right permissions.

lib/kube/proxy/auth.go Outdated Show resolved Hide resolved
lib/kube/proxy/auth.go Outdated Show resolved Hide resolved
lib/kube/proxy/auth.go Outdated Show resolved Hide resolved
lib/kube/proxy/auth.go Outdated Show resolved Hide resolved
@awly awly force-pushed the andrew/kube_impersonation_check_optional branch 2 times, most recently from 0aa1913 to 7591d3c Compare October 22, 2020 17:15
@awly awly requested a review from webvictim October 22, 2020 17:15
@@ -91,6 +91,9 @@ type ForwarderConfig struct {
// PingPeriod is a period for sending ping messages on the incoming
// connection.
PingPeriod time.Duration
// StrictImpersonationCheck specifies whether to fail when impersonation
// permissions of this forwarder can't be tested.
StrictImpersonationCheck bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to set a default value for this somewhere?

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 default is the zero value (false).
This will only be set to true in the new kubernetes_service (when it's ready #4611).

Copy link
Contributor

@webvictim webvictim left a comment

Choose a reason for hiding this comment

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

LGTM

Andrew Lytvynov and others added 2 commits October 23, 2020 11:19
There are several legitimate cases where it can fail:
- root proxy running inside k8s but without access to local k8s cluster
- root proxy running with a dummy kubeconfig that we recommended in the
  past

Leave a ForwarderConfig flag to enforce this check, it will be useful in
kubernetes_service later that should always have the right permissions.
@awly awly force-pushed the andrew/kube_impersonation_check_optional branch from 7591d3c to bf28d8c Compare October 23, 2020 18:20
@awly awly merged commit f56014f into master Oct 23, 2020
@awly awly deleted the andrew/kube_impersonation_check_optional branch October 23, 2020 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants