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
For the scenario, where the namespace-scoped resources such as Secret and ConfigMap need to be distributed or synchronized to different namespaces, the native k8s currently only supports manual distribution and synchronization by users one-by-one, which is very inconvenient. So OpenKruise provide a resource called ResourceDistribution to manage these resources.
But k8s support apply -f to any resources include ResourceDistribution. But you know configmap or secret usually import from a file in yaml and keep it's format may be difficult. So kubectl kruise should support to create a RescourceDistribution with a configmap/secret according a file easily.
How to do
There are two ways: 1. kustomize generator plugin, 2. kubectl kruise cmd
kustomize generator plugin
Kustomize offers a plugin framework allowing people to write their own resource generators and transformers. More details in this doc. So we can implement a generator plugin for kruise workload.
kubectl kruise implement the cmd
The defect of kustomize plugin is inconvenient to use. User has to add the plugin to target directory. So we can also implement the same generator logic in kubectl kruise like:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
BackGround
For the scenario, where the namespace-scoped resources such as Secret and ConfigMap need to be distributed or synchronized to different namespaces, the native k8s currently only supports manual distribution and synchronization by users one-by-one, which is very inconvenient. So OpenKruise provide a resource called
ResourceDistribution
to manage these resources.But k8s support apply -f to any resources include
ResourceDistribution
. But you know configmap or secret usually import from a file in yaml and keep it's format may be difficult. So kubectl kruise should support to create aRescourceDistribution
with a configmap/secret according a file easily.How to do
There are two ways: 1. kustomize generator plugin, 2. kubectl kruise cmd
kustomize generator plugin
Kustomize offers a plugin framework allowing people to write their own resource generators and transformers. More details in this doc. So we can implement a generator plugin for kruise workload.
kubectl kruise implement the cmd
The defect of kustomize plugin is inconvenient to use. User has to add the plugin to target directory. So we can also implement the same generator logic in
kubectl kruise
like:Beta Was this translation helpful? Give feedback.
All reactions