Skip to content

network: move from operator-specific CRD to cluster config - #1013

Merged
openshift-merge-robot merged 2 commits into
openshift:masterfrom
squeed:cluster-network-config
Feb 1, 2019
Merged

openshift-merge-robot merged 2 commits into
openshift:masterfrom
squeed:cluster-network-config

Conversation

@squeed

@squeed squeed commented Jan 8, 2019

Copy link
Copy Markdown
Contributor
  • 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

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 8, 2019
@squeed

squeed commented Jan 8, 2019

Copy link
Copy Markdown
Contributor Author

/hold
This won't pass CI until openshift/cluster-network-operator#47 merges

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 8, 2019
@squeed

squeed commented Jan 8, 2019

Copy link
Copy Markdown
Contributor Author

@wking this is the replacement to that previous PR.

Comment thread pkg/types/installconfig.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

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).

@squeed

squeed commented Jan 9, 2019

Copy link
Copy Markdown
Contributor Author

@abhinavdahiya @wking ping on this. I'd like to resolve the discussion of embedding vs. copying the Network.config.openshift.io datatype.

@abhinavdahiya

Copy link
Copy Markdown
Contributor

@abhinavdahiya @wking ping on this. I'd like to resolve the discussion of embedding vs. copying the Network.config.openshift.io datatype.

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.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2019
@squeed

squeed commented Jan 14, 2019

Copy link
Copy Markdown
Contributor Author

@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.

@abhinavdahiya

Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Contributor

with feature freeze and install-config versioned to v1beta1 657cb8c this PR needs

  1. exception
  2. version bump to v1beta2
  3. migration from v1beta1 to v1beta2

/cc @crawford for tracking.

@squeed

squeed commented Jan 15, 2019

Copy link
Copy Markdown
Contributor Author

@abhinavdahiya on it. Should I create a completely separate v1beta1 type for the beta1 -> beta2 migration, or just use optional fields?

@squeed

squeed commented Jan 15, 2019

Copy link
Copy Markdown
Contributor Author

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.

@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 15, 2019
@squeed

squeed commented Jan 15, 2019

Copy link
Copy Markdown
Contributor Author

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!

Comment thread pkg/validate/validate.go Outdated

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor Author

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.

Comment thread pkg/asset/manifests/network.go Outdated

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor

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.

@abhinavdahiya

Copy link
Copy Markdown
Contributor

@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... ?

@squeed

squeed commented Jan 17, 2019

Copy link
Copy Markdown
Contributor Author

/retest (it's a flake)

@knobunc

knobunc commented Jan 17, 2019

Copy link
Copy Markdown

/retest
(@squeed the bot is finnicky and won't take words after the command)

@crawford

Copy link
Copy Markdown
Contributor

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...

The serialized form is what we are versioning. If the changes are internal, we don't need to bump the version.

@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 24, 2019
@squeed

squeed commented Jan 24, 2019

Copy link
Copy Markdown
Contributor Author

Okay, moved the CRDs to the templaes directory. Otherwise, this is unchanged. @abhinavdahiya, PTAL, thanks! I'd like to get this in for beta2.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should not be created by installer right? only network.config.openshift.io

Looks like we are dropping the netopv1.NetworkConfig from vendor as installer no longer creates that...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I kept it here to make life easier for users who need to create advanced network settings; mind if we keep it for now and see how the docs shake out?

@squeed

squeed commented Jan 28, 2019

Copy link
Copy Markdown
Contributor Author

/retest
test failures are flakes.

@abhinavdahiya

Copy link
Copy Markdown
Contributor

I think https://github.com/openshift/cluster-config-operator will help installer to remove all *config.openshift.io CRDs. so for now its fine as-is.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 1, 2019
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@abhinavdahiya

Copy link
Copy Markdown
Contributor

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 1, 2019
@openshift-merge-robot
openshift-merge-robot merged commit 9626766 into openshift:master Feb 1, 2019
wking added a commit to wking/openshift-installer that referenced this pull request Feb 4, 2019
PodCIDR was removed in dafc79f (Generate Network.cluster config
instead of NetworkConfig.networkoperator, 2019-01-15, openshift#1013).
wking added a commit to wking/openshift-installer that referenced this pull request Feb 5, 2019
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
wking added a commit to wking/openshift-installer that referenced this pull request Feb 5, 2019
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
wking added a commit to wking/hive that referenced this pull request Feb 14, 2019
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
wking added a commit to wking/hive that referenced this pull request Feb 14, 2019
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
wking added a commit to wking/hive that referenced this pull request Feb 14, 2019
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
wking added a commit to wking/hive that referenced this pull request Feb 14, 2019
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
wking added a commit to wking/hive that referenced this pull request Feb 14, 2019
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
wking added a commit to wking/hive that referenced this pull request Feb 14, 2019
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
csrwng pushed a commit to csrwng/hive that referenced this pull request Feb 19, 2019
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
wking added a commit to wking/hive that referenced this pull request Feb 21, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants