action

package
v0.0.0-...-4465a45 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectCluster

func ConnectCluster() *kubernetes.Clientset

Initiate communication with cluster

func GetClientSet

func GetClientSet(kubeconfigPath string) *kubernetes.Clientset

func GetClusterName

func GetClusterName() string

kubectl config --current-context

func GetKubeConfigPath

func GetKubeConfigPath() string

~/.kube/config

func GetLabels

func GetLabels(metadata metav1.ObjectMeta) map[string]string

func GetUser

func GetUser(cluster string) (string, error)

func ListApps

func ListApps(clientSet kubernetes.Interface, namespace string) (*v1.PodList, error)

Return a pointer to a list of Pods

func PrintApps

func PrintApps(mapApps map[string]App)

func PrintLabels

func PrintLabels(mapApps map[string]App)

Print Labels for each pods

func Run

func Run(filters AppFilters) error

func SanitizeConfigMap

func SanitizeConfigMap(configMap []byte) string

func TrimClusterName

func TrimClusterName(cluster []byte) string

Remove the line feed on the cluster Name

Types

type App

type App struct {
	KubeContext KubeContext
	// contains filtered or unexported fields
}

type AppFilters

type AppFilters struct {
	Filters []string
}

type AppMatcher

type AppMatcher struct {
	// contains filtered or unexported fields
}

func (AppMatcher) Matches

func (r AppMatcher) Matches(s string) bool

type AppsRun

type AppsRun struct {
	Application string
	Config      map[string]string
}

func (*AppsRun) Run

func (c *AppsRun) Run() error

type Chart

type Chart struct {
	// contains filtered or unexported fields
}

type ChartMatcher

type ChartMatcher struct {
	// contains filtered or unexported fields
}

func (ChartMatcher) Matches

func (r ChartMatcher) Matches(s string) bool

type ChartUpdate

type ChartUpdate struct {
	Filename     string
	AppFilters   []string
	ChartFilters []string
	Apply        bool
	RepoUpdate   bool
}

func (*ChartUpdate) Run

func (c *ChartUpdate) Run() error

type Connection

type Connection struct {
	KubeConfigPath string
	ClientSet      *kubernetes.Clientset
	Cluster        string
}

func (Connection) NewConnection

func (clusterConnection Connection) NewConnection() bool

type JobContext

type JobContext struct {
	Name      string
	Pod       string
	Container string
}

type JobYaml

type JobYaml struct {
	Metadata struct {
		Name string
	}
	Spec struct {
		Template struct {
			Spec struct {
				Containers []struct {
					Name string
				}
			}
		}
	}
}

type KubeContext

type KubeContext struct {
	Namespace   string
	Cluster     string
	Application string
}

type Matcher

type Matcher interface {
	Matches(s string) bool
}

func CreateAppMatchers

func CreateAppMatchers(s []string) []Matcher

func CreateChartMatchers

func CreateChartMatchers(s []string) []Matcher

type RepoMatcher

type RepoMatcher struct {
	// contains filtered or unexported fields
}

func (RepoMatcher) Matches

func (r RepoMatcher) Matches(s string) bool

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

type TemplateField

type TemplateField struct {
	Name     string
	Optional bool
	Default  string
}

func ListTemplateFields

func ListTemplateFields(t *template.Template) []TemplateField

func NewField

func NewField(node string) (TemplateField, error)

Jump to

Keyboard shortcuts

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