Closed anoopcs9 closed 2 years ago
Are there generated files that will need to be checked in?
make manifests
will bring in the following required changes to SmbShare CRD.
diff --git a/config/crd/bases/samba-operator.samba.org_smbshares.yaml b/config/crd/bases/samba-operator.samba.org_smbshares.yaml
index 54d34e6..f2f6753 100644
--- a/config/crd/bases/samba-operator.samba.org_smbshares.yaml
+++ b/config/crd/bases/samba-operator.samba.org_smbshares.yaml
@@ -14,7 +14,23 @@ spec:
singular: smbshare
scope: Namespaced
versions:
- - name: v1alpha1
+ - additionalPrinterColumns:
+ - description: Name of the Samba share
+ jsonPath: .spec.shareName
+ name: Share-name
+ type: string
+ - description: Path for the share within PVC
+ jsonPath: .spec.storage.pvc.path
+ name: Share-path
+ type: string
+ - description: Samba availability mode
+ jsonPath: .spec.scaling.availabilityMode
+ name: Availability
+ type: string
+ - jsonPath: .metadata.creationTimestamp
+ name: Age
+ type: date
+ name: v1alpha1
schema:
openAPIV3Schema:
description: SmbShare is the Schema for the smbshares API
@@ -46,6 +62,7 @@ spec:
description: Scaling specifies parameters relating to how share resources can and should be scaled.
properties:
availabilityMode:
+ default: standard
description: AvailabilityMode specifies how the operator is to scale share resources for (high-)availability purposes.
enum:
- standard
May be we also add the above diff to the commit.
Apart from AGE following details are added to
kubectl get
output:Before:
After:
Above SmbShare CR was created using smbshare_ctdb1.yaml
Ref: https://book.kubebuilder.io/reference/markers/crd.html