-
Notifications
You must be signed in to change notification settings - Fork 112
Don't error out if top level configs do not exist #86
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
Conversation
When either or both the OAuth and Authentication objects is not found, don't fail and assume the defaults.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: stlaz The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold Let me update #65 so the approach I want to take here will become more clear. |
| return nil, err | ||
| } | ||
| // did not find the object, use default | ||
| auth = defaultAuthenticationConfig() |
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 think you need to create the default object (before attempting to update it's status 🙂 )
| return nil, nil, nil, err | ||
| } | ||
| // did not find the object, use default | ||
| oauthConfig = defaultOAuthConfig() |
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.
same comment.
| }, | ||
| Spec: configv1.OAuthSpec{ | ||
| TokenConfig: configv1.TokenConfig{ | ||
| AccessTokenMaxAgeSeconds: 86400, |
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.
nit: make a const, add comment about how long this is.
|
@stlaz: PR needs rebase. DetailsInstructions 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. |
When either or both the OAuth and Authentication objects is not found,
don't fail and assume the defaults.
The operator's config itself is handled in #65