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:resource:shortName=hra
 | ||||
| // +kubebuilder:subresource:status
 | ||||
| // +kubebuilder:printcolumn:JSONPath=".spec.minReplicas",name=Min,type=number
 | ||||
| // +kubebuilder:printcolumn:JSONPath=".spec.maxReplicas",name=Max,type=number
 | ||||
|  |  | |||
|  | @ -67,6 +67,7 @@ type RunnerDeploymentStatus struct { | |||
| } | ||||
| 
 | ||||
| // +kubebuilder:object:root=true
 | ||||
| // +kubebuilder:resource:shortName=rdeploy
 | ||||
| // +kubebuilder:subresource:status
 | ||||
| // +kubebuilder:printcolumn:JSONPath=".spec.replicas",name=Desired,type=number
 | ||||
| // +kubebuilder:printcolumn:JSONPath=".status.replicas",name=Current,type=number
 | ||||
|  |  | |||
|  | @ -55,6 +55,7 @@ type RunnerTemplate struct { | |||
| } | ||||
| 
 | ||||
| // +kubebuilder:object:root=true
 | ||||
| // +kubebuilder:resource:shortName=rrs
 | ||||
| // +kubebuilder:subresource:status
 | ||||
| // +kubebuilder:printcolumn:JSONPath=".spec.replicas",name=Desired,type=number
 | ||||
| // +kubebuilder:printcolumn:JSONPath=".status.replicas",name=Current,type=number
 | ||||
|  |  | |||
|  | @ -13,6 +13,8 @@ spec: | |||
|     kind: HorizontalRunnerAutoscaler | ||||
|     listKind: HorizontalRunnerAutoscalerList | ||||
|     plural: horizontalrunnerautoscalers | ||||
|     shortNames: | ||||
|     - hra | ||||
|     singular: horizontalrunnerautoscaler | ||||
|   scope: Namespaced | ||||
|   versions: | ||||
|  |  | |||
|  | @ -11,6 +11,8 @@ spec: | |||
|     kind: RunnerDeployment | ||||
|     listKind: RunnerDeploymentList | ||||
|     plural: runnerdeployments | ||||
|     shortNames: | ||||
|       - rdeploy | ||||
|     singular: runnerdeployment | ||||
|   scope: Namespaced | ||||
|   versions: | ||||
|  |  | |||
|  | @ -11,6 +11,8 @@ spec: | |||
|     kind: RunnerReplicaSet | ||||
|     listKind: RunnerReplicaSetList | ||||
|     plural: runnerreplicasets | ||||
|     shortNames: | ||||
|       - rrs | ||||
|     singular: runnerreplicaset | ||||
|   scope: Namespaced | ||||
|   versions: | ||||
|  |  | |||
|  | @ -13,6 +13,8 @@ spec: | |||
|     kind: HorizontalRunnerAutoscaler | ||||
|     listKind: HorizontalRunnerAutoscalerList | ||||
|     plural: horizontalrunnerautoscalers | ||||
|     shortNames: | ||||
|     - hra | ||||
|     singular: horizontalrunnerautoscaler | ||||
|   scope: Namespaced | ||||
|   versions: | ||||
|  |  | |||
|  | @ -11,6 +11,8 @@ spec: | |||
|     kind: RunnerDeployment | ||||
|     listKind: RunnerDeploymentList | ||||
|     plural: runnerdeployments | ||||
|     shortNames: | ||||
|       - rdeploy | ||||
|     singular: runnerdeployment | ||||
|   scope: Namespaced | ||||
|   versions: | ||||
|  |  | |||
|  | @ -11,6 +11,8 @@ spec: | |||
|     kind: RunnerReplicaSet | ||||
|     listKind: RunnerReplicaSetList | ||||
|     plural: runnerreplicasets | ||||
|     shortNames: | ||||
|       - rrs | ||||
|     singular: runnerreplicaset | ||||
|   scope: Namespaced | ||||
|   versions: | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue