-
Notifications
You must be signed in to change notification settings - Fork 231
operator: use infrastructure.config.openshfit.io for platformtype #256
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
Conversation
cluster operators must use the config.openshit.io as source for their top level config.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: If they are not already assigned, you can assign the PR to them by writing 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 |
|
|
||
| if installConfig.AWS != nil { | ||
| func getProviderFromInfrastructure(infra *configv1.Infrastructure) (Provider, error) { | ||
| switch infra.Status.Platform { |
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't this function now just return infra.Status.Platform and we completely drop type Provider string?
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.
didn't want to change more than required. :)
config/kubemark-config-infra.yaml
Outdated
| metadata: | ||
| name: cluster | ||
| status: | ||
| platform: 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.
this need to be 'kubemark' cc @ingvagabund
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.
Right, if not set properly our Jenkins CI will start to fail.
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.
kubectl apply -f config/kubemark-config-infra.yaml
error: error validating "config/kubemark-config-infra.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec.versions[0]): missing required field "storage" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion, ValidationError(CustomResourceDefinition): unknown field "storage" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition]; if you choose to ignore these errors, turn validation off with --validate=false
264bcde to
bcb65dd
Compare
| metadata: | ||
| name: cluster | ||
| status: | ||
| platform: kubemark |
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.
error: error validating "config/kubemark-config-infra.yaml": error validating data:[ValidationError(CustomResourceDefinition.spec): unknown field "storage" in io.k8s.apiextensions apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec.versions[0]): missing required field "storage" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion]; if you choose to ignore these errors, turn validation off with --validate=false
looks like storage field need to be set here or dropped from the CRD def @abhinavdahiya
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.
also I don't see status on the CRD def?
bcb65dd to
511feb4
Compare
|
/retest |
511feb4 to
6cbadc3
Compare
|
/retest |
|
@abhinavdahiya: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
| metadata: | ||
| name: cluster | ||
| status: | ||
| platform: 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.
s/AWS/kubemark
| func (optr *Operator) maoConfigFromInstallConfig() (*OperatorConfig, error) { | ||
| installConfig, err := getInstallConfig(optr.kubeClient) | ||
| func (optr *Operator) maoConfigFromInfrastructure() (*OperatorConfig, error) { | ||
| infra, err := optr.osClient.ConfigV1().Infrastructures().Get("cluster", metav1.GetOptions{}) |
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.
@abhinavdahiya e2e seems to be consistently failing, can't see anything meaningful in the logs. who/when creates the infra object?
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.
Managed to debug this by running installer locally from CI payload and running bastion to ssh into masters.
E0401 09:48:01.939450 1 operator.go:177] Failed getting operator config: infrastructures.config.openshift.io "cluster" is forbidden: User "system:serviceaccount:openshift-machine-api:default" cannot get resource "infrastructures" in API group "config.openshift.io" at the cluster scope
See if it goes green here df1d9c0
|
Closing in favour of #264 |
cluster operators must use the config.openshit.io as source for their top level config.
/cc @derekwaynecarr @enxebre