module Helm

Overview

TODO Get global response for helm

TODO Get version number of global response for helm

TODO If version of helm not 3 or greater, act as if helm is not installed

TODO If version of helm is 3, return helm installed

Defined in:

modules/helm/constants.cr
modules/helm/helm.cr
modules/helm/utils/system_information.cr

Constant Summary

BASE_CONFIG = "./config.yml"
BinarySingleton = BinaryReference.new
CANNOT_REUSE_RELEASE_NAME = "cannot re-use a name that is still in use"
DEFAULT_ARCH = "linux-amd64"
DEFAULT_LOCAL_BINARY_PATH = "tools/helm"
Log = ::Log.for("Helm")
RELEASE_NOT_FOUND = "Release not loaded:|release: not found"

helm CMD errors

REPO_NOT_FOUND = "repo .* not found|is not a valid chart"

Class Method Summary

Class Method Detail

def self.all_workload_resources(yml : Array(YAML::Any), default_namespace : String = "default") : Array(YAML::Any) #

[View source]
def self.chart_name(helm_chart_repo) : String #

[View source]
def self.ensure_resource_with_namespace(resource : YAML::Any, default_namespace : String) : YAML::Any #

[View source]
def self.generate_manifest(release_name : String, namespace : String) : String #

[View source]
def self.helm_gives_k8s_warning? : Tuple(Bool, String | Nil) #

[View source]
def self.helm_repo_add(helm_repo_name, helm_repo_url) : Bool #

[View source]
def self.install(release_name : String, helm_chart : String, namespace : String | Nil = nil, create_namespace = false, values = nil) : CMDResult #

the way values currently work is they are combined with the chart (e.g. coredns --values FILENAME.yaml or coredns --set test.value.test=new_value --set test.value.anothertest=new_value)


[View source]
def self.kind_exists?(args, config, kind, default_namespace : String = "default") : Bool #

[View source]
def self.pull(helm_repo_name, helm_chart_name, version = nil, destination = nil, untar = true) : CMDResult #

[View source]
def self.pull_oci(oci_address, version = nil, destination = nil, untar = true) : CMDResult #

This method could be overloaded but there is a trap - if calling this method without all args provided, to make use of default values for them, both method could be easily matched.


[View source]
def self.template(release_name, helm_chart_or_directory, output_file : String = "cnfs/temp_template.yml", namespace : String | Nil = nil, values : String | Nil = nil) : CMDResult #

[View source]
def self.uninstall(release_name, namespace = nil) : CMDResult #

[View source]
def self.workload_resource_by_kind(ymls : Array(YAML::Any), kind : String) : Array(YAML::Any) #

[View source]
def self.workload_resource_kind_names(resources : Array(YAML::Any), default_namespace : String = "default") : Array(NamedTuple(kind: String, name: String, namespace: String)) #

[View source]