-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add Authentication and OAuth crds #948
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
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sallyom If they are not already assigned, you can assign the PR to them by writing 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 |
0731c82 to
63d511d
Compare
|
why am i seeing these changes https://github.com/openshift/installer/pull/948/files#diff-6883245a42348c108776e47496bbf7c7 |
staebler
left a comment
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.
Comments in pkg/asset/manifests/authentication.go apply to pkg/asset/manifests/oauth.go as well.
See #943 for a discussion about whether these manifests should be written out by the manifest-templates target.
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.
Better error message.
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.
done
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.
Wrap error in a meaningful message.
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.
done
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 asset should not be loadable. Its files will be loaded by the Common Manifests asset. For more context, see #877.
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.
👍 got it, thanks
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.
Remove this field. It is not needed.
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.
done
|
@abhinavdahiya |
@sallyom It looks like the result of running |
the seem formatting changes... maybe |
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.
Set spec.subresources.status to the empty object for both resources.
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.
done
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.
All we need for this is:
configv1.Authentication{
TypeMeta: metav1.TypeMeta{
Kind: "Authentication",
APIVersion: configv1.GroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Name: "cluster",
},
}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.
done
pkg/asset/manifests/oauth.go
Outdated
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.
configv1.OAuth{
TypeMeta: metav1.TypeMeta{
Kind: "OAuth",
APIVersion: configv1.GroupVersion.String(),
},
ObjectMeta: metav1.ObjectMeta{
Name: "cluster",
},
Spec: configv1.OAuthSpec{
TokenConfig: configv1.TokenConfig{
AuthorizeTokenMaxAgeSeconds: 5 * 60, // 5 minutes
AccessTokenMaxAgeSeconds: 24 * 60 * 60, // 1 day
},
},
}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.
done
|
@abhinavdahiya @staebler yes, was gofmt, duh! I was wondering why |
ae9f7b9 to
e8f0993
Compare
e8f0993 to
23ff464
Compare
|
@enj from cluster installed w/ this PR: and |
|
@staebler addressed your feedback, thanks! |
|
Why does the installer need to be involved here? These look like static objects that could be injected following the standard approach. |
@wking we have a unusual situation that we need to kick loose. Our operators are based on binaries, but our configuration is explicitly built to group features not binaries. This makes it easy for admins to describe a unified configuration without worrying about a deployment topology, but it leaves us in a spot where there isn't an obvious owning operator to produce the CRDs themselves. In addition, this feature based configuration is logically an object that cluster-admins will want access to when they render out from the installer. I suspect that long term we will produce a "fake" operator that's only job is to provide CRD manifests for rending. The one that occurs to me is cluster-bootstrap (bootkube replacement), but the parallel efforts have not met. That would give you a CRD resource, but not the CR, which I think would be cleaner to render from the installer itself because it would never be later produced or managed by any component we have. |
|
/test e2e-aws |
Putting these under a parent operator makes sense to me.
When the CVO rolls out an update, will it push out updated objects from cluster-boptstrap's
Anything injected only by the installer will make 3.x -> 4 transition more complicated. Why can't the CRD-managine operator set the default, tell the CVO it's happy, and exit? |
|
I agree with @wking. I don't think this approach makes sense. The purpose of the operator-driven architecture is specifically to decouple components into individual control loops focusing on specific concerns. This is important for automatic updates, faster development by teams, more resilient clusters, etc.
Operators do need to be installed, upgraded, scaled. To automate that process, I'd prefer creating an abstraction to represent the operators (ideally the same resource types for all operators, like ClusterOperators or ClusterServiceVersions). Then a meta-operator can react to changes to desired operator state and such. |
|
closing, in favor of this: openshift/cluster-authentication-operator#7 |
This PR adds CRDs for Authentication and OAuth and a default CR for each.
@enj