Documentation ¶
Index ¶
- func DefaultClientConfig(flags *pflag.FlagSet) kclientcmd.ClientConfig
- func NewCommandTemplateRouter(name string) *cobra.Command
- type Config
- type KeyFunc
- type RouterSelection
- func (o *RouterSelection) AdmissionCheck(route *routev1.Route) error
- func (o *RouterSelection) Bind(flag *pflag.FlagSet)
- func (o *RouterSelection) Complete() error
- func (o *RouterSelection) NewFactory(routeclient routeclientset.Interface, ...) *controllerfactory.RouterControllerFactory
- func (o *RouterSelection) RouteAdmissionFunc() controller.RouteAdmissionFunc
- func (o *RouterSelection) RouteUpdate(route *routev1.Route)
- type RouterStats
- type TemplateRouter
- type TemplateRouterConfigManager
- type TemplateRouterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientConfig ¶
func DefaultClientConfig(flags *pflag.FlagSet) kclientcmd.ClientConfig
func NewCommandTemplateRouter ¶
NewCommndTemplateRouter provides CLI handler for the template router backend
Types ¶
type Config ¶
type Config struct { // CommonConfig is the shared base config for both the OpenShift config and Kubernetes config CommonConfig restclient.Config // Namespace is the namespace to act in Namespace string // contains filtered or unexported fields }
Config contains all the necessary bits for client configuration
func (*Config) Clients ¶
func (cfg *Config) Clients() (kclientset.Interface, error)
Clients returns an OpenShift and a Kubernetes client from a given configuration
func (*Config) KubeConfig ¶
func (cfg *Config) KubeConfig() (*restclient.Config, string, error)
KubeConfig returns the Kubernetes configuration
type KeyFunc ¶
KeyFunc returns the value associated with the provided key or false if no such key exists.
type RouterSelection ¶
type RouterSelection struct { RouterName string RouterCanonicalHostname string ResyncInterval time.Duration UpdateStatus bool HostnameTemplate string RouterDomain string OverrideHostname bool OverrideDomains []string RedactedDomains sets.String LabelSelector string FieldSelector string Namespace string NamespaceLabelSelector string NamespaceLabels labels.Selector ProjectLabelSelector string ProjectLabels labels.Selector IncludeUDP bool DeniedDomains []string DenylistedDomains sets.String AllowedDomains []string AllowlistedDomains sets.String AllowWildcardRoutes bool DisableNamespaceOwnershipCheck bool ExtendedValidation bool UpgradeValidation bool UpgradeValidationForceAddCondition bool UpgradeValidationForceRemoveCondition bool ListenAddr string // WatchEndpoints when true will watch Endpoints instead of // EndpointSlices. WatchEndpoints bool // AllowExternalCertificates when true enables RouteSecretManager plugin and the external certificate validation. // The cluster-ingress-operator sets it if RouteExternalCertificate feature-gate is enabled. AllowExternalCertificates bool }
RouterSelection controls what routes and resources on the server are considered part of this router.
func (*RouterSelection) AdmissionCheck ¶
func (o *RouterSelection) AdmissionCheck(route *routev1.Route) error
func (*RouterSelection) Bind ¶
func (o *RouterSelection) Bind(flag *pflag.FlagSet)
Bind sets the appropriate labels
func (*RouterSelection) Complete ¶
func (o *RouterSelection) Complete() error
Complete converts string representations of field and label selectors to their parsed equivalent, or returns an error.
func (*RouterSelection) NewFactory ¶
func (o *RouterSelection) NewFactory(routeclient routeclientset.Interface, projectclient projectclient.ProjectInterface, kc kclientset.Interface) *controllerfactory.RouterControllerFactory
NewFactory initializes a factory that will watch the requested routes
func (*RouterSelection) RouteAdmissionFunc ¶
func (o *RouterSelection) RouteAdmissionFunc() controller.RouteAdmissionFunc
RouteAdmissionFunc returns a func that checks if a route can be admitted based on denylist & allowlist checks and wildcard routes policy setting. Note: Entries in the denylist take precedence over the allowlist ones.
func (*RouterSelection) RouteUpdate ¶
func (o *RouterSelection) RouteUpdate(route *routev1.Route)
RouteUpdate updates the route before it is seen by the cache.
type RouterStats ¶
type RouterStats struct { StatsPortString string StatsPasswordFile string StatsUsernameFile string StatsPassword string StatsUsername string StatsPort int }
func (*RouterStats) Bind ¶
func (o *RouterStats) Bind(flag *pflag.FlagSet)
type TemplateRouter ¶
type TemplateRouter struct { WorkingDir string TemplateFile string ReloadScript string ReloadInterval time.Duration DefaultCertificate string DefaultCertificatePath string DefaultCertificateDir string DefaultDestinationCAPath string BindPortsAfterSync bool MaxConnections string Ciphers string StrictSNI bool MetricsType string CaptureHTTPRequestHeadersString string CaptureHTTPResponseHeadersString string CaptureHTTPCookieString string CaptureHTTPRequestHeaders []templateplugin.CaptureHTTPHeader CaptureHTTPResponseHeaders []templateplugin.CaptureHTTPHeader CaptureHTTPCookie *templateplugin.CaptureHTTPCookie HTTPHeaderNameCaseAdjustmentsString string HTTPHeaderNameCaseAdjustments []templateplugin.HTTPHeaderNameCaseAdjustment HTTPResponseHeadersString string HTTPResponseHeaders []templateplugin.HTTPHeader HTTPRequestHeadersString string HTTPRequestHeaders []templateplugin.HTTPHeader TemplateRouterConfigManager }
func (*TemplateRouter) Bind ¶
func (o *TemplateRouter) Bind(flag *pflag.FlagSet)
type TemplateRouterOptions ¶
type TemplateRouterOptions struct { Config *Config TemplateRouter RouterStats RouterSelection }
func (*TemplateRouterOptions) Complete ¶
func (o *TemplateRouterOptions) Complete() error
func (*TemplateRouterOptions) Run ¶
func (o *TemplateRouterOptions) Run(stopCh <-chan struct{}) error
Run launches a template router using the provided options. It never exits.
func (*TemplateRouterOptions) Validate ¶
func (o *TemplateRouterOptions) Validate() error