You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project's mission is to make it easy to ship changes to a Kubernetes namespace and understand the result. Our contributors' guide explicitly explains that we do not support global resources:
Global resources
This project is intended to manage a namespace (or a label-delimited subsection of one). It does not officially support non-namespaced resources. In practice, we do model custom resource definitions specifically, because it helps us better handle custom resources (which typically are namespaced). However, our intent is to keep this the only exception to the rule.
However, in practice, we blindly kubectl applyany resource we don't recognize, including those that are global. That means that invoking us can have (intended or otherwise) side-effects in the global namespace. Because of this (and likely the fact that our user-facing documentation makes no mention of globals one way or the other), we've received more than one request to predeploy global resources.
I strongly believe that our deploy command should keep its mission of managing a namespace, and I would like to introduce safeguards against global side-effects as part of the transition to Krane.
A) Somehow (TBD) identify global resources during validation, and fail fast if the template set includes any. In the error, explain global resource management best practices and suggest using kubectl apply directly for them.
B) Same as the above, but build a krane command we can point them to. Given that the top-level objects are largely configuration data, this command would likely do little beyond kubectl apply anyway. There's at least one exception though: CRDs, which we already model, have meaningful status conditions. We could go through the list above to get a better idea of the potential value here. If we build such a thing, and it supports pruning, it should probably enforce label selector usage (pruning global resources unconditionally... eeek).
@Shopify/cloudx
The text was updated successfully, but these errors were encountered:
I also feel strongly that we shouldn't cut off the ability to use global objects until we support a command that handles them.(Even if it starts as a thing wrapper over kubectl apply)
Proposal
This project's mission is to make it easy to ship changes to a Kubernetes namespace and understand the result. Our contributors' guide explicitly explains that we do not support global resources:
However, in practice, we blindly
kubectl apply
any resource we don't recognize, including those that are global. That means that invoking us can have (intended or otherwise) side-effects in the global namespace. Because of this (and likely the fact that our user-facing documentation makes no mention of globals one way or the other), we've received more than one request to predeploy global resources.I strongly believe that our deploy command should keep its mission of managing a namespace, and I would like to introduce safeguards against global side-effects as part of the transition to Krane.
Resources affected
kubectl api-resources --namespaced=false
Options
A) Somehow (TBD) identify global resources during validation, and fail fast if the template set includes any. In the error, explain global resource management best practices and suggest using
kubectl apply
directly for them.B) Same as the above, but build a
krane
command we can point them to. Given that the top-level objects are largely configuration data, this command would likely do little beyondkubectl apply
anyway. There's at least one exception though: CRDs, which we already model, have meaningful status conditions. We could go through the list above to get a better idea of the potential value here. If we build such a thing, and it supports pruning, it should probably enforce label selector usage (pruning global resources unconditionally... eeek).@Shopify/cloudx
The text was updated successfully, but these errors were encountered: