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

Config: New incluster and incluster_dns constructors #1001

Merged
merged 10 commits into from Sep 9, 2022

Commits on Sep 7, 2022

  1. client: Expose a Config constructor to support legacy configurations

    The `Config::from_cluster_env` constructor is misleadingly named: it
    doesn't use the environment, it uses the default cluster configurations.
    
    This change deprecates the `Config::from_cluster_env` constructor in
    favor of `Config::load_in_cluster`. An additional constructor,
    `Config::load_in_cluster_from_legacy_env`, uses the
    `KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT` environment
    variables to match client-go's behavior.
    
    This changes does NOT alter the default inferred configuration in any
    way. It simply allows users to opt-in to using the old behavior.
    
    Related to kubernetes/kubernetes#112263
    Closes kube-rs#1000
    
    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 7, 2022
    Copy the full SHA
    4e3743e View commit details
    Browse the repository at this point in the history
  2. constify "https" scheme to make accidental "http" harder

    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 7, 2022
    Copy the full SHA
    5ffdb5e View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2022

  1. Restore Config::from_cluster_env naming

    Add `Config::from_cluster_dns` to support the current behavior.
    
    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 9, 2022
    Copy the full SHA
    dd00e12 View commit details
    Browse the repository at this point in the history
  2. Disable the in-cluster rustls test

    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 9, 2022
    Copy the full SHA
    4a6aaf3 View commit details
    Browse the repository at this point in the history
  3. fix typo

    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 9, 2022
    Copy the full SHA
    d272478 View commit details
    Browse the repository at this point in the history
  4. client: Make discovery conditional on the TLS impl

    When `rustls-tls` is enabled, the `kubernetes.default.svc` DNS name is
    used. Otherwise, the `KUBERNETES_SERVICE_{HOST,PORT}` environment
    variables are used.
    
    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 9, 2022
    Copy the full SHA
    bf4d07c View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    698d353 View commit details
    Browse the repository at this point in the history
  6. Review feedback

    * Make `Config::incluster_env` and `Config::incluster_dns` public
      regardless of what features are enabled.
    * Restrict visibility for `pub` helpers that are not actually publicly
      exported.
    
    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 9, 2022
    Copy the full SHA
    be9da2b View commit details
    Browse the repository at this point in the history
  7. Add URI-formatting tests

    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 9, 2022
    Copy the full SHA
    7c9645c View commit details
    Browse the repository at this point in the history
  8. fmt

    Signed-off-by: Oliver Gould <ver@buoyant.io>
    olix0r committed Sep 9, 2022
    Copy the full SHA
    727d809 View commit details
    Browse the repository at this point in the history