From 2a833ec56ef2adf8d9f60afe355dca665a4de5cb Mon Sep 17 00:00:00 2001 From: Daniel Fan Date: Wed, 3 Apr 2024 20:44:06 -0700 Subject: [PATCH] Improve UX experience for OperatorConfig Signed-off-by: Daniel Fan --- api/v1alpha1/operatorconfig_types.go | 5 +++++ ...fecycle-manager.clusterserviceversion.yaml | 20 ++++++++++++++++--- .../operator.ibm.com_operatorconfigs.yaml | 17 ++++++++++++++-- .../operator.ibm.com_operatorconfigs.yaml | 17 ++++++++++++++-- ...fecycle-manager.clusterserviceversion.yaml | 6 ++++-- config/rbac/role.yaml | 14 +++++++++++++ 6 files changed, 70 insertions(+), 9 deletions(-) diff --git a/api/v1alpha1/operatorconfig_types.go b/api/v1alpha1/operatorconfig_types.go index a35494de..e2661d7d 100644 --- a/api/v1alpha1/operatorconfig_types.go +++ b/api/v1alpha1/operatorconfig_types.go @@ -67,6 +67,11 @@ type OperatorConfigStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status +// +kubebuilder:resource:path=operatorconfigs,scope=Namespaced +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=.metadata.creationTimestamp +// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=.status.phase,description="Current Phase" +// +kubebuilder:printcolumn:name="Created At",type=string,JSONPath=.metadata.creationTimestamp +// +operator-sdk:csv:customresourcedefinitions:displayName="OperatorConfig" // OperatorConfig is the Schema for the operatorconfigs API. Documentation For additional details regarding install parameters check https://ibm.biz/icpfs39install. License By installing this product you accept the license terms https://ibm.biz/icpfs39license type OperatorConfig struct { diff --git a/bundle/manifests/operand-deployment-lifecycle-manager.clusterserviceversion.yaml b/bundle/manifests/operand-deployment-lifecycle-manager.clusterserviceversion.yaml index 745b750c..bbf94663 100644 --- a/bundle/manifests/operand-deployment-lifecycle-manager.clusterserviceversion.yaml +++ b/bundle/manifests/operand-deployment-lifecycle-manager.clusterserviceversion.yaml @@ -129,7 +129,7 @@ metadata: categories: Developer Tools, Monitoring, Logging & Tracing, Security certified: "false" containerImage: icr.io/cpopen/odlm:latest - createdAt: "2024-04-02T02:16:34Z" + createdAt: "2024-04-04T03:40:45Z" description: The Operand Deployment Lifecycle Manager provides a Kubernetes CRD-based API to manage the lifecycle of operands. nss.operator.ibm.com/managed-operators: ibm-odlm olm.skipRange: '>=1.2.0 <4.3.0' @@ -215,8 +215,8 @@ spec: x-descriptors: - urn:alm:descriptor:io.kubernetes.phase version: v1alpha1 - - description: OperatorConfig is the Schema for the operatorconfigs API - displayName: Operator Config + - description: OperatorConfig is the Schema for the operatorconfigs API. Documentation For additional details regarding install parameters check https://ibm.biz/icpfs39install. License By installing this product you accept the license terms https://ibm.biz/icpfs39license + displayName: OperatorConfig kind: OperatorConfig name: operatorconfigs.operator.ibm.com version: v1alpha1 @@ -716,6 +716,20 @@ spec: - patch - update - watch + - apiGroups: + - operator.ibm.com + resources: + - operandbindinfos + - operandbindinfos/finalizers + - operandbindinfos/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - operator.ibm.com resources: diff --git a/bundle/manifests/operator.ibm.com_operatorconfigs.yaml b/bundle/manifests/operator.ibm.com_operatorconfigs.yaml index b7329bbe..cb6bdfb9 100644 --- a/bundle/manifests/operator.ibm.com_operatorconfigs.yaml +++ b/bundle/manifests/operator.ibm.com_operatorconfigs.yaml @@ -18,10 +18,23 @@ spec: singular: operatorconfig scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Current Phase + jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .metadata.creationTimestamp + name: Created At + type: string + name: v1alpha1 schema: openAPIV3Schema: - description: OperatorConfig is the Schema for the operatorconfigs API + description: OperatorConfig is the Schema for the operatorconfigs API. Documentation + For additional details regarding install parameters check https://ibm.biz/icpfs39install. + License By installing this product you accept the license terms https://ibm.biz/icpfs39license properties: apiVersion: description: |- diff --git a/config/crd/bases/operator.ibm.com_operatorconfigs.yaml b/config/crd/bases/operator.ibm.com_operatorconfigs.yaml index 5a8daa1c..168b1483 100644 --- a/config/crd/bases/operator.ibm.com_operatorconfigs.yaml +++ b/config/crd/bases/operator.ibm.com_operatorconfigs.yaml @@ -14,10 +14,23 @@ spec: singular: operatorconfig scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: Current Phase + jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .metadata.creationTimestamp + name: Created At + type: string + name: v1alpha1 schema: openAPIV3Schema: - description: OperatorConfig is the Schema for the operatorconfigs API + description: OperatorConfig is the Schema for the operatorconfigs API. Documentation + For additional details regarding install parameters check https://ibm.biz/icpfs39install. + License By installing this product you accept the license terms https://ibm.biz/icpfs39license properties: apiVersion: description: |- diff --git a/config/manifests/bases/operand-deployment-lifecycle-manager.clusterserviceversion.yaml b/config/manifests/bases/operand-deployment-lifecycle-manager.clusterserviceversion.yaml index 4a7f0229..b5821718 100644 --- a/config/manifests/bases/operand-deployment-lifecycle-manager.clusterserviceversion.yaml +++ b/config/manifests/bases/operand-deployment-lifecycle-manager.clusterserviceversion.yaml @@ -102,8 +102,10 @@ spec: x-descriptors: - urn:alm:descriptor:io.kubernetes.phase version: v1alpha1 - - description: OperatorConfig is the Schema for the operatorconfigs API - displayName: Operator Config + - description: OperatorConfig is the Schema for the operatorconfigs API. Documentation + For additional details regarding install parameters check https://ibm.biz/icpfs39install. + License By installing this product you accept the license terms https://ibm.biz/icpfs39license + displayName: OperatorConfig kind: OperatorConfig name: operatorconfigs.operator.ibm.com version: v1alpha1 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index bcc71a55..080d4471 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -65,6 +65,20 @@ rules: - patch - update - watch +- apiGroups: + - operator.ibm.com + resources: + - operandbindinfos + - operandbindinfos/finalizers + - operandbindinfos/status + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - operator.ibm.com resources: