vcf_vks¶
VKS bridge — Supervisor kubeconfig fetch, optional saltext-kubernetes handoff.
This module gives an operator a single call to materialize a Supervisor
kubeconfig (writing it to disk) so subsequent calls into the
saltext-kubernetes extension can talk to the Supervisor API server.
The bridge is intentionally thin: it does NOT depend on
saltext-kubernetes at import time. Install the vks extra
(pip install 'saltext.vcf[vks]') to get the runtime dependency.
- saltext.vcf.modules.vcf_vks.fetch_kubeconfig(cluster_id, path=None, namespace=None, profile=None)[source]¶
Fetch a Supervisor kubeconfig and (optionally) write it to path.
Returns a dict
{"path": ..., "kubeconfig": "<yaml>"}. When path is omitted, the file is written to~/.kube/vks-<cluster_id>.config. The file is created with mode 0o600.If namespace is provided, fetches a namespace-scoped kubeconfig (limits the user to that single namespace).
CLI Example:
salt '*' vcf_vks.fetch_kubeconfig <cluster_id> <path> <namespace>
- saltext.vcf.modules.vcf_vks.saltext_kubernetes_available()[source]¶
Probe whether the
saltext-kubernetesextension is importable.Returns
Truewhensaltext.kubernetesand itskubernetesclient dependency are present in the current Python environment.CLI Example:
salt '*' vcf_vks.saltext_kubernetes_available