Skip to content

Add a config.openshift.io/Infrastructure instance to the cluster - #943

Merged
openshift-merge-robot merged 2 commits into
openshift:masterfrom
ironcladlou:cloudprovider
Jan 12, 2019
Merged

openshift-merge-robot merged 2 commits into
openshift:masterfrom
ironcladlou:cloudprovider

Conversation

@ironcladlou

Copy link
Copy Markdown
Contributor

Add a config.openshift.io/Infrastructure instance to the cluster.

  • Update the openshift/api package to a version containing the new config type.
  • Generate the config.openshift.io/Infrastructure custom resource definition manifest.
  • Generate the CRD instance manifest populated with cloud provider name from the install config.

This enables consumers of cloud provider configuration to migrate away from install config.

/cc @openshift/sig-network-edge @rajatchopra @deads2k

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 19, 2018
@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

Comment thread pkg/asset/manifests/infrastructure.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.

Do not need to store the config. It is not used.

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.

Fixed

Comment thread pkg/asset/manifests/infrastructure.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.

Wrap this error with a meaningful message.

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.

Fixed — also, I wasn't aware of github.com/pkg/errors, I like it and will propose using it in my team's operators. Thanks!

Comment thread Gopkg.lock 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.

Put the vendor changes in a separate commit.

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.

Isn't this already the case?
0cd84d5

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.

Ah, yes, sorry for the noise.

Comment thread pkg/asset/manifests/infrastructure.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.

The message for this error does not match what the error is.

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.

Fixed

Comment thread pkg/asset/manifests/infrastructure.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.

This asset should not be loadable. Its files will be loaded by the Common Manifests asset. For more context, see #877.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, we may need to update the recent DNS config implementation for this too.

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'll refactor DNS once this PR merges

@ironcladlou
ironcladlou force-pushed the cloudprovider branch 2 times, most recently from fd335ff to f4ed5ff Compare December 19, 2018 15:40
@abhinavdahiya

Copy link
Copy Markdown
Contributor

/hold

Cloud provider is the wrong abstraction in the config. All cloudproviders are going to be external pretty soon. So I rather see Platform been set here...

@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 Dec 19, 2018
@ironcladlou

Copy link
Copy Markdown
Contributor Author

@abhinavdahiya

Cloud provider is the wrong abstraction in the config. All cloudproviders are going to be external pretty soon. So I rather see Platform been set here...

That seems like a discussion we should have had in openshift/api#145. Are you going to open a new API PR with some proposed change?

@staebler

Copy link
Copy Markdown
Contributor

@rajatchopra Is there a distinction between manifests that should be part of manifest-templates and those that should not? I am wondering whether this new Infrastructure Config asset should be output from the manifest-templates target. It is not clear to me why the Ingress Config and Network Config are not.

@abhinavdahiya

Copy link
Copy Markdown
Contributor

@abhinavdahiya

Cloud provider is the wrong abstraction in the config. All cloudproviders are going to be external pretty soon. So I rather see Platform been set here...

That seems like a discussion we should have had in openshift/api#145. Are you going to open a new API PR with some proposed change?

🙁 Yeah let me do that, sorry that PR slipped my radar.

@ironcladlou is this PR blocking you on something important?

@ironcladlou

Copy link
Copy Markdown
Contributor Author

Opened openshift/api#149 to discuss refactoring the config API

@rajatchopra rajatchopra left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

non-blocking comments.
I notice that even the ingress asset uses a template directly and not through a template asset. Can fix both of these in follow-up PR.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There should be a template asset first which this asset can depend upon. If we do it directly, then the 'templates' target will not dump this file (which may be okay, but inconsistent).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this a bootkube file? Seems like an openshift file. I mean keep it in data/data/manifests/openshift/

@rajatchopra

Copy link
Copy Markdown

@rajatchopra Is there a distinction between manifests that should be part of manifest-templates and those that should not? I am wondering whether this new Infrastructure Config asset should be output from the manifest-templates target. It is not clear to me why the Ingress Config and Network Config are not.

@staebler I put my review comments and then saw your comment. I have the same feedback. There is no distinction as of now, I think we should put all templates/manifests as manifest-template assets first and depend upon them if needed. Unless there is a strong reason otherwise. I don't see the reason here.

@ironcladlou
ironcladlou force-pushed the cloudprovider branch 2 times, most recently from 60c114f to fa5253f Compare January 8, 2019 22:10
@ironcladlou

Copy link
Copy Markdown
Contributor Author

@rajatchopra @staebler @abhinavdahiya refactored per feedback, PTAL. Tested manually with create manifests but can't yet get a new cluster going to see it all in action.

Are there any automated tests I should incorporate?

@ironcladlou

Copy link
Copy Markdown
Contributor Author

Should the Infrastructure instance itself also be a template like the CRD? I'm not entirely clear on what the decision making framework is for when an asset should be a Go template in vs. a manifest generated from Go code in pkg/asset/manifests.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

@ironcladlou

Copy link
Copy Markdown
Contributor Author
$ oc get infrastructures/cluster -o yaml
apiVersion: config.openshift.io/v1
kind: Infrastructure
metadata:
  creationTimestamp: 2019-01-09T18:53:37Z
  generation: 1
  name: cluster
  resourceVersion: "227"
  selfLink: /apis/config.openshift.io/v1/infrastructures/cluster
  uid: df61ad74-143f-11e9-a097-02040a65c016
spec: {}
status:
  platform: AWS

@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@Miciah

Miciah commented Jan 9, 2019

Copy link
Copy Markdown
Contributor

/retest

@ironcladlou

Copy link
Copy Markdown
Contributor Author

@abhinavdahiya @rajatchopra @staebler PTAL, tests are green.

Comment thread pkg/asset/manifests/infrastructure.go Resolved
* Update the `openshift/api` package to a version containing the new config type.
* Generate the `config.openshift.io/Infrastructure` custom resource definition manifest.
* Generate the CRD instance manifest populated with cloud provider name from the install config.

This enables consumers of cloud provider configuration to migrate away from install config.
@abhinavdahiya abhinavdahiya added this to the Freeze milestone Jan 10, 2019
@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

@abhinavdahiya

Copy link
Copy Markdown
Contributor

/lgtm

/hold
i'll wait for maybe @rajatchopra / @staebler be green light by the end of the day...

/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 Jan 11, 2019
@rajatchopra

Copy link
Copy Markdown

/lgtm

@openshift-ci-robot openshift-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed lgtm Indicates that a PR is ready to be merged. labels Jan 11, 2019
@ironcladlou

Copy link
Copy Markdown
Contributor Author

/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 Jan 11, 2019
@ironcladlou

Copy link
Copy Markdown
Contributor Author

@rajatchopra re-tag? I accidentally removed it

@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

@abhinavdahiya

Copy link
Copy Markdown
Contributor

/lgtm

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

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, ironcladlou, rajatchopra

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:
  • OWNERS [abhinavdahiya,rajatchopra]

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

@ironcladlou

Copy link
Copy Markdown
Contributor Author

C'mon, bot.
/retest

@Miciah

Miciah commented Jan 11, 2019

Copy link
Copy Markdown
Contributor
could not copy stable imagestreamtag: Timeout: request did not complete within allowed duration

/retest

@Miciah

Miciah commented Jan 11, 2019

Copy link
Copy Markdown
Contributor

/retest

@Miciah

Miciah commented Jan 11, 2019

Copy link
Copy Markdown
Contributor
level=error msg="\t* module.vpc.aws_route_table_association.worker_routing[0]: 1 error occurred:"
level=error msg="\t* aws_route_table_association.worker_routing.0: timeout while waiting for state to become 'success' (timeout: 5m0s)"
level=error
level=error
level=error msg="\t* module.vpc.aws_route_table_association.route_net[4]: 1 error occurred:"
level=error msg="\t* aws_route_table_association.route_net.4: timeout while waiting for state to become 'success' (timeout: 5m0s)"

/retest

@Miciah

Miciah commented Jan 11, 2019

Copy link
Copy Markdown
Contributor

/retest

1 similar comment
@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

@Miciah

Miciah commented Jan 11, 2019

Copy link
Copy Markdown
Contributor
could not resolve base image: the server was unable to return a response in the time allotted, but may still be processing the request (get imagestreamtags.image.openshift.io pipeline:installer)

/retest

@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

@Miciah

Miciah commented Jan 11, 2019

Copy link
Copy Markdown
Contributor

/retest

@ironcladlou

Copy link
Copy Markdown
Contributor Author

/refresh

@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

@ironcladlou

Copy link
Copy Markdown
Contributor Author

/retest

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