Documentation
¶
Index ¶
- Constants
- Variables
- func KsvcLabelVisibilityClusterLocal(ksvc *servingv1.Service) *servingv1.Service
- func MakeKService(namespace, name, image string, opts ...KsvcOpts) *servingv1.Service
- type KsvcOpts
- func EnvVar(name, val string) KsvcOpts
- func KsvcLabels(ls labels.Set) KsvcOpts
- func KsvcOwner(owner kmeta.OwnerRefable) KsvcOpts
- func KsvcPodEnvVars(env []corev1.EnvVar) KsvcOpts
- func KsvcPodLabels(ls labels.Set) KsvcOpts
- func KsvcServiceAccount(serviceaccount string) KsvcOpts
- func SecretMount(name string, target string, secret *corev1.SecretKeySelector) KsvcOpts
Constants ¶
View Source
const ( EnvName = "NAME" EnvNamespace = "NAMESPACE" EnvMetricsDomain = "METRICS_DOMAIN" DefaultMetricsDomain = "triggermesh.io/targets" )
Common environment variables propagated to adapters.
View Source
const ( // name of the application AppNameLabel = "app.kubernetes.io/name" // unique name identifying the instance of an application AppInstanceLabel = "app.kubernetes.io/instance" // component within the architecture AppComponentLabel = "app.kubernetes.io/component" // name of a higher level application this one is part of AppPartOfLabel = "app.kubernetes.io/part-of" // tool being used to manage the operation of an application AppManagedByLabel = "app.kubernetes.io/managed-by" )
Kubernetes recommended labels https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/
View Source
const ( PartOf = "knative-targets" ManagedController = "knative-targets-controller" AdapterComponent = "adapter" )
Common label values
Variables ¶
View Source
var LabelsPropagationList = []string{
"bridges.triggermesh.io/id",
"flow.triggermesh.io/created-by",
}
LabelsPropagationList is the list of labels that should be propagated to the adapters.
Functions ¶
func KsvcLabelVisibilityClusterLocal ¶
KsvcLabelVisibilityClusterLocal sets label to avoid exposing the service externally.
Types ¶
type KsvcOpts ¶
KsvcOpts configures Knative service.
func KsvcPodEnvVars ¶
KsvcPodEnvVars sets pod's first container env vars.
func KsvcServiceAccount ¶
KsvcServiceAccount sets the ServiceAccount.
func SecretMount ¶ added in v1.14.1
func SecretMount(name string, target string, secret *corev1.SecretKeySelector) KsvcOpts
SecretMount returns a build option that adds a volume mount to a service.
Click to show internal directories.
Click to hide internal directories.