Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cache auth tokens in GenServer per connection #302

Merged
merged 4 commits into from
Feb 5, 2024
Merged

feat: cache auth tokens in GenServer per connection #302

merged 4 commits into from
Feb 5, 2024

Commits on Jan 25, 2024

  1. feat: start a dynamic supervisor for auth providers

    Summary:
    
    - Start `K8s.Conn.Auth.ProviderSupervisor`
    - Start `K8s.Conn.Auth.ExecWorker` for kube context with auth exec
      configured. This respects expiration and will not give out known
      expired tokens.
    - Start `K8s.Conn.Auth.ServiceAccountWorker` for connections started
      with `K8s.Conn.from_service_account/2`. This periodically refreshes
      the token.
    - Add refresh timers with jitter on for all of those
    - Start `K8s.Conn.Auth.CertificateWorker` for kube context where given a
      .pem file. Some cloud providers are giving very short duration certs.
    
    Test Plan:
    
    - Added test for exec parsing
    - Added test for exec worker
    - Added test for service account
    - Added integration-ish test for service account worker refresh
    - Changed test for certificate to ensure genserver
    - Added test for certificate worker
    
    `mix test`
    elliottneilclark committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    9365258 View commit details
    Browse the repository at this point in the history
  2. fix: allow auth genserver to crash and restart

    Summary:
    This adds on a registry and a standard name for many of the auth
    providers. It allows for shared workers when the paths are the same and
    for genserver to crash, get re-started and not have errors due to stale
    pids.
    
    Test Plan:
    Tests were updated
    elliottneilclark committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    99c05d6 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    d9719ba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2a2dee3 View commit details
    Browse the repository at this point in the history