diff --git a/Makefile b/Makefile index 44a5940..d448a83 100644 --- a/Makefile +++ b/Makefile @@ -158,6 +158,7 @@ generate: setup -p ./pkg/apis/credstash/v1alpha1 \ -h ./hack/boilerplate.go.txt -r "-" @go generate ./... + @cp deploy/crds/credstash.ouzi.tech_credstashsecrets_crd.yaml deploy/helm/credstash-operator/crds/crds.yaml CHART_NAME ?= credstash-operator CHART_VERSION ?= 0.0.0 diff --git a/deploy/crds/credstash.ouzi.tech_credstashsecrets_crd.yaml b/deploy/crds/credstash.ouzi.tech_credstashsecrets_crd.yaml index 25538a5..5367dc1 100644 --- a/deploy/crds/credstash.ouzi.tech_credstashsecrets_crd.yaml +++ b/deploy/crds/credstash.ouzi.tech_credstashsecrets_crd.yaml @@ -3,6 +3,11 @@ kind: CustomResourceDefinition metadata: name: credstashsecrets.credstash.ouzi.tech spec: + additionalPrinterColumns: + - JSONPath: .status.name + description: The managed secret + name: Secret + type: string group: credstash.ouzi.tech names: kind: CredstashSecret diff --git a/deploy/helm/credstash-operator/crds/crds.yaml b/deploy/helm/credstash-operator/crds/crds.yaml index 27b2318..5367dc1 100644 --- a/deploy/helm/credstash-operator/crds/crds.yaml +++ b/deploy/helm/credstash-operator/crds/crds.yaml @@ -3,6 +3,11 @@ kind: CustomResourceDefinition metadata: name: credstashsecrets.credstash.ouzi.tech spec: + additionalPrinterColumns: + - JSONPath: .status.name + description: The managed secret + name: Secret + type: string group: credstash.ouzi.tech names: kind: CredstashSecret @@ -38,6 +43,8 @@ spec: properties: key: type: string + name: + type: string table: type: string version: @@ -54,6 +61,6 @@ spec: type: object version: v1alpha1 versions: - - name: v1alpha1 - served: true - storage: true \ No newline at end of file + - name: v1alpha1 + served: true + storage: true diff --git a/pkg/apis/credstash/v1alpha1/credstashsecret_types.go b/pkg/apis/credstash/v1alpha1/credstashsecret_types.go index 9aa0039..9242725 100644 --- a/pkg/apis/credstash/v1alpha1/credstashsecret_types.go +++ b/pkg/apis/credstash/v1alpha1/credstashsecret_types.go @@ -33,6 +33,7 @@ type CredstashSecretStatus struct { // CredstashSecret is the Schema for the credstashsecrets API // +kubebuilder:subresource:status // +kubebuilder:resource:path=credstashsecrets,scope=Namespaced +// +kubebuilder:printcolumn:name="Secret",type="string",JSONPath=".status.name",description="The managed secret" type CredstashSecret struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"`