Documentation ¶
Index ¶
- Constants
- Variables
- func FilterLabels(ctx context.Context, labels map[string]string) map[string]string
- func GenerateLabels(eventListenerName string, staticResourceLabels map[string]string) map[string]string
- func ListenerHostname(el *v1beta1.EventListener, c Config) string
- func MakeContainer(el *v1beta1.EventListener, configAcc reconcilersource.ConfigAccessor, c Config, ...) corev1.Container
- func MakeCustomObject(ctx context.Context, el *v1beta1.EventListener, ...) (*unstructured.Unstructured, error)
- func MakeDeployment(ctx context.Context, el *v1beta1.EventListener, ...) (*appsv1.Deployment, error)
- func MakeService(ctx context.Context, el *v1beta1.EventListener, c Config) *corev1.Service
- func ObjectMeta(el *v1beta1.EventListener, ...) metav1.ObjectMeta
- func ServicePort(el *v1beta1.EventListener, c Config) corev1.ServicePort
- func UpdateCustomObject(originalData, updatedCustomObject *unstructured.Unstructured) (bool, *duckv1.WithPod, error)
- type Config
- type ConfigOption
- type ContainerOption
Constants ¶
View Source
const (
TriggersMetricsDomain = "tekton.dev/triggers"
)
Variables ¶
View Source
var ( // DefaultImage is the image used by default. DefaultImage = "override-with-el:latest" // DefaultPort is the port used by default. DefaultPort = 8080 // DefaultSetSecurityContext is the SetSecurityContext value used by default. DefaultSetSecurityContext = true // DefaultEventListenerEvent is the EventListenerEvent value used by default. DefaultEventListenerEvent = "disable" // DefaultReadTimeout is the ReadTimeout used by default. DefaultReadTimeout = int64(5) // DefaultWriteTimeout is the WriteTimeout used by default. DefaultWriteTimeout = int64(40) // DefaultIdleTimeout is the IdleTimeout used by default. DefaultIdleTimeout = int64(30) // DefaultTimeOutHandler is the TimeOutHandler timeout used by default. DefaultTimeOutHandler = int64(5) // DefaultPeriodSeconds is the PeriodSeconds used by default. DefaultPeriodSeconds = 10 // DefaultFailureThreshold is the FailureThreshold used by default. DefaultFailureThreshold = 3 // DefaultHTTPClientReadTimeOut is the HTTPClient ReadTimeOut used by default. DefaultHTTPClientReadTimeOut = int64(30) // DefaultHTTPClientKeepAlive is the HTTPClient KeepAlive used by default DefaultHTTPClientKeepAlive = int64(30) // DefaultHTTPClientTLSHandshakeTimeout is the HTTPClient TLS Handshake timeout used by default DefaultHTTPClientTLSHandshakeTimeout = int64(10) // DefaultHTTPClientResponseHeaderTimeout is the HTTPClient Response Header Timeout DefaultHTTPClientResponseHeaderTimeout = int64(10) // DefaultHTTPClientExpectContinueTimeout is the HTTPClient Expect Continue Timeout DefaultHTTPClientExpectContinueTimeout = int64(1) // DefaultStaticResourceLabels are the StaticResourceLabels used by default. DefaultStaticResourceLabels = map[string]string{ "app.kubernetes.io/managed-by": "EventListener", "app.kubernetes.io/part-of": "Triggers", } // DefaultSystemNamespace is the default system namespace used. DefaultSystemNamespace = "tekton-pipelines" )
Functions ¶
func FilterLabels ¶ added in v0.17.0
FilterLabels filters label based on regex pattern defined in feature-flag `labels-exclusion-pattern`
func GenerateLabels ¶
func GenerateLabels(eventListenerName string, staticResourceLabels map[string]string) map[string]string
GenerateLabels generates the labels to be used on all generated resources.
func ListenerHostname ¶
func ListenerHostname(el *v1beta1.EventListener, c Config) string
ListenerHostname returns the intended hostname for the EventListener service.
func MakeContainer ¶
func MakeContainer(el *v1beta1.EventListener, configAcc reconcilersource.ConfigAccessor, c Config, opts ...ContainerOption) corev1.Container
func MakeCustomObject ¶
func MakeCustomObject(ctx context.Context, el *v1beta1.EventListener, configAcc reconcilersource.ConfigAccessor, c Config) (*unstructured.Unstructured, error)
func MakeDeployment ¶
func MakeDeployment(ctx context.Context, el *v1beta1.EventListener, configAcc reconcilersource.ConfigAccessor, c Config) (*appsv1.Deployment, error)
func MakeService ¶
func ObjectMeta ¶
func ObjectMeta(el *v1beta1.EventListener, filteredElLabels, staticResourceLabels map[string]string) metav1.ObjectMeta
ObjectMeta generates the object meta that should be used by all resources generated by the EventListener reconciler
func ServicePort ¶
func ServicePort(el *v1beta1.EventListener, c Config) corev1.ServicePort
func UpdateCustomObject ¶ added in v0.17.0
func UpdateCustomObject(originalData, updatedCustomObject *unstructured.Unstructured) (bool, *duckv1.WithPod, error)
Types ¶
type Config ¶
type Config struct { // Image defines the container that we use to run in the EventListener Pods. Image *string // Port defines the port for the EventListener to listen on. Port *int // SetSecurityContext defines if the security context is set. SetSecurityContext *bool // SetEventListenerEvent defines to enable or disable of emitting events for EventListener. SetEventListenerEvent *string // ReadTimeOut defines the read timeout for EventListener Server. ReadTimeOut *int64 // WriteTimeOut defines the write timeout for EventListener Server. WriteTimeOut *int64 // IdleTimeOut defines the read timeout for EventListener Server. IdleTimeOut *int64 // TimeOutHandler defines the timeout for Timeout Handler of EventListener Server. TimeOutHandler *int64 // HTTPClientReadTimeOut defines the Read timeout for HTTP Client HTTPClientReadTimeOut *int64 // HTTPClientKeepAlive defines the Keep Alive for HTTP Client HTTPClientKeepAlive *int64 // HTTPClientTLSHandshakeTimeout defines the Handshake timeout for HTTP Client HTTPClientTLSHandshakeTimeout *int64 // HTTPClientResponseHeaderTimeout defines the Response Header timeout for HTTP Client HTTPClientResponseHeaderTimeout *int64 // HTTPClientExpectContinueTimeout defines the Expect timeout for HTTP Client HTTPClientExpectContinueTimeout *int64 // PeriodSeconds defines Period Seconds for the EventListener Liveness and Readiness Probes. PeriodSeconds *int // FailureThreshold defines the Failure Threshold for the EventListener Liveness and Readiness Probes. FailureThreshold *int // StaticResourceLabels is a map with all the labels that should be on all resources generated by the EventListener. StaticResourceLabels map[string]string // SystemNamespace is the namespace where the reconciler is deployed. SystemNamespace string }
func MakeConfig ¶
func MakeConfig(ops ...ConfigOption) *Config
MakeConfig is a helper to build a config that is consumed by an EventListener. It generates a default Config for the EventListener without any flags set and accepts functions for modification.
type ConfigOption ¶
type ConfigOption func(d *Config)
type ContainerOption ¶
Click to show internal directories.
Click to hide internal directories.