Documentation ¶
Index ¶
- func Contains(list []string, s string) bool
- func CopyUntypedMap(source map[string]interface{}) map[string]interface{}
- func GetEnvSettings(env map[string]string) *cli.EnvSettings
- func GetLabelsByInstance(metaObj metav1.ObjectMeta, env map[string]string) (string, string)
- func InitActionConfig(getter genericclioptions.RESTClientGetter, kubeconfig []byte, ...) (*action.Configuration, error)
- func LoadChartIndex(chart, repository, namespace string, c client.Client) (*repo.ChartVersions, error)
- func ManagerOptions(config string) (*manager.Options, error)
- func MergeMaps(source, dest map[string]interface{}) map[string]interface{}
- func MergeUntypedMaps(dest, source map[string]interface{}, keys ...string) map[string]interface{}
- func RandomString(n int) string
- type ClientInterface
- type Config
- type HTTPClientInterface
- type HelmRESTClientGetter
- func (c *HelmRESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (c *HelmRESTClientGetter) ToRESTConfig() (*rest.Config, error)
- func (c *HelmRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)
- func (c *HelmRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig
- type LeaderElection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyUntypedMap ¶
CopyUntypedMap return a copy of a map with strings as keys and empty interface as value
func GetEnvSettings ¶
func GetEnvSettings(env map[string]string) *cli.EnvSettings
GetEnvSettings represents func for returning helm cli settings which are needed for helm actions
func GetLabelsByInstance ¶
GetLabelsByInstance represents func for parsing labels by k8s objectMeta and env map
func InitActionConfig ¶
func InitActionConfig(getter genericclioptions.RESTClientGetter, kubeconfig []byte, logger logr.Logger) (*action.Configuration, error)
InitActionConfig represents the initialization of an helm configuration
func LoadChartIndex ¶
func MergeMaps ¶
MergeMaps returns distinct map of two as input have to be called as a goroutine to avoid memory leaks
func MergeUntypedMaps ¶
MergeUntypedMaps returns distinct map of two as input
func RandomString ¶
RandomString return a string with random chars of length n
Types ¶
type ClientInterface ¶
type ClientInterface interface { GetResource(name, namespace, resource, group, version string, opts metav1.GetOptions) ([]byte, error) ListResources(namespace, resource, group, version string, opts metav1.ListOptions) ([]byte, error) }
ClientInterface repesents interface for mocking custom k8s client
type Config ¶
type Config struct { HealthProbeBindAddress string `yaml:"healthProbeBindAddress"` MetricsBindAddress string `yaml:"metricsBindAddress"` LeaderElection LeaderElection `yaml:"leaderElection"` WebhookPort int `yaml:"webhookPort"` }
type HTTPClientInterface ¶
type HTTPClientInterface interface { Get(url string) (*http.Response, error) Do(req *http.Request) (*http.Response, error) }
HTTPClientInterface represents interface for mocking an http client
type HelmRESTClientGetter ¶
type HelmRESTClientGetter struct { Namespace string ReleaseNamespace string KubeConfig string IsLocal bool HelmConfig *helmv1alpha1.Config Client client.Client // contains filtered or unexported fields }
func NewRESTClientGetter ¶
func NewRESTClientGetter(config *helmv1alpha1.Config, namespace, releaseNamespace string, isLocal bool, c client.Client, logger logr.Logger) (*HelmRESTClientGetter, error)
func (*HelmRESTClientGetter) ToDiscoveryClient ¶
func (c *HelmRESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
func (*HelmRESTClientGetter) ToRESTConfig ¶
func (c *HelmRESTClientGetter) ToRESTConfig() (*rest.Config, error)
func (*HelmRESTClientGetter) ToRESTMapper ¶
func (c *HelmRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)
func (*HelmRESTClientGetter) ToRawKubeConfigLoader ¶
func (c *HelmRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig