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

Pluggable step that load the Kubeconfig from a file.

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

Pass :relative_to_home? to interprete the :path relative to the current user's home directory at run time.

step Kubereq.Kubeconfig.File, path: ".kube/config", relative_to_home?: true

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.
  • :relative_to_home - (optional) Interprete the :path as relative to the user's home directory at runtime. Defaults to false.
  • :! - (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.