- podCount
- resourceRequirements
- k8sResourcePrefix
- booleanSwitch
- checkbox
- text
- number
- password
- updateStrategy
- imagePullPolicy
- nodeAffinity
- podAffinity
- podAntiAffinity
- selector
- DEPRECATED fieldGroup
- DEPRECATED arrayFieldGroup
- select
- advanced
- endpointList
- fieldDependency
- hidden
A specDescriptor is for describing the property of a spec
field in your Custom Resource. Each entry should contain the following:
displayName
- The user-friendly name of the fielddescription
- Concise information about what the field representspath
- The dot-delimited path of the field in the objectx-descriptors
(Optional) - UI component information about the field capabilities
You can customize how a field is presented in the UI with a specDescriptor. Use a user-friendly displayName
and concise description
to overwrite the field name and potentially lengthy description of a field in the schema based on where the path
is pointing to. This applies to any schema property and in any level of the nested structures.
The x-descriptors
is used to determine which "capabilities" this descriptor has and which UI component to use on different views in the OpenShift Console.
For example, some x-descriptors
also provides a "DISPLAY VIEW" that allows you to expose the specified schema property on Operand's Details view in the console as well as on the Creation Form. A canonical list of React UI x-descriptors
for OpenShift can be found below.
You can see more information on Operand's Creation Forms.
x-descriptors
This descriptor allows you to specify the number of pods for your instance. See example from [CSV] etcd Operator:
…
- displayName: Size
description: The desired number of member Pods for the etcd cluster.
path: size
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:podCount'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify the mini/max amount of compute resources required/allowed. See example from [CSV] etcd Operator:
…
- description: Limits describes the minimum/maximum amount of compute resources
required/allowed
displayName: Resource Requirements
path: pod.resources
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW - Resource Limits | MODIFY VIEW - Resource Requests |
x-descriptors
This descriptor allows you to specify the prerequisite kubernetes object (e.g. Secrets, ServiceAccount, Service, ConfigMap, Namespace, etc) for your instance. See example from [CSV] Couchbase Operator:
…
- description: The name of the secret object that stores the server's TLS
certificate.
displayName: Server TLS Secret
path: tls.static.member.serverSecret
x-descriptors:
- urn:alm:descriptor:io.kubernetes:Secret
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify the true or false value for the configuration. See example from [CSV] Eclipse Che Operator:
…
- description: TLS routes
displayName: TLS Mode
path: server.tlsSupport
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify the true or false value for the configuration. See example for Business Automation Operator:
…
- displayName: ImageRegistry Insecure
description: A flag used to indicate the specified registry is insecure.
path: imageRegistry.insecure
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify a text input for a string data type. See example from [CSV] Portworx Operator:
…
- path: image
displayName: Image
description: The docker image name and version of Portworx Enterprise.
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:text'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify a number input for a number data type. See example from [CSV] KEDA Operator:
…
- displayName: Cooldown Period
description: Cooldown Period
path: cooldownPeriod
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:number'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify a text input for a password data type. See example for Grafana Operator:
…
- displayName: Admin Password
description: The Admin Password of Grafana.
path: adminPassword
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:password'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify the strategy of your pods being replaced when a new version of the deployment exist. See example for Portworx Operator:
…
- displayName: Update Strategy
description: The update strategy of the deployment
path: updateStrategy
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:updateStrategy'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify the policy for pulling your container image. See example from [CSV] Appsody Operator:
…
- description: image pull policy for container image
displayName: Pull Policy
path: pullPolicy
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:imagePullPolicy
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify which nodes your pod is eligible to be scheduled on based on labels on the node. See example for Prometheus Operator:
…
- displayName: Node Affinity
description: Node affinity is a group of node affinity scheduling
path: affinity.nodeAffinity
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:nodeAffinity'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify which nodes your pod is eligible to be scheduled based on labels on pods that are already running on the node. See example for Prometheus Operator:
…
- displayName: Pod Affinity
description: Pod affinity is a group of inter pod affinity scheduling rules.
path: affinity.podAffinity
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:podAffinity'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify which nodes your pod is eligible to be scheduled based on labels on pods that are already running on the node. See example for Prometheus Operator:
…
- displayName: Pod Anti Affinity
description: Pod anti affinity is a group of inter pod anti affinity scheduling rules.
path: affinity.podAntiAffinity
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:podAntiAffinity'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify labels for identifying a set of objects via a label selector (The label selector is the core grouping primitive in Kubernetes). See example from [CSV] Prometheus Operator:
…
- description: A selector for the ConfigMaps from which to load rule files
displayName: Rule Config Map Selector
path: ruleSelector
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:selector:core:v1:ConfigMap
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
See Kubernetes doc for details in resources-that-support-set-based-requirement.
This x-descriptor has been deprecated. See the entry in the deprecated section.
This x-descriptor has been deprecated. See the entry in the deprecated section.
x-descriptors
This descriptor allows you to specify a set of predefined options (e.g. enum:
type) for a dropdownUI component. See example from [CSV] Strimzi Apache Kafka Operator:
…
- description: The type of storage used by Kafka brokers
displayName: Kafka storage
path: kafka.storage.type
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:select:ephemeral
- urn:alm:descriptor:com.tectonic.ui:select:persistent-claim
- urn:alm:descriptor:com.tectonic.ui:select:jbod
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify fields as "Advanced Configurations" for any schema property. The advanced fields will be displayed within a collapsible section at the bottom of the parent schema structure. See example for Business Automation Operator:
…
- description: Selected if the image registry is insecure.
displayName: Insecure
path: imageRegistry.insecure
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:booleanSwitch'
- 'urn:alm:descriptor:com.tectonic.ui:advanced'
- description: >- Image registry's base 'url:port'. e.g. registry.example.com:5000.
Defaults to 'registry.redhat.io'.
displayName: Registry
path: imageRegistry.registry
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:text'
- 'urn:alm:descriptor:com.tectonic.ui:advanced'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor is created specifically for Prometheus Operator to specify a list of endpoints allowed for the ServiceMonitor it manages. See example from [CSV] Prometheus Operator:
…
- description: A list of endpoints allowed as part of this ServiceMonitor
displayName: Endpoints
path: endpoints
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:endpointList
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors
This descriptor allows you to specify a field as the dependent of a Control Field and shows the Dependent Field when the current value of the Control Field is equal to the expected value:
'urn:alm:descriptor:com.tectonic.ui:fieldDependency:CONTROL_FIELD_PATH:EXPECTED_VALUE'
Usage
- Add "fieldDependency" to 'x-descriptors' array of the Dependent Field(s).
- Replace "CONTROL_FIELD_PATH" with the 'path' property of the Control Field object.
- Replace "EXPECTED_VALUE" with the actual expected value.
Requirements
- The Dependent Field will be exposed right after the Control Field on the form (ignores the rules mentioned in Ordering of Form Fields).
- The Dependent Field doesn't have to be a "leaf" in the schema.
The Dependent Field(s) will be displayed only when the current value of the Control Field is equal to the expected value.
Example
…
- displayName: Enable Upgrades
description: >-
Set true to enable automatic micro version product upgrades, it is disabled by default.
path: upgrades.enabled
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:booleanSwitch'
- displayName: Include minor version upgrades
description: >-
Set true to enable automatic minor product version upgrades, it is
disabled by default. Requires spec.upgrades.enabled to be true.
path: upgrades.minor
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:fieldDependency:upgrades.enabled:true'
- 'urn:alm:descriptor:com.tectonic.ui:booleanSwitch'
…
UI
CREATION VIEW
|
DISPLAY VIEW |
MODIFY VIEW |
21. hidden
x-descriptors
This descriptor allows you to exclude non-user facing fields from the "auto-generated creation form" by specifying them as "hidden" schema fields. See example for Portworx Operator:
…
- displayName: HIDDEN FIELDS - Network and all its children fields
description: >-
HIDDEN FIELDS - The network related fields to be used by Portworx for data traffic.
path: network
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:hidden'
- displayName: HIDDEN FIELDS - Start Port
description: >-
HIDDEN FIELDS - It is the starting port in the range of ports used by Portworx.
path: startPort
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:hidden'
…
Usage
- You can apply "hidden" to any schema property path (doesn't have to be a "leaf" in the schema). All the children properties, if any, will be hidden as well.
- The descriptor will hide the target property and all of its child fields.
- The field(s) will be hidden on the UI but can still be accessed through the YAML editor.
A statusDescriptor is for describing the property of a status
field in your Custom Resource. The structure of the statusDescriptors is similar to specDescriptors and includes the same fields. The only difference is the set of valid x-descriptors
described below.
x-descriptors
This descriptor allows you to expose the status of pods for your instance. It expects the output format in the status block of your instance in:
…
status:
[PATH_TO_THE_FIELD]:
[STATE_1]:
- [FIELD_MEMBER_NAME]
- [FIELD_MEMBER_NAME]
- [FIELD_MEMBER_NAME]
[STATE_2]:
- [FIELD_MEMBER_NAME]
- [FIELD_MEMBER_NAME]
[STATE_3]:
- [FIELD_MEMBER_NAME]
…
Example
See example from [CSV] 3Scale Operator:
…
- displayName: Deployments
description: API Manager Deployment Configs
path: deployments
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:podStatuses'
…
The status block of the field being specified:
…
status:
deployments:
ready:
- apicast-staging
- system-memcache
- system-redis
- zync-database
starting:
- apicast-production
- backend-cron
- backend-listener
- backend-redis
- backend-worker
- system-mysql
- system-sidekiq
- system-sphinx
- zync
- zync-que
stopped:
- system-app
…
On the DISPLAY VIEW:
x-descriptors
This descriptor allows you to expose an external link of your instance. It expects the output format in the status block of your instance in:
…
status:
[PATH_TO_THE_FIELD]: [FIELD_VALUE]
…
Example
See example from [CSV] Eclipse Che Operator:
…
- description: Route to access Eclipse Che
displayName: Eclipse Che URL
path: cheURL
x-descriptors:
- urn:alm:descriptor:org.w3:link
…
The status block of the field being specified:
…
status:
…
cheURL: 'http://che-tony.apps.rhamilto.devcluster.openshift.com'
…
On the DISPLAY VIEW:
x-descriptors
This descriptor allows you to expose an array of PodConditions of your instance. It expects the output format in the status block of your instance in:
…
status:
[PATH_TO]:
conditions:
- lastTransitionTime: [VALUE]
lastUpdateTime: [VALUE]
message: [VALUE]
reason: [VALUE]
status: [VALUE]
type: [VALUE]
…
Example
See example from [CSV] Nexus Operator:
…
- displayName: Deployment Conditions
description: Nexus server deployment conditions
path: deploymentStatus.conditions
x-descriptors:
- 'urn:alm:descriptor:io.kubernetes.conditions'
…
The status block of the field being specified:
…
status:
deploymentStatus:
conditions:
- lastTransitionTime: '2020-02-22T01:00:10Z'
lastUpdateTime: '2020-02-22T01:00:10Z'
message: Deployment does not have minimum availability.
reason: MinimumReplicasUnavailable
status: 'False'
type: Available
- lastTransitionTime: '2020-02-22T01:00:10Z'
lastUpdateTime: '2020-02-22T01:00:10Z'
message: ReplicaSet "nexus3-5dc585f884" is progressing.
reason: ReplicaSetUpdated
status: 'True'
type: Progressing
…
On the DISPLAY VIEW:
x-descriptors
This descriptor allows you to expose the status field of your instance in plain text.
Example
See example from [CSV] Spark Operator:
…
- displayName: Application State
description: Current state of the application.
path: applicationState.state
x-descriptors:
- urn:alm:descriptor:text
…
The status block of the field being specified:
…
status:
applicationState:
state: SUBMITTED
…
On the DISPLAY VIEW:
x-descriptors
This descriptor allows you to expose the status phase of your instance in plain text.
Example
See example from [CSV] KEDA Operator:
…
- path: phase
description: Phase
displayName: Phase
x-descriptors:
- 'urn:alm:descriptor:io.kubernetes.phase'
…
The status block of the field being specified:
…
status:
phase: Installation Succeeded
…
On the DISPLAY VIEW:
x-descriptors
This descriptor allows you to expose the phase reason of your instance in plain text.
Example
See example from [CSV] KEDA Operator:
…
- path: reason
description: Reason
displayName: Reason
x-descriptors:
- 'urn:alm:descriptor:io.kubernetes.phase:reason'
…
The status block of the field being specified:
…
status:
…
reason: KEDA v1.2.0 is installed in namespace 'keda'
…
On the DISPLAY VIEW:
x-descriptors
This descriptor allows you to expose a kubernetes object for your instance.
Example
See example from [CSV] etcd Operator:
…
- description: The service at which the running etcd cluster can be accessed.
displayName: Service
path: serviceName
x-descriptors:
- urn:alm:descriptor:io.kubernetes:Service
…
The status block of the field being specified:
…
status:
…
serviceName: example-client
…
On the DISPLAY VIEW:
x-descriptors [DEPRECATED]
…
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:label'
…
- Use text specDescriptor instead for
string
data type input/output.
x-descriptors [DEPRECATED]
…
x-descriptors:
'urn:alm:descriptor:com.tectonic.ui:namespaceSelector'
…
- Use k8sResourcePrefix specDescriptor instead to specify Namespace object.
x-descriptors [DEPRECATED]
This x-descriptor is NO longer necessary.
Starting from OCP 4.5, the field grouping of object and array structures are now schema-based and auto-generated for the Creation View.
You can still overwrite the displayName
and description
for objects and/or arrays in the same way as individual fields. Simply use a specDescriptors directly against the object/array (no x-descriptors
are necessary).
Example
See an example for Portworx Operator. To customize the displayName and fields on the "stork" object:
- Add a specDescriptor to overwrite the
displayName
withpath
property of the "stork". - Add a specDescriptor with booleanSwitch x-descriptor, and
path
property of "stork.enabled". - Add a specDescriptor with text x-descriptor, and
path
property of "stork.image".
…
- displayName: Stork Configurations
description: Specifies the configurations for Stork.
path: stork
- displayName: Enabled
description: Specifies if Stork is enabled.
path: stork.enabled
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:booleanSwitch'
- displayName: Image
description: The docker image name and version of Stork.
path: stork.image
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:text'
…
UI
CREATION VIEW | DISPLAY VIEW |
MODIFY VIEW |
x-descriptors [DEPRECATED]
This x-descriptor is NO longer necessary.
Starting from OCP 4.5, the grouping of object and array structures are now schema-based and auto-generated in the Creation View.
You can still provide your own displayName
and description
for objects and/or arrays in the same way as individual fields. Simply use a specDescriptor directly against the object/array (no x-descriptors
are necessary).
Example
See an example for Strimzi Operator. To customize the displayName and fields on the "overrides" (kafka.storage.overrides) array structure:
-
Add a specDescriptor to overwrite the
displayName
withpath
property "kafka.storage.overrides". -
Add a specDescriptor with number x-descriptor, and
path
property of "kafka.storage.overrides[0].broker".
- Add a specDescriptor with text x-descriptor, and
path
property of "kafka.storage.overrides[0].class".
…
- displayName: Kafka Storage Override Configurations
description: Specifies the configurations for storage overrides.
path: kafka.storage.overrides
- description: The Broker ID to be assigned with the specified Storage Class.
displayName: Broker ID
path: kafka.storage.overrides[0].broker
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:number'
- description: The Storage Class to be assigned.
displayName: Storage Class
path: kafka.storage.overrides[0].class
x-descriptors:
- 'urn:alm:descriptor:io.kubernetes:StorageClass'
…
UI
CREATION VIEW
Note:
The * required field has a higher "sort weight" and will be rendered earlier in the form. |
DISPLAY VIEW |
MODIFY VIEW |