View Source Kubereq.Kubeconfig.File (kubereq v0.3.1)

Pluggable step that load the Kubeconfig from a file.

step Kubereq.Kubeconfig.File, path: "path/to/kubeconfig-integration.yaml"

If the config file defined by the :path option is not found on disk, by default, the step gracefully returns the kubeconfig that was passed as argument. If you want the step to raise an ArgumentException instead, you can set the option !: true.

Options

  • :path - Path to the config file.
  • :! - (optional. And yes, that's a valid atom) Raise an exception if the config file is not found. Defaults to false.
  • :context - (optional) Sets the current context in case there's multiple contexts defined in the config file. Defaults to what's defined in the "current-context" field in the loaded config.