younsl opened a new pull request, #480:
URL: https://github.com/apache/superset-kubernetes-operator/pull/480

   ## Summary
   
   This PR adds sup as the [short 
name](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#create-a-customresourcedefinition)
 for the Superset resource, so kubectl get sup works the same as kubectl get 
superset. Today the resource has no short name, so every kubectl command needs 
the full superset or supersets name.
   
   sup is the first three letters of the kind, the same style that 
prometheus-operator uses for 
[prom](https://github.com/prometheus-operator/prometheus-operator/blob/121070097e6b6e3bbc3b12212f6ffc653ef6efa9/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml#L17-L18).
 It does not clash with any built-in Kubernetes resource. sset was considered 
but not used, because it reads like a StatefulSet (sts).
   
   ## Details
   
   - API: added the short name 
[marker](https://github.com/younsl/superset-kubernetes-operator/blob/095b2ffd2568c5d821889fe7ab3913fb46096bc7/api/v1alpha1/superset_types.go#L983)
 on the Superset type. The CRD in config/crd/bases and the Helm chart CRD are 
regenerated with make codegen.
   - Docs: the [installation 
guide](https://github.com/younsl/superset-kubernetes-operator/blob/095b2ffd2568c5d821889fe7ab3913fb46096bc7/docs/user-guide/installation.md?plain=1#L192)
 now mentions the short name.
   - No behavior change: existing resources and manifests keep working, and no 
workload rolls.
   
   Verification: make codegen (no further diff), make test-integration, make 
lint-md, and helm lint pass. On a Kind cluster (Kubernetes v1.37.0), kubectl 
api-resources lists sup, and kubectl get sup returns the same rows as kubectl 
get superset.
   
   <details>
   <summary>Result on Kind</summary>
   
   ```
   $ kubectl api-resources --api-group=superset.apache.org
   NAME        SHORTNAMES   APIVERSION                     NAMESPACED   KIND
   supersets   sup          superset.apache.org/v1alpha1   true         Superset
   
   $ kubectl get sup
   NAME              TAG   PHASE   LIFECYCLE   READY   AVAILABLE   AGE
   superset                                                        5s
   superset-dev                                                    5s
   superset-sample                                                 5s
   
   $ kubectl get superset
   NAME              TAG   PHASE   LIFECYCLE   READY   AVAILABLE   AGE
   superset                                                        5s
   superset-dev                                                    5s
   superset-sample                                                 5s
   ```
   
   The operator was not running in this check, so the status columns are empty.
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to