config

package
v0.0.0-...-d7e65e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func K8sRestConfig

func K8sRestConfig() (*rest.Config, error)

K8sRestConfig gets rest config for K8s cluster

func NewK8sClientSet

func NewK8sClientSet(k8sRestConfig *rest.Config) (kubernetes.Interface, error)

NewK8sClientSet creates and returns client set

Types

type Git

type Git struct {
	Owner        string `yaml:"owner"`
	Repo         string `yaml:"repo"`
	Ref          string `yaml:"ref"`
	FilePath     string `yaml:"filePath"`
	AccessToken  string `yaml:"accessToken"`
	PullInterval string `yaml:"pullInterval"`
	AuthRequired bool   `yaml:"authRequired"`
	Disabled     bool   `yaml:"disabled"`
}

Git holds config that can be used to connect to Git repo

type K8sClient

type K8sClient struct {
	Clientset kubernetes.Interface
}

K8sClient represents the Kubernetes client object

func NewK8sClient

func NewK8sClient(k8sRestConfig *rest.Config, k8sClientSet func(*rest.Config) (kubernetes.Interface, error)) (*K8sClient, error)

NewK8sClient creates and returns kuberentes client

type Provider

type Provider struct {
	Git *Git `yaml:"git"`
}

Provider holds the config of all the supported config providers

type Reloader

type Reloader struct {
	Provider       Provider `yaml:"configProvider"`
	Resource       Resource `yaml:"resource"`
	ReloadEndpoint string   `yaml:"reloadEndpoint"`
}

Reloader holds reloader config

type ReloaderConfig

type ReloaderConfig struct {
	Reloaders []Reloader `yaml:"reloaders"`
}

ReloaderConfig holds slice of reloaders

func LoadConfig

func LoadConfig(configFilePath string) (*ReloaderConfig, error)

LoadConfig loads the reloaders config from the config file

type Resource

type Resource map[string]interface{}

Resource holds resource config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL