console
console copied to clipboard
How to make OLM field conditional?
I have one of the fields in my spec ex. FileSystem. Markers for those looks like :
// +required
// +kubebuilder:validation:Required
// +kubebuilder:default:=Remote File System
// +operator-sdk:csv:customresourcedefinitions:order=3,type=spec,displayName="File system",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:select:Remote File System","urn:alm:descriptor:com.tectonic.ui:select:Local File System"}
FileSystem string `json:"FileSystem,omitempty"`
I want to make this field visible on UI under some conditions. If that condition is true then we see the selection drop-down otherwise I want to make it hidden. Is there a way to achieve this? I am using operator-sdk version v1.9.0
cc @TheRealJon
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle rotten /remove-lifecycle stale