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
Bug 1976379: UPSTREAM: <carry>: Reject the pod creation when we can not decide the cluster type #832
Bug 1976379: UPSTREAM: <carry>: Reject the pod creation when we can not decide the cluster type #832
Conversation
@cynepco3hahue: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
@cynepco3hahue: This pull request references Bugzilla bug 1976379, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions 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. |
@@ -180,6 +180,11 @@ func (a *managementCPUsOverride) Admit(ctx context.Context, attr admission.Attri | |||
return admission.NewForbidden(attr, err) // can happen due to informer latency | |||
} | |||
|
|||
// we can not decide the cluster type without Status.ControlPlaneTopology and Status.InfrastructureTopology | |||
if clusterInfra.Status.ControlPlaneTopology == "" || clusterInfra.Status.InfrastructureTopology == "" { | |||
return admission.NewForbidden(attr, fmt.Errorf("%s infrastructure resource %q has empty Status.ControlPlaneTopology or Status.InfrastructureTopology", PluginName, infraClusterName)) |
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.
lower-case field names
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.
the object name is redundant. There is only one.
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.
done
… cluster type It is possible a race condition between pod creation and the update of the infrastructure resource status with correct values under Status.ControlPlaneTopology and Status.InfrastructureTopology. Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
cc1eb1e
to
212d17f
Compare
@cynepco3hahue: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cynepco3hahue, sttts 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 |
/cherry-pick release-4.8 |
@cynepco3hahue: once the present PR merges, I will cherry-pick it on top of release-4.8 in a new PR and assign it to you. In response to this:
Instructions 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. |
/retest |
/test k8s-e2e-gcp |
@cynepco3hahue: All pull requests linked via external trackers have merged: Bugzilla bug 1976379 has been moved to the MODIFIED state. In response to this:
Instructions 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. |
@cynepco3hahue: new pull request created: #833 In response to this:
Instructions 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. |
It is possible a race condition between pod creation and the update of the
infrastructure resource status with correct values under
Status.ControlPlaneTopology and Status.InfrastructureTopology.
Signed-off-by: Artyom Lukianov alukiano@redhat.com