Documentation
¶
Overview ¶
Package minke implmenets a minimalist Kubernetes Ingress Controller.
Index ¶
- func NewPrometheusMetrics(r *prometheus.Registry) *prometheusMetricsProvider
- func SetProvider(p MetricsProvider)
- type Controller
- func (c *Controller) GetCertificate(info *tls.ClientHelloInfo) (*tls.Certificate, error)
- func (c *Controller) GetClientCertificate(info *tls.CertificateRequestInfo) (*tls.Certificate, error)
- func (c *Controller) HasSynced() bool
- func (c *Controller) MarshalJSON() ([]byte, error)
- func (c *Controller) Run(stopCh <-chan struct{})
- func (c *Controller) ServeLivezHTTP(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ServeReadyzHTTP(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ServeStatusHTTP(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Stop()
- type CounterMetric
- type GaugeMetric
- type MetricsProvider
- type Option
- func WithAccessLogFunc(f func(string, ...interface{})) Option
- func WithClass(cls string) Option
- func WithClientHTTP2Transport(t *http2.Transport) Option
- func WithClientHTTPTransport(t *http.Transport) Option
- func WithClientTLSSecret(str string) Option
- func WithDefaultBackend(str string) Option
- func WithDefaultHTTPRedirect(redir bool) Option
- func WithDefaultTLSSecrets(strs ...string) Option
- func WithLogFunc(f func(string, ...interface{})) Option
- func WithMetricsProvider(m MetricsProvider) Option
- func WithNamespace(ns string) Option
- func WithSelector(s labels.Selector) Option
- func WithSetQuicHeaders(f func(http.Header) error) Option
- func WithTracer(t trace.Tracer) Option
- type SummaryMetric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrometheusMetrics ¶
func NewPrometheusMetrics(r *prometheus.Registry) *prometheusMetricsProvider
func SetProvider ¶
func SetProvider(p MetricsProvider)
Types ¶
type Controller ¶
Controller is the main thing
func New ¶
func New(client kubernetes.Interface, opts ...Option) (*Controller, error)
New creates a new one
func (*Controller) GetCertificate ¶
func (c *Controller) GetCertificate(info *tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificate selects a cert from an ingress if one is available.
func (*Controller) GetClientCertificate ¶
func (c *Controller) GetClientCertificate(info *tls.CertificateRequestInfo) (*tls.Certificate, error)
GetClientCertificate selects a cert from an ingress if one is available.
func (*Controller) HasSynced ¶
func (c *Controller) HasSynced() bool
func (*Controller) MarshalJSON ¶
func (c *Controller) MarshalJSON() ([]byte, error)
MarshalJSON lets us report the status of the controller
func (*Controller) Run ¶
func (c *Controller) Run(stopCh <-chan struct{})
func (*Controller) ServeLivezHTTP ¶
func (c *Controller) ServeLivezHTTP(w http.ResponseWriter, r *http.Request)
func (*Controller) ServeReadyzHTTP ¶
func (c *Controller) ServeReadyzHTTP(w http.ResponseWriter, r *http.Request)
func (*Controller) ServeStatusHTTP ¶
func (c *Controller) ServeStatusHTTP(w http.ResponseWriter, r *http.Request)
func (*Controller) Stop ¶
func (c *Controller) Stop()
type CounterMetric ¶
type CounterMetric interface {
Inc()
}
type GaugeMetric ¶
type GaugeMetric interface {
Set(float64)
}
type MetricsProvider ¶
type MetricsProvider interface { NewListsMetric(name string) cache.CounterMetric NewListDurationMetric(name string) cache.SummaryMetric NewItemsInListMetric(name string) cache.SummaryMetric NewWatchesMetric(name string) cache.CounterMetric NewShortWatchesMetric(name string) cache.CounterMetric NewWatchDurationMetric(name string) cache.SummaryMetric NewItemsInWatchMetric(name string) cache.SummaryMetric NewLastResourceVersionMetric(name string) cache.GaugeMetric NewDepthMetric(name string) workqueue.GaugeMetric NewAddsMetric(name string) workqueue.CounterMetric NewLatencyMetric(name string) workqueue.HistogramMetric NewLongestRunningProcessorSecondsMetric(name string) workqueue.SettableGaugeMetric NewUnfinishedWorkSecondsMetric(name string) workqueue.SettableGaugeMetric NewWorkDurationMetric(name string) workqueue.HistogramMetric NewRetriesMetric(name string) workqueue.CounterMetric NewHTTPTransportMetrics(upstream http.RoundTripper) http.RoundTripper NewHTTPServerMetrics(upstream http.Handler) http.Handler }
type Option ¶
type Option func(*Controller) error
Option for setting controller properties
func WithAccessLogFunc ¶
WithAccessLogFunc is an option for setting a log function
func WithClientHTTPTransport ¶
func WithClientTLSSecret ¶
func WithDefaultBackend ¶
WithDefaultBackend sets the backend to be used as defaultBackend when none is specified
func WithDefaultHTTPRedirect ¶
WithDefaultHTTPRedirect is an option for setting whether the default behaviour should be to redirect http requests to https
func WithDefaultTLSSecrets ¶
func WithLogFunc ¶
WithLogFunc is an option for setting a log function
func WithMetricsProvider ¶
func WithMetricsProvider(m MetricsProvider) Option
WithMetricsProvider is an option for setting a provider to register and track metrics
func WithNamespace ¶
WithNamespace is an option for setting the set of namespaces to watch
func WithSelector ¶
WithSelector is an option for setting a selector to filter the set of ingresses we will manage
func WithSetQuicHeaders ¶
WithSetQuicHeaders is an option for setting a function the is used to set the Quic altSvc header
func WithTracer ¶
WithTracer is an option for setting a Tracer
type SummaryMetric ¶
type SummaryMetric interface {
Observe(float64)
}