From 6e34033b6fda27d4c0f9c5c1f5b92c24d3fed2e7 Mon Sep 17 00:00:00 2001 From: Mohammad Yosefpor <47300215+m-yosefpor@users.noreply.github.com> Date: Mon, 2 Oct 2023 13:35:52 +0330 Subject: [PATCH] feat: add shortnames for CRDs (#14) --- api/v1alpha1/s3bucket_types.go | 1 + api/v1alpha1/s3userclaim_types.go | 1 + config/crd/bases/s3.snappcloud.io_s3buckets.yaml | 2 ++ config/crd/bases/s3.snappcloud.io_s3userclaims.yaml | 2 ++ 4 files changed, 6 insertions(+) diff --git a/api/v1alpha1/s3bucket_types.go b/api/v1alpha1/s3bucket_types.go index 9bd9064..d80b056 100644 --- a/api/v1alpha1/s3bucket_types.go +++ b/api/v1alpha1/s3bucket_types.go @@ -41,6 +41,7 @@ type S3BucketStatus struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status // +kubebuilder:printcolumn:name="S3USERREF",type=string,JSONPath=`.spec.s3UserRef` +// +kubebuilder:resource:shortName=s3b // S3Bucket is the Schema for the s3buckets API type S3Bucket struct { diff --git a/api/v1alpha1/s3userclaim_types.go b/api/v1alpha1/s3userclaim_types.go index 5e5be70..ea00f0b 100644 --- a/api/v1alpha1/s3userclaim_types.go +++ b/api/v1alpha1/s3userclaim_types.go @@ -53,6 +53,7 @@ type S3UserClaimStatus struct { // +kubebuilder:printcolumn:name="MAX SIZE",type=string,JSONPath=`.status.quota.maxSize` // +kubebuilder:printcolumn:name="MAX BUCKETS",type=string,JSONPath=`.status.quota.maxBuckets` // +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=`.metadata.creationTimestamp` +// +kubebuilder:resource:shortName=s3u type S3UserClaim struct { metav1.TypeMeta `json:",inline"` diff --git a/config/crd/bases/s3.snappcloud.io_s3buckets.yaml b/config/crd/bases/s3.snappcloud.io_s3buckets.yaml index 3bfabc5..fd69f0e 100644 --- a/config/crd/bases/s3.snappcloud.io_s3buckets.yaml +++ b/config/crd/bases/s3.snappcloud.io_s3buckets.yaml @@ -12,6 +12,8 @@ spec: kind: S3Bucket listKind: S3BucketList plural: s3buckets + shortNames: + - s3b singular: s3bucket scope: Namespaced versions: diff --git a/config/crd/bases/s3.snappcloud.io_s3userclaims.yaml b/config/crd/bases/s3.snappcloud.io_s3userclaims.yaml index 207d6fd..bdcb9bc 100644 --- a/config/crd/bases/s3.snappcloud.io_s3userclaims.yaml +++ b/config/crd/bases/s3.snappcloud.io_s3userclaims.yaml @@ -12,6 +12,8 @@ spec: kind: S3UserClaim listKind: S3UserClaimList plural: s3userclaims + shortNames: + - s3u singular: s3userclaim scope: Namespaced versions: