-
Notifications
You must be signed in to change notification settings - Fork 409
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
discover MCOConfig from InstallConfig #47
Conversation
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.
func platformFromInstallConfig(ic installertypes.InstallConfig) string { | ||
switch { | ||
case ic.Platform.AWS != nil: | ||
return "aws" |
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.
nit: maybe make this const, but it's fine to leave as is
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.
/lgtm
[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:
Approvers can indicate their approval by writing |
use pull policy always
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