Closed shi-ron closed 3 years ago
In your values.yaml, k8s_cluster_name
can be set to set your cluster name in your .kube/config
Assign a different value to this value for each cluster so you can switch clusters without re-authenticating. This helm configuration maps to K8S_CLUSTER_NAME
in the orchestra
OpenUnison
object.
If I login in e. g. k8s1
and k8s2
with the same username me
as config:
clusters:
- cluster:
name: k8s1
...
- cluster:
name: k8s2
...
contexts:
- context:
name: k8s1
cluster: k8s1
user: me
- context:
name: k8s2
cluster: k8s2
user: me
...
users:
- name: me
user:
client-certificate-data: ...
client-key-data: ...
then I need to update token, because user me
can save only one token.
I hope the config looks like:
clusters:
- cluster:
name: k8s1
...
- cluster:
name: k8s2
...
contexts:
- context:
name: k8s1
cluster: k8s1
user: me@k8s1
- context:
name: k8s2
cluster: k8s2
user: me@k8s2
...
users:
- name: me@k8s1
user:
client-certificate-data: ...
client-key-data: ...
- name: me@k8s2
user:
client-certificate-data: ...
client-key-data: ...
where the user are me@k8s1
and me@k8s2
respectively. And this should be configured by pasting the command line, not manually, of course.
i see your point. we're working on a new release, which should be out by end of month, that will address this.
The latest release includes this update. Roll out a new version of the Deployment
and new containers will get pulled with this feature enabled
I suggest the user identifier string contains username and cluster in config. Thus, it would be convenient to switch context without updating token of the same user.