runway.module.k8s module

K8s (kustomize) module.

runway.module.k8s.gen_overlay_dirs(environment, region)[source]

Generate possible overlay directories.

runway.module.k8s.get_module_defined_k8s_ver(k8s_version_opts, env_name)[source]

Return version of Terraform requested in module options.

runway.module.k8s.get_overlay_dir(overlays_path, environment, region)[source]

Determine overlay directory to use.

runway.module.k8s.generate_response(overlay_path, module_path, environment, region)[source]

Determine if environment is defined.

class runway.module.k8s.K8s(context, path, options=None)[source]

Bases: runway.module.RunwayModule

Kubectl Runway Module.

Instantiate class.

Parameters
  • context (Context) – Runway context object.

  • path (Union[str, Path]) – Path to the module.

  • options (Dict[str, Dict[str, Any]]) – Everything in the module definition merged with applicable values from the deployment definition.

run_kubectl(command='plan')[source]

Run kubectl.

plan()[source]

Run kustomize build and display generated plan.

deploy()[source]

Run kubectl apply.

destroy()[source]

Run kubectl delete.