Skip to content

Commit 1d02d90

Browse files
author
Winnie Kwon
committed
Add printcolumn, Age, to AWSClusterTemplate
Also, deleted unnecessary RBAC roles created for AWSClusterTemplate This is in line with other templates like KubeadmControlplaneTemplate or DockerClusterTemplate in CAPI.
1 parent 0d12723 commit 1d02d90

File tree

4 files changed

+8
-45
lines changed

4 files changed

+8
-45
lines changed

api/v1beta1/awsclustertemplate_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ type AWSClusterTemplateSpec struct {
3030
// +kubebuilder:object:root=true
3131
// +kubebuilder:resource:path=awsclustertemplates,scope=Namespaced,categories=cluster-api,shortName=awsct
3232
// +kubebuilder:storageversion
33+
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of AWSClusterTemplate"
3334
// +k8s:defaulter-gen=true
3435

3536
// AWSClusterTemplate is the schema for Amazon EC2 based Kubernetes Cluster Templates.

config/crd/bases/infrastructure.cluster.x-k8s.io_awsclustertemplates.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,12 @@ spec:
342342
type: object
343343
served: true
344344
storage: false
345-
- name: v1beta1
345+
- additionalPrinterColumns:
346+
- description: Time duration since creation of AWSClusterTemplate
347+
jsonPath: .metadata.creationTimestamp
348+
name: Age
349+
type: date
350+
name: v1beta1
346351
schema:
347352
openAPIV3Schema:
348353
description: AWSClusterTemplate is the schema for Amazon EC2 based Kubernetes
@@ -696,6 +701,7 @@ spec:
696701
type: object
697702
served: true
698703
storage: true
704+
subresources: {}
699705
status:
700706
acceptedNames:
701707
kind: ""

config/rbac/awsclustertemplate_editor_role.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

config/rbac/awsclustertemplate_viewer_role.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)