Add shortNames to CRDs(#693)
Add `shortNames` to kube api-resource CRDs. Short-names make it easier when interacting/troubleshooting api-resources with kubectl. We have tried to follow the naming convention similar to what K8s uses which should help with avoiding any naming conflicts as well. For example: * `Deployment` has a shortName of deploy, so added rdeploy for `runnerdeployment` * `HorizontalPodAutoscaler` has a shortName of hpa, so added hra for `HorizontalRunnerAutoscaler` * `ReplicaSets` has a shortName of rs, so added rrs for `runnerreplicaset` Co-authored-by: abhinav454 <43758739+abhinav454@users.noreply.github.com>
This commit is contained in:
parent
f858e2e432
commit
b27b6ea2a8
|
|
@ -223,6 +223,7 @@ type CacheEntry struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
|
// +kubebuilder:resource:shortName=hra
|
||||||
// +kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
// +kubebuilder:printcolumn:JSONPath=".spec.minReplicas",name=Min,type=number
|
// +kubebuilder:printcolumn:JSONPath=".spec.minReplicas",name=Min,type=number
|
||||||
// +kubebuilder:printcolumn:JSONPath=".spec.maxReplicas",name=Max,type=number
|
// +kubebuilder:printcolumn:JSONPath=".spec.maxReplicas",name=Max,type=number
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ type RunnerDeploymentStatus struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
|
// +kubebuilder:resource:shortName=rdeploy
|
||||||
// +kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
// +kubebuilder:printcolumn:JSONPath=".spec.replicas",name=Desired,type=number
|
// +kubebuilder:printcolumn:JSONPath=".spec.replicas",name=Desired,type=number
|
||||||
// +kubebuilder:printcolumn:JSONPath=".status.replicas",name=Current,type=number
|
// +kubebuilder:printcolumn:JSONPath=".status.replicas",name=Current,type=number
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ type RunnerTemplate struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// +kubebuilder:object:root=true
|
// +kubebuilder:object:root=true
|
||||||
|
// +kubebuilder:resource:shortName=rrs
|
||||||
// +kubebuilder:subresource:status
|
// +kubebuilder:subresource:status
|
||||||
// +kubebuilder:printcolumn:JSONPath=".spec.replicas",name=Desired,type=number
|
// +kubebuilder:printcolumn:JSONPath=".spec.replicas",name=Desired,type=number
|
||||||
// +kubebuilder:printcolumn:JSONPath=".status.replicas",name=Current,type=number
|
// +kubebuilder:printcolumn:JSONPath=".status.replicas",name=Current,type=number
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ spec:
|
||||||
kind: HorizontalRunnerAutoscaler
|
kind: HorizontalRunnerAutoscaler
|
||||||
listKind: HorizontalRunnerAutoscalerList
|
listKind: HorizontalRunnerAutoscalerList
|
||||||
plural: horizontalrunnerautoscalers
|
plural: horizontalrunnerautoscalers
|
||||||
|
shortNames:
|
||||||
|
- hra
|
||||||
singular: horizontalrunnerautoscaler
|
singular: horizontalrunnerautoscaler
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ spec:
|
||||||
kind: RunnerDeployment
|
kind: RunnerDeployment
|
||||||
listKind: RunnerDeploymentList
|
listKind: RunnerDeploymentList
|
||||||
plural: runnerdeployments
|
plural: runnerdeployments
|
||||||
|
shortNames:
|
||||||
|
- rdeploy
|
||||||
singular: runnerdeployment
|
singular: runnerdeployment
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ spec:
|
||||||
kind: RunnerReplicaSet
|
kind: RunnerReplicaSet
|
||||||
listKind: RunnerReplicaSetList
|
listKind: RunnerReplicaSetList
|
||||||
plural: runnerreplicasets
|
plural: runnerreplicasets
|
||||||
|
shortNames:
|
||||||
|
- rrs
|
||||||
singular: runnerreplicaset
|
singular: runnerreplicaset
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ spec:
|
||||||
kind: HorizontalRunnerAutoscaler
|
kind: HorizontalRunnerAutoscaler
|
||||||
listKind: HorizontalRunnerAutoscalerList
|
listKind: HorizontalRunnerAutoscalerList
|
||||||
plural: horizontalrunnerautoscalers
|
plural: horizontalrunnerautoscalers
|
||||||
|
shortNames:
|
||||||
|
- hra
|
||||||
singular: horizontalrunnerautoscaler
|
singular: horizontalrunnerautoscaler
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ spec:
|
||||||
kind: RunnerDeployment
|
kind: RunnerDeployment
|
||||||
listKind: RunnerDeploymentList
|
listKind: RunnerDeploymentList
|
||||||
plural: runnerdeployments
|
plural: runnerdeployments
|
||||||
|
shortNames:
|
||||||
|
- rdeploy
|
||||||
singular: runnerdeployment
|
singular: runnerdeployment
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ spec:
|
||||||
kind: RunnerReplicaSet
|
kind: RunnerReplicaSet
|
||||||
listKind: RunnerReplicaSetList
|
listKind: RunnerReplicaSetList
|
||||||
plural: runnerreplicasets
|
plural: runnerreplicasets
|
||||||
|
shortNames:
|
||||||
|
- rrs
|
||||||
singular: runnerreplicaset
|
singular: runnerreplicaset
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
versions:
|
versions:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue