-
Bug
-
Resolution: Unresolved
-
Normal
-
4.19
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
When a user navigates to the OpenShift Container Platform (OCP) web console to create a new MachineSet (Compute > MachineSets > Create MachineSet), the default YAML template provided contains an invalid field: spec.template.spec.versions. This field does not exist in the MachineSpec definition for the machine.openshift.io/v1beta1 API version, which can mislead users into using an incorrect schema.
Version-Release number of selected component (if applicable):
Any OCP cluster
How reproducible:
100%
Steps to Reproduce:
1. Log in to the OCP web console. 2. Navigate to the Compute section in the left-hand menu. 3. Click on MachineSets. 4. Click the Create MachineSet button. 5. Observe the pre-populated sample YAML in the editor.
Actual results:
The sample YAML provided in the console includes the versions field, as shown below:
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
name: example
namespace: openshift-machine-api
spec:
replicas: 1
selector:
matchLabels:
foo: bar
template:
metadata:
labels:
foo: bar
spec:
providerSpec: {}
versions:
kubelet: ''
Expected results:
The sample YAML should not contain the spec.template.spec.versions field, as it is not part of the API. The correct minimal sample should look like this:
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
name: example
namespace: openshift-machine-api
spec:
replicas: 1
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <cluster-id>
template:
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <cluster-id>
spec:
providerSpec:
value: {} # User needs to fill this with platform-specific details
Additional info:
The absence of the versions field can be confirmed using the oc explain command, which fails to find the field: $ oc explain machinesets.machine.openshift.io.spec.template.spec.versions GROUP: machine.openshift.io KIND: MachineSet VERSION: v1beta1error: field "versions" does not exist Proposed Resolution: Update the default MachineSet YAML template within the OCP web console UI to remove the incorrect spec.template.spec.versions section.