Skip to content
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

discover MCOConfig from InstallConfig #47

Merged
merged 5 commits into from
Sep 7, 2018

Conversation

abhinavdahiya
Copy link
Contributor

@abhinavdahiya abhinavdahiya commented Sep 6, 2018

Requires openshift/installer#205

  • this currently reads the kube-system/cluster-config-v1 config map and extracts the installconfig from 'install-config' key.

  • the bootstrap mco reads the cluster-config-v1 config map from disk, while the long running mco pulls kube-system/cluster-config-v1 from api

  • the long running mco discovers the mcoconfig when it cannot find the mcoconfig from api. And if mcoconfig exists at the location in api, it always uses that.

  • mco doesn't create the discovered mcoconfig in cluster as it is mostly discovered fields that user shouldn't be changing directly.

/cc @yifan-gu
/assign @yifan-gu

this is requires so that go test ./... doesn't fail for pkg/operator/...
as it imports the pkg/version which is not only correctly setup on build.
this currently reads the kube-system/cluster-config-v1 config map and
extracts the installconfig from 'install-config' key.
the bootstrap mco reads the cluster-config-v1 config map from disk
the long running mco pulls kube-system/cluster-config-v1 from api

the long running mco discovers the mcoconfig when it cannot find the
mcoconfig from api.
if mcoconfig exists at the location in api, it always uses that.
mco doesn't create the discovered mcoconfig in cluster as it is
mostly discovered fields that user shouldn't be changing.
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 6, 2018
func platformFromInstallConfig(ic installertypes.InstallConfig) string {
switch {
case ic.Platform.AWS != nil:
return "aws"
Copy link
Contributor

@yifan-gu yifan-gu Sep 7, 2018

Choose a reason for hiding this comment

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

nit: maybe make this const, but it's fine to leave as is

Copy link
Contributor

@yifan-gu yifan-gu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, yifan-gu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,yifan-gu]

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

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.

4 participants