-
Notifications
You must be signed in to change notification settings - Fork 1.5k
network: move from operator-specific CRD to cluster config #1013
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
network: move from operator-specific CRD to cluster config #1013
Conversation
squeed
commented
Jan 8, 2019
- Add the Network.config.openshift.io CRD
- Generate the network config from the install config
- Change the install config schema to match the cluster config
|
/hold |
|
@wking this is the replacement to that previous PR. |
8e703b2 to
d9f99e7
Compare
pkg/types/installconfig.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.
why is this not list of https://github.com/openshift/api/blob/master/config/v1/types_network.go#L58 ?
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.
Up to you. The cleanest would probably just be to use configv1.NetworkSpec directly. It depends on what you would like the installer to look like. Keep in mind that NetworkSpec may slowly change over time (additive only, of course).
|
@abhinavdahiya @wking ping on this. I'd like to resolve the discussion of embedding vs. copying the |
I am in favor of keeping them separate and derive Network.config.openshift.io from install-config parts. also I don't think we should expand clusternetwork to a list, that keeps the installation simple and defers to day-2 for customization. |
|
@abhinavdahiya we have to support multiple cidrs from day-1 - there are existing use-cases for it, and we don't yet support increasing them. I can update the PR to just copy the objects. |
+1 on clusternetwork being a list and also a installer type that converts to config.openshift.io type. |
|
@abhinavdahiya on it. Should I create a completely separate v1beta1 type for the beta1 -> beta2 migration, or just use optional fields? |
|
In order to avoid bumping the type, I'll split this in to two PRs. One that just creates the new operator type, and a later one that changes install config to what we'd prefer. |
d9f99e7 to
ea1aaa8
Compare
|
OK, this is updated. It doesn't change the serialized InstallConfig type (though it does change the go representation). Not using cluster.openshift.io is a bug, so this doesn't need an exception (I asked for one, and was told it's not necessary). @abhinavdahiya ptal, thanks! |
pkg/validate/validate.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.
can we keep some validations on allowed network types?
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.
Maybe. If users want to define their own networking (e.g. Calico), then they need to opt-out of the operator. However, there's still some value in them setting the network type to Calico and not None.
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.
We discussed this for a while when designing the API object and decided that all values are "allowed" for network type, just that the operator won't react to them.
pkg/asset/manifests/network.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.
/cc @staebler / @rajatchopra asked improvements to this on #943. the result looked like 696475e
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 can move the CRDs in to a separate template manifest... up to y'all.
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 get an impression from #943 that we do.
|
@crawford this is making changes to install-config go definition but i think it makes no change to the serialized form... so not sure where this falls on version change... ? |
|
/retest (it's a flake) |
|
/retest |
The serialized form is what we are versioning. If the changes are internal, we don't need to bump the version. |
ea1aaa8 to
54e076f
Compare
|
I think https://github.com/openshift/cluster-config-operator will help installer to remove all /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, squeed 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 cancel |
PodCIDR was removed in dafc79f (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift#1013).
Through da6d45b (Merge pull request openshift#890 from staebler/asset_loading_tests, 2019-02-04). Background for the networking.type validation entry is in this thread [1]. The OpenStack HAProxy entry has wording based on [2] and Russell's out-of-band suggestions. Forwarding static-pod longs to systemd is still in flight with [3]. [1]: openshift#1013 (comment) [2]: https://github.com/openshift/installer/pull/1185/files#r253714521 [3]: openshift/cluster-bootstrap#11
Through da6d45b (Merge pull request openshift#890 from staebler/asset_loading_tests, 2019-02-04). Background for the networking.type validation entry is in this thread [1]. The OpenStack HAProxy entry has wording based on [2] and Russell's out-of-band suggestions. Forwarding static-pod longs to systemd is still in flight with [3]. [1]: openshift#1013 (comment) [2]: https://github.com/openshift/installer/pull/1185/files#r253714521 [3]: openshift/cluster-bootstrap#11
Catching up with openshift/installer@dafc79f0 (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift/installer#1013) and openshift/installer@3b393da8 (pkg/types/aws/machinepool: Drop IAM-role overrides, 2019-01-30, openshift/installer#1154). The uint32 -> int32 cast is slightly dangerous, because it will silently wrap overflowing values [1,2]. But I'll try and get the installer updated to use unsigned types as well, and then we won't have to worry about converting. [1]: golang/go#19624 [2]: golang/go#30209
Catching up with openshift/installer@dafc79f0 (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift/installer#1013) and openshift/installer@3b393da8 (pkg/types/aws/machinepool: Drop IAM-role overrides, 2019-01-30, openshift/installer#1154). The uint32 -> int32 cast is slightly dangerous, because it will silently wrap overflowing values [1,2]. But I'll try and get the installer updated to use unsigned types as well, and then we won't have to worry about converting. [1]: golang/go#19624 [2]: golang/go#30209
Catching up with openshift/installer@dafc79f0 (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift/installer#1013), openshift/installer@3b393da8 (pkg/types/aws/machinepool: Drop IAM-role overrides, 2019-01-30, openshift/installer#1154), and openshift/installer@9ad20c35 (pkg/destroy/aws: Remove ClusterName consumer, 2019-01-31, openshift/installer#1170). The uint32 -> int32 cast is slightly dangerous, because it will silently wrap overflowing values [1,2]. But I'll try and get the installer updated to use unsigned types as well, and then we won't have to worry about converting. [1]: golang/go#19624 [2]: golang/go#30209
Catching up with openshift/installer@dafc79f0 (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift/installer#1013), openshift/installer@3b393da8 (pkg/types/aws/machinepool: Drop IAM-role overrides, 2019-01-30, openshift/installer#1154), and openshift/installer@9ad20c35 (pkg/destroy/aws: Remove ClusterName consumer, 2019-01-31, openshift/installer#1170). The uint32 -> int32 cast is slightly dangerous, because it will silently wrap overflowing values [1,2]. But I'll try and get the installer updated to use unsigned types as well, and then we won't have to worry about converting. [1]: golang/go#19624 [2]: golang/go#30209
Catching up with openshift/installer@dafc79f0 (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift/installer#1013), openshift/installer@3b393da8 (pkg/types/aws/machinepool: Drop IAM-role overrides, 2019-01-30, openshift/installer#1154), and openshift/installer@9ad20c35 (pkg/destroy/aws: Remove ClusterName consumer, 2019-01-31, openshift/installer#1170). The uint32 -> int32 cast is slightly dangerous, because it will silently wrap overflowing values [1,2]. But I'll try and get the installer updated to use unsigned types as well, and then we won't have to worry about converting. [1]: golang/go#19624 [2]: golang/go#30209
Catching up with openshift/installer@dafc79f0 (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift/installer#1013), openshift/installer@3b393da8 (pkg/types/aws/machinepool: Drop IAM-role overrides, 2019-01-30, openshift/installer#1154), and openshift/installer@9ad20c35 (pkg/destroy/aws: Remove ClusterName consumer, 2019-01-31, openshift/installer#1170). The uint32 -> int32 cast is slightly dangerous, because it will silently wrap overflowing values [1,2]. But I'll try and get the installer updated to use unsigned types as well, and then we won't have to worry about converting. [1]: golang/go#19624 [2]: golang/go#30209
Catching up with openshift/installer@dafc79f0 (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift/installer#1013), openshift/installer@3b393da8 (pkg/types/aws/machinepool: Drop IAM-role overrides, 2019-01-30, openshift/installer#1154), and openshift/installer@9ad20c35 (pkg/destroy/aws: Remove ClusterName consumer, 2019-01-31, openshift/installer#1170). The uint32 -> int32 cast is slightly dangerous, because it will silently wrap overflowing values [1,2]. But I'll try and get the installer updated to use unsigned types as well, and then we won't have to worry about converting. [1]: golang/go#19624 [2]: golang/go#30209
Catching up with openshift/installer@dafc79f0 (Generate Network.cluster config instead of NetworkConfig.networkoperator, 2019-01-15, openshift/installer#1013), openshift/installer@3b393da8 (pkg/types/aws/machinepool: Drop IAM-role overrides, 2019-01-30, openshift/installer#1154), and openshift/installer@9ad20c35 (pkg/destroy/aws: Remove ClusterName consumer, 2019-01-31, openshift/installer#1170). The uint32 -> int32 cast is slightly dangerous, because it will silently wrap overflowing values [1,2]. But I'll try and get the installer updated to use unsigned types as well, and then we won't have to worry about converting. [1]: golang/go#19624 [2]: golang/go#30209