diff --git a/api/v1/nodefeaturediscovery_types.go b/api/v1/nodefeaturediscovery_types.go index cd849ada..a5ae1cf3 100644 --- a/api/v1/nodefeaturediscovery_types.go +++ b/api/v1/nodefeaturediscovery_types.go @@ -25,9 +25,17 @@ import ( // NodeFeatureDiscoverySpec defines the desired state of NodeFeatureDiscovery // +k8s:openapi-gen=true type NodeFeatureDiscoverySpec struct { - Operand OperandSpec `json:"operand"` - Instance string `json:"instance"` - WorkerConfig ConfigMap `json:"workerConfig"` + Operand OperandSpec `json:"operand"` + + // Instance name. Used to separate annotation namespaces for + // multiple parallel deployments. + // +optional + Instance string `json:"instance"` + + // WorkerConfig describes configuration options for the NFD + // worker. + // +optional + WorkerConfig ConfigMap `json:"workerConfig"` } // OperandSpec describes configuration options for the operand diff --git a/config/crd/bases/nfd.kubernetes.io_nodefeaturediscoveries.yaml b/config/crd/bases/nfd.kubernetes.io_nodefeaturediscoveries.yaml index 17d19cb5..7ca42539 100644 --- a/config/crd/bases/nfd.kubernetes.io_nodefeaturediscoveries.yaml +++ b/config/crd/bases/nfd.kubernetes.io_nodefeaturediscoveries.yaml @@ -38,7 +38,8 @@ spec: description: NodeFeatureDiscoverySpec defines the desired state of NodeFeatureDiscovery properties: instance: - description: Instance name. Used to separate annotation namespaces for multiple parallel deployments. + description: Instance name. Used to separate annotation namespaces + for multiple parallel deployments. type: string operand: description: OperandSpec describes configuration options for the operand @@ -63,7 +64,8 @@ spec: type: integer type: object workerConfig: - description: WorkerConfig describes configuration options for the NFD worker + description: WorkerConfig describes configuration options for the + NFD worker. properties: configData: description: BinaryData holds the NFD configuration file @@ -73,7 +75,6 @@ spec: type: object required: - operand - - workerConfig type: object status: description: NodeFeatureDiscoveryStatus defines the observed state of diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index ac676723..ffbe5c8e 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -316,4 +316,3 @@ rules: - update - use - watch - diff --git a/config/samples/nfd.kubernetes.io_v1_nodefeaturediscovery.yaml b/config/samples/nfd.kubernetes.io_v1_nodefeaturediscovery.yaml index 70ac6f34..e1121bb4 100644 --- a/config/samples/nfd.kubernetes.io_v1_nodefeaturediscovery.yaml +++ b/config/samples/nfd.kubernetes.io_v1_nodefeaturediscovery.yaml @@ -4,6 +4,7 @@ metadata: name: nfd-master-server namespace: node-feature-discovery-operator spec: + instance: "" # instance is empty by default operand: namespace: node-feature-discovery-operator image: gcr.io/k8s-staging-nfd/node-feature-discovery:master