Skip to content

Commit

Permalink
Add csm columns (#29)
Browse files Browse the repository at this point in the history
* fix crd permission
fix annotation set

* Adding columns for csm

* Fixing format issues

* Update csm_types.go

* Update driver-config-params.yaml

Co-authored-by: jkumar <[email protected]>
  • Loading branch information
abhi16394 and jkumar authored Feb 15, 2022
1 parent f0cfa8a commit 25ec958
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 23 deletions.
5 changes: 5 additions & 0 deletions api/v1alpha1/csm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ type ContainerStorageModuleStatus struct {
State CSMStateType `json:"state,omitempty" yaml:"state"`
}

// +kubebuilder:validation:Optional
// +kubebuilder:resource:scope=Namespaced,shortName={"csm"}
// +kubebuilder:printcolumn:name="CreationTime",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:printcolumn:name="CSIDriverType",type=string,JSONPath=`.spec.driver.csiDriverType`,description="Type of CSIDriver"
// +kubebuilder:printcolumn:name="ConfigVersion",type=string,JSONPath=`.spec.driver.configVersion`,description="Version of CSIDriver"
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

Expand Down
26 changes: 15 additions & 11 deletions config/crd/bases/storage.dell.com_containerstoragemodules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,24 @@ spec:
kind: ContainerStorageModule
listKind: ContainerStorageModuleList
plural: containerstoragemodules
shortNames:
- csm
singular: containerstoragemodule
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: CreationTime
type: date
- description: Type of CSIDriver
jsonPath: .spec.driver.csiDriverType
name: CSIDriverType
type: string
- description: Version of CSIDriver
jsonPath: .spec.driver.configVersion
name: CONFIGVERSION
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: ContainerStorageModule is the Schema for the containerstoragemodules
Expand Down Expand Up @@ -1031,18 +1045,11 @@ spec:
description: Parameters is a map of driver specific parameters
for snapshot class
type: object
required:
- name
type: object
type: array
tlsCertSecret:
description: TLSCertSecret is the name of the TLS Cert secret
type: string
required:
- common
- configVersion
- csiDriverType
- replicas
type: object
modules:
description: Modules is list of Container Storage Module modules you
Expand Down Expand Up @@ -1258,9 +1265,6 @@ spec:
name:
description: Name is name of ContainerStorageModule modules
type: string
required:
- enabled
- name
type: object
type: array
type: object
Expand Down
26 changes: 15 additions & 11 deletions deploy/crds/storage.dell.com_containerstoragemodules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,24 @@ spec:
kind: ContainerStorageModule
listKind: ContainerStorageModuleList
plural: containerstoragemodules
shortNames:
- csm
singular: containerstoragemodule
scope: Namespaced
versions:
- name: v1alpha1
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: CreationTime
type: date
- description: Type of CSIDriver
jsonPath: .spec.driver.csiDriverType
name: CSIDriverType
type: string
- description: Version of CSIDriver
jsonPath: .spec.driver.configVersion
name: CONFIGVERSION
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: ContainerStorageModule is the Schema for the containerstoragemodules API
Expand Down Expand Up @@ -716,18 +730,11 @@ spec:
type: string
description: Parameters is a map of driver specific parameters for snapshot class
type: object
required:
- name
type: object
type: array
tlsCertSecret:
description: TLSCertSecret is the name of the TLS Cert secret
type: string
required:
- common
- configVersion
- csiDriverType
- replicas
type: object
modules:
description: Modules is list of Container Storage Module modules you want to deploy
Expand Down Expand Up @@ -875,9 +882,6 @@ spec:
name:
description: Name is name of ContainerStorageModule modules
type: string
required:
- enabled
- name
type: object
type: array
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
namespace: <DriverDefaultReleaseNamespace>
data:
driver-config-params.yaml: |
CSI_LOG_LEVEL: debug
CSI_LOG_LEVEL: debug

0 comments on commit 25ec958

Please sign in to comment.