Skip to content

Commit

Permalink
fix(OLM): ensure kepler can be created through Console
Browse files Browse the repository at this point in the history
Previously, when creating Kepler instance through OpenShift Console / UI,
the redfish spec which is optional also had its fields initialized as
well.  Notably `redfish.secrefRef` was initialized to "". This prevented
creation of `kepler` instance since the `secretRef` is a required field.

This commit fixes the issue by marking `redfish` as `optional` and
updating the default sample to reflect that.

Signed-off-by: Sunil Thaha <[email protected]>
  • Loading branch information
sthaha committed May 21, 2024
1 parent f82df47 commit 8babd7f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bundle/manifests/kepler-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ metadata:
"exporter": {
"deployment": {
"port": 9103
}
},
"redfish": null
}
}
}
Expand Down
1 change: 1 addition & 0 deletions config/samples/kepler.system_v1alpha1_kepler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ spec:
exporter:
deployment:
port: 9103
redfish: null

5 changes: 4 additions & 1 deletion pkg/api/v1alpha1/kepler_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ type RedfishSpec struct {

type ExporterSpec struct {
Deployment ExporterDeploymentSpec `json:"deployment,omitempty"`
Redfish *RedfishSpec `json:"redfish,omitempty"`

// +optional
// +kubebuilder:validation:optional
Redfish *RedfishSpec `json:"redfish,omitempty"`
}

// KeplerSpec defines the desired state of Kepler
Expand Down

0 comments on commit 8babd7f

Please sign in to comment.