k8s

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var K8sClientWrapper = func(masterUrl string, kubeconfigPath string) kubernetes.Interface {

	k8sConfig, err := k8sclientcmd.BuildConfigFromFlags(masterUrl, kubeconfigPath)
	if err != nil {
		log.Fatalf("Failed To Build Kubernetes Config: %v", err)
	}

	return kubernetes.NewForConfigOrDie(k8sConfig)
}

K8sClientWrapper Used To Facilitate Unit Testing

Functions

func LoggingContext

func LoggingContext(ctx context.Context, component string, masterUrl string, kubeconfigPath string) context.Context

Initialize The Specified Context With A K8S Client & Logger (ConfigMap Watcher)

Note - This logic represents a stepping stone on our path towards alignment with the Knative eventing-contrib implementations.

The Channel / Dispatcher are not "injected controllers" in the knative-eventing injection framework, but still want to
leverage that implementation as much as possible to ease future refactoring.  This will allow us to use the default
knative-eventing logging configuration and dynamic updating.  To that end, we are setting up a basic context ourselves
that mirrors what the injection framework would have created.

Types

This section is empty.

Jump to

Keyboard shortcuts

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