console icon indicating copy to clipboard operation
console copied to clipboard

How to make OLM field conditional?

Open omhingmire opened this issue 3 years ago • 1 comments
trafficstars

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

omhingmire avatar Jul 13 '22 11:07 omhingmire

cc @TheRealJon

spadgett avatar Jul 25 '22 18:07 spadgett

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

openshift-bot avatar Oct 24 '22 01:10 openshift-bot

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

openshift-bot avatar Nov 23 '22 08:11 openshift-bot