README

Knative Common Packages

sink

"The kitchen sink" by Alan Cleaver is licensed under CC BY 2.0

GoDoc Go Report Card codecov

Knative pkg provides a place for sharing common Knative packages across the Knative repos.

To learn more about Knative, please visit our Knative docs repository.

If you are interested in contributing, see CONTRIBUTING.md and DEVELOPMENT.md.

Expand ▾ Collapse ▴

Directories

Path Synopsis
apiextensions
+k8s:deepcopy-gen=package
+k8s:deepcopy-gen=package
duck
Package duck defines logic for defining and consuming "duck typed" Kubernetes resources.
Package duck defines logic for defining and consuming "duck typed" Kubernetes resources.
duck/v1
+k8s:deepcopy-gen=package +groupName=duck.knative.dev
+k8s:deepcopy-gen=package +groupName=duck.knative.dev
duck/v1alpha1
+k8s:deepcopy-gen=package +groupName=duck.knative.dev
+k8s:deepcopy-gen=package +groupName=duck.knative.dev
duck/v1beta1
+k8s:deepcopy-gen=package +groupName=duck.knative.dev
+k8s:deepcopy-gen=package +groupName=duck.knative.dev
test/example/v1alpha1
+k8s:deepcopy-gen=package +groupName=sample.knative.dev
+k8s:deepcopy-gen=package +groupName=sample.knative.dev
test/pub/v1alpha1
+k8s:deepcopy-gen=package +groupName=sample.knative.dev
+k8s:deepcopy-gen=package +groupName=sample.knative.dev
Package changeset provides Knative utilities for fetching GitHub Commit ID from kodata directory.
Package changeset provides Knative utilities for fetching GitHub Commit ID from kodata directory.
client
codegen
Package configmap exists to facilitate consuming Kubernetes ConfigMap resources in various ways, including: - Watching them for changes over time, and - Loading them from a VolumeMount.
Package configmap exists to facilitate consuming Kubernetes ConfigMap resources in various ways, including: - Watching them for changes over time, and - Loading them from a VolumeMount.
Package depcheck defines a test utility for ensuring certain packages don't take on heavy dependencies.
Package depcheck defines a test utility for ensuring certain packages don't take on heavy dependencies.
Package hash contains various Knative specific hashing utilities.
Package hash contains various Knative specific hashing utilities.
Package injection defines the mechanisms through which clients, informers and shared informer factories are injected into a shared controller binary implementation.
Package injection defines the mechanisms through which clients, informers and shared informer factories are injected into a shared controller binary implementation.
Package kflag contains a variety of non-standard command-line flag types
Package kflag contains a variety of non-standard command-line flag types
Package kmeta provides Knative utilities for operating on Kubernetes resources' ObjectMeta.
Package kmeta provides Knative utilities for operating on Kubernetes resources' ObjectMeta.
Package kmp wraps github.com/google/go-cmp with custom Comparers for frequently used kubernetes resources that have unexported fields.
Package kmp wraps github.com/google/go-cmp with custom Comparers for frequently used kubernetes resources that have unexported fields.
Simple abstraction for storing state on a k8s ConfigMap.
Simple abstraction for storing state on a k8s ConfigMap.
chaosduck
The chaosduck binary is an e2e testing tool for leader election, which loads the leader election configuration within the system namespace and periodically kills one of the leader pods for each HA component.
The chaosduck binary is an e2e testing tool for leader election, which loads the leader election configuration within the system namespace and periodically kills one of the leader pods for each HA component.
Package metrics provides Knative utilities for exporting metrics to Stackdriver backend or Prometheus backend based on config-observability settings.
Package metrics provides Knative utilities for exporting metrics to Stackdriver backend or Prometheus backend based on config-observability settings.
metricstest
Package metricstest simplifies some of the common boilerplate around testing metrics exports.
Package metricstest simplifies some of the common boilerplate around testing metrics exports.
Package network holds the typed objects that define the schemas for configuring the knative networking layer.
Package network holds the typed objects that define the schemas for configuring the knative networking layer.
handlers
Package handlers holds useful HTTP handler implementations.
Package handlers holds useful HTTP handler implementations.
Package pool contains a simple threadpool implementation that accepts work in the form of `func() error` function.
Package pool contains a simple threadpool implementation that accepts work in the form of `func() error` function.
Package ptr holds utilities for taking pointer references to values.
Package ptr holds utilities for taking pointer references to values.
testing
Package testing includes utilities for testing controllers.
Package testing includes utilities for testing controllers.
Package resolver implements resolvers for resolving k8s references and URIs.
Package resolver implements resolvers for resolving k8s references and URIs.
Package source holds utilities for Source developers.
Package source holds utilities for Source developers.
cmd
gcs
gke
ha
interactive
Helper functions for running interactive CLI sessions from Go Helper functions for running interactive CLI sessions from Go
Helper functions for running interactive CLI sessions from Go Helper functions for running interactive CLI sessions from Go
logstream
Package logstream lets end-to-end tests incorporate controller logs into the error output of tests.
Package logstream lets end-to-end tests incorporate controller logs into the error output of tests.
monitoring
Package monitoring provides common methods for all the monitoring components used in the tests This package exposes following methods: CheckPortAvailability(port int) error Checks if the given port is available GetPods(kubeClientset kubernetes.Interface, app string) (*v1.PodList, error) Gets the list of pods that satisfy the label selector app=<app> Cleanup(pid int) error Kill the current port forwarding process running in the background PortForward(logf logging.FormatLogger, podList *v1.PodList, localPort, remotePort int) (int, error) Create a background process that will port forward the first pod from the local to remote port It returns the process id for the background process created.
Package monitoring provides common methods for all the monitoring components used in the tests This package exposes following methods: CheckPortAvailability(port int) error Checks if the given port is available GetPods(kubeClientset kubernetes.Interface, app string) (*v1.PodList, error) Gets the list of pods that satisfy the label selector app=<app> Cleanup(pid int) error Kill the current port forwarding process running in the background PortForward(logf logging.FormatLogger, podList *v1.PodList, localPort, remotePort int) (int, error) Create a background process that will port forward the first pod from the local to remote port It returns the process id for the background process created.
zipkin
Package zipkin adds Zipkin tracing support that can be used in conjunction with SpoofingClient to log zipkin traces for requests that have encountered server errors i.e HTTP request that have HTTP status between 500 to 600.
Package zipkin adds Zipkin tracing support that can be used in conjunction with SpoofingClient to log zipkin traces for requests that have encountered server errors i.e HTTP request that have HTTP status between 500 to 600.
+k8s:deepcopy-gen=package +groupName=pkg.knative.dev
+k8s:deepcopy-gen=package +groupName=pkg.knative.dev
duck
+k8s:deepcopy-gen=package +groupName=duck.knative.dev
+k8s:deepcopy-gen=package +groupName=duck.knative.dev
third_party
config
Package config holds the typed objects that define the schemas for assorted ConfigMap objects on which the Revision controller depends.
Package config holds the typed objects that define the schemas for assorted ConfigMap objects on which the Revision controller depends.
Package tracker defines a utility to enable Reconcilers to trigger reconciliations when objects that are cross-referenced change, so that the level-based reconciliation can react to the change.
Package tracker defines a utility to enable Reconcilers to trigger reconciliations when objects that are cross-referenced change, so that the level-based reconciliation can react to the change.
psbinding
Package psbinding provides facilities to make authoring Bindings that work with "Pod Spec"-able subjects easier.
Package psbinding provides facilities to make authoring Bindings that work with "Pod Spec"-able subjects easier.