-
Notifications
You must be signed in to change notification settings - Fork 25
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
Bugfix/k8s context #324
Bugfix/k8s context #324
Conversation
|
||
def default_auth | ||
{ | ||
type: 'managaged' |
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.
managed was misspelled here. fixed in this pr.
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.
LGTM.
@treydock this is still open for review if you like. I think we're going to force folks to set |
@bin = options.fetch(:bin, '/usr/bin/kubectl') | ||
@cluster = options.fetch(:cluster, 'open-ondemand') | ||
@context = options.fetch(:context, nil) |
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.
@johrstrom Should this default to @cluster
to maintain past behavior? I think forcing a context makes sense since not having forced context can cause a lot of problems and lead to sites easily having weird behavior. If we don't force a context then this will require a Puppet change so OSC side doesn't break. It would still require a Puppet change to expose all options but not required if we have sane default.
Left one inline comment. One issue I see is you made using the context flag based on if context is set but we still call |
Also the K8 hooks don't appear to reference any kind of context. One hook just bootstraps RBAC resources and another sets the kubeconfig credentials which only needs the K8 Username so like |
So not sure I fully understand the rationale behind not setting context but I do understand not doing |
We're likely presenting something to SC about kuberenetes, so I want to get it all sorted out and documented by then. I keep thinking - we can't break something we've never documented. Seems like oidc needs Using a default across the board, I'm not sure about - I'm fairly sure gke sets programatically where you wouldn't know the context beforehand? I'm working on getting creds set back up for that. |
Fixes #227 . Users will now have to configure a context to get the
--context
flag. I'm wondering if we want to supply context = cluster if we're using OIDC? I'll have to check the hooks and what sort of assumptions we make if we're using OIDC.It's a little bigger of a change that I wanted, but here we are. This also fixes a few bugs that, were just there, I'll try to note them where I can.
The idea here is to get an OOD initializer to run this class method (which has tests).