Bug 2105382 - Add a validation webhook for Nutanix machine provider spec in Machine API Operator
Summary: Add a validation webhook for Nutanix machine provider spec in Machine API Ope...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.11
Hardware: All
OS: All
unspecified
urgent
Target Milestone: ---
: 4.11.0
Assignee: Michael McCune
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On: 2104642
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-08 16:29 UTC by Michael McCune
Modified: 2022-08-10 11:21 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2104642
Environment:
Last Closed: 2022-08-10 11:20:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-api-operator pull 1039 0 None open [release-4.11] Bug 2105382: Add a validation webhook for Nutanix MachineProviderConfig 2022-07-13 19:03:15 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:21:15 UTC

Comment 1 Michael McCune 2022-07-13 19:13:26 UTC
i have created a single PR against 4.11 that includes both the PRs from the original issue.

Comment 2 Milind Yadav 2022-07-14 05:24:32 UTC
[miyadav@miyadav ~]$ oc get clusterversion
NAME      VERSION                                                   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.11.0-0.ci.test-2022-07-14-024107-ci-ln-mfjpi6b-latest   True        False         31m     Cluster version is 4.11.0-0.ci.test-2022-07-14-024107-ci-ln-mfjpi6b-latest


[miyadav@miyadav nuatanix]$ oc create -f invalid411.yaml (removed userdata.name)
Error from server (providerSpec.userDataSecret.name: Required value: name must be provided): error when creating "invalid411.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.userDataSecret.name: Required value: name must be provided
[miyadav@miyadav nuatanix]$ 
 
[miyadav@miyadav nuatanix]$ oc create -f invalid411.yaml  (removed both userdata and credential secret , mutating webhooks worked)
machineset.machine.openshift.io/miyadav-147-frkp5-worker-in created
[miyadav@miyadav nuatanix]$ oc get machines 
NAME                                PHASE          TYPE   REGION   ZONE   AGE
miyadav-147-frkp5-master-0          Running                               57m
miyadav-147-frkp5-master-1          Running                               57m
miyadav-147-frkp5-master-2          Running                               57m
miyadav-147-frkp5-worker-dl9dh      Running                               53m
miyadav-147-frkp5-worker-in-nwqmq   Provisioning                          87s
miyadav-147-frkp5-worker-in-t8xh8   Provisioning                          88s
miyadav-147-frkp5-worker-tknvp      Running                               53m
[miyadav@miyadav nuatanix]$ oc get machines 
NAME                                PHASE     TYPE   REGION   ZONE   AGE
miyadav-147-frkp5-master-0          Running                          61m
miyadav-147-frkp5-master-1          Running                          61m
miyadav-147-frkp5-master-2          Running                          61m
miyadav-147-frkp5-worker-dl9dh      Running                          57m
miyadav-147-frkp5-worker-in-nwqmq   Running                          5m7s
miyadav-147-frkp5-worker-in-t8xh8   Running                          5m8s
miyadav-147-frkp5-worker-tknvp      Running                          57m

[miyadav@miyadav nuatanix]$ vi invalid411.yaml (removed credentialsecret.name ) 
[miyadav@miyadav nuatanix]$ oc get machineset miyadav-147-frkp5-worker-in -o yaml > invalid411.yaml
[miyadav@miyadav nuatanix]$ vi invalid411.yaml 
[miyadav@miyadav nuatanix]$ oc create -f invalid411.yaml 
Error from server (providerSpec.credentialsSecret.name: Required value: name must be provided): error when creating "invalid411.yaml": admission webhook "validation.machineset.machine.openshift.io" denied the request: providerSpec.credentialsSecret.name: Required value: name must be provided


[miyadav@miyadav nuatanix]$ oc get mutatingwebhookconfiguration
NAME          WEBHOOKS   AGE
machine-api   2          59m

[miyadav@miyadav nuatanix]$ oc get ValidatingWebhookConfiguration
NAME                               WEBHOOKS   AGE
alertmanagerconfigs.openshift.io   1          49m
autoscaling.openshift.io           2          59m
machine-api                        2          60m
multus.openshift.io                1          61m
performance-addon-operator         1          63m
prometheusrules.openshift.io       1          49m
snapshot.storage.k8s.io            1          60m

Comment 6 errata-xmlrpc 2022-08-10 11:20:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069


Note You need to log in before you can comment on or make changes to this bug.