KubeLinterStorage#

class phalanx.storage.kube_linter.KubeLinterStorage(config_path)#

Bases: object

Storage layer for running kube-linter.

kube-linter checks rendered Kubernetes resources for problems that helm lint cannot see, such as two environment variables with the same name in one container. The checks to run are configured in the .kube-linter.yaml file at the root of the Phalanx repository.

Parameters:

config_path (Path) – Path to the kube-linter configuration file.

Methods Summary

lint_application(application, environment, ...)

Run kube-linter on the resources of an application.

Methods Documentation

lint_application(application, environment, resources)#

Run kube-linter on the resources of an application.

Any lint errors are sent to standard output, and a failure message is printed to standard error.

Parameters:
  • application (str) – Name of the application, used in the failure message.

  • environment (str) – Name of the environment, used in the failure message.

  • resources (str) – Rendered Kubernetes resources for the application in that environment, as produced by helm template.

Returns:

Whether the check passed.

Return type:

bool

This page was last modified on .