vks-k8s-auth v0.0.1
Initial release of a Go client library for authenticating against a vSphere Supervisor (VKS) and consuming its Kubernetes API.
Core features:
- Supervisor login — authenticates against the vSphere Supervisor API using username/password (VksAuthConfig), with optional custom port and TlsInsecureSkipVerify.
- Kubernetes client construction — builds a ready-to-use controller-runtime client (VksK8sAuthClient) backed by the Supervisor's TLS info and bearer token, so it can be used directly for Get/List/Create/etc.
- Kubeconfig generation — produces a standalone kubeconfig YAML string from the authenticated session
- JWT token handling — TokenExpiry() and TokenValid() inspect the JWT claims to check expiration; RefreshToken() re-authenticates to obtain a fresh token.
- Configurable HTTP timeout — VksAuthConfig.Timeout (seconds) for the login call, defaulting to 20s.