Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 070ee2c

Browse files
authored
Merge pull request #585 from bnallapeta/shortnames
✨Modify type.go to include shortNames for few Packet CRDs
2 parents b121ae6 + c37086a commit 070ee2c

9 files changed

+12
-6
lines changed

api/v1alpha3/packetcluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type PacketClusterStatus struct {
5656
}
5757

5858
// +kubebuilder:subresource:status
59-
// +kubebuilder:resource:path=packetclusters,scope=Namespaced,categories=cluster-api
59+
// +kubebuilder:resource:path=packetclusters,shortName=pcl,scope=Namespaced,categories=cluster-api
6060
// +kubebuilder:object:root=true
6161
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this PacketCluster belongs"
6262
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="PacketCluster ready status"

api/v1alpha3/packetmachine_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ type PacketMachineStatus struct {
105105

106106
// +kubebuilder:subresource:status
107107
// +kubebuilder:object:root=true
108-
// +kubebuilder:resource:path=packetmachines,scope=Namespaced,categories=cluster-api
108+
// +kubebuilder:resource:path=packetmachines,shortName=pma,scope=Namespaced,categories=cluster-api
109109
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this PacketMachine belongs"
110110
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.instanceState",description="Packet instance state"
111111
// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready",description="Machine ready status"

api/v1alpha3/packetmachinetemplate_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type PacketMachineTemplateSpec struct {
2626
}
2727

2828
// +kubebuilder:object:root=true
29-
// +kubebuilder:resource:path=packetmachinetemplates,scope=Namespaced,categories=cluster-api
29+
// +kubebuilder:resource:path=packetmachinetemplates,shortName=pmt,scope=Namespaced,categories=cluster-api
3030

3131
// PacketMachineTemplate is the Schema for the packetmachinetemplates API
3232
type PacketMachineTemplate struct {

api/v1beta1/packetcluster_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type PacketClusterStatus struct {
6565
}
6666

6767
// +kubebuilder:subresource:status
68-
// +kubebuilder:resource:path=packetclusters,scope=Namespaced,categories=cluster-api
68+
// +kubebuilder:resource:path=packetclusters,shortName=pcl,scope=Namespaced,categories=cluster-api
6969
// +kubebuilder:object:root=true
7070
// +kubebuilder:storageversion
7171
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this PacketCluster belongs"

api/v1beta1/packetmachine_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ type PacketMachineStatus struct {
132132

133133
// +kubebuilder:subresource:status
134134
// +kubebuilder:object:root=true
135-
// +kubebuilder:resource:path=packetmachines,scope=Namespaced,categories=cluster-api
135+
// +kubebuilder:resource:path=packetmachines,shortName=pma,scope=Namespaced,categories=cluster-api
136136
// +kubebuilder:storageversion
137137
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this PacketMachine belongs"
138138
// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.instanceState",description="Packet instance state"

api/v1beta1/packetmachinetemplate_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type PacketMachineTemplateSpec struct {
2626
}
2727

2828
// +kubebuilder:object:root=true
29-
// +kubebuilder:resource:path=packetmachinetemplates,scope=Namespaced,categories=cluster-api
29+
// +kubebuilder:resource:path=packetmachinetemplates,shortName=pmt,scope=Namespaced,categories=cluster-api
3030
// +kubebuilder:storageversion
3131

3232
// PacketMachineTemplate is the Schema for the packetmachinetemplates API

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
kind: PacketCluster
1515
listKind: PacketClusterList
1616
plural: packetclusters
17+
shortNames:
18+
- pcl
1719
singular: packetcluster
1820
scope: Namespaced
1921
versions:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
kind: PacketMachine
1515
listKind: PacketMachineList
1616
plural: packetmachines
17+
shortNames:
18+
- pma
1719
singular: packetmachine
1820
scope: Namespaced
1921
versions:

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
kind: PacketMachineTemplate
1515
listKind: PacketMachineTemplateList
1616
plural: packetmachinetemplates
17+
shortNames:
18+
- pmt
1719
singular: packetmachinetemplate
1820
scope: Namespaced
1921
versions:

0 commit comments

Comments
 (0)