Documentation ¶
Index ¶
- func Client() (client *kubernetes.Clientset)
- func IsMinikube(ctx context.Context) (isMinikube bool, err kv.Error)
- func RestConfig() (client *rest.Config)
- func TasksRunner(ctx context.Context, debugMode bool, triggerC chan *TaskSpec, ...)
- func TasksStart(ctx context.Context, debugMode bool, triggerC chan *TaskSpec, ...)
- func TrimNamespace(ns string) (trimmed string)
- type MicroK8s
- type Status
- type Task
- type TaskSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client() (client *kubernetes.Clientset)
Client returns the clientset used to access the Kubernetes cluster that is being used to run our pods within the CI/CD pipeline
func IsMinikube ¶
IsMinikube will test the operating environment of the present process to determine if it is running within a minikube provisioned cluster
func RestConfig ¶
RestConfig returns the rest configuration used to access the Kubernetes cluster Pods that are being created
func TasksRunner ¶
func TasksRunner(ctx context.Context, debugMode bool, triggerC chan *TaskSpec, statusC chan *Status)
TasksRunner will listen for changes to a git repository and trigger downstream tasks that will process and consume the change
func TasksStart ¶
TasksStart is used to initate a git change notification processing go routine
func TrimNamespace ¶
TrimNamespace can be used to trim strings that consist of words with dash '-' separators and a semver style format consisting of trailing branch names potentially and a unique ID on the very end to 64 characters, of significant information. Examples of names might include 0.9.23-feature-265-zero-length-metadata-reinstated-aaaagmwypak
Types ¶
type MicroK8s ¶
type MicroK8s struct{}
MicroK8s is used to encapsulate receivers for working with microk8s clusters
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task encapsulates the entire context of a Kubernetes batch job/pod, including the persistent volume that is being used to transport the state related to the pipeline actions being undertaken, for example a git cloned repository.
type TaskSpec ¶
type TaskSpec struct { Namespace string // The Kubernetes namespace being used for running the CI bootstrapping ID string Dir string Dockerfile string Env map[string]string JobSpec *batchv1.Job SecretSpecs []*v1.Secret ServiceSpecs []*v1.Service }
TaskSpec encapsulates the information used when initating the bootstrapping pods and jobs involved in generation of images etc