Documentation ¶
Index ¶
- Constants
- func DeleteGatewayRouteConfig(componentName string, deployContext *chetypes.DeployContext) error
- func GetConfigmapForGatewayConfig(deployContext *chetypes.DeployContext, componentName string, ...) (corev1.ConfigMap, error)
- func SyncGatewayToCluster(deployContext *chetypes.DeployContext) (bool, error)
- type GatewayReconciler
- type TraefikConfig
- func (cfg *TraefikConfig) AddAuth(componentName string, authAddress string)
- func (cfg *TraefikConfig) AddAuthHeaderRewrite(componentName string)
- func (cfg *TraefikConfig) AddComponent(componentName string, rule string, priority int, serviceAddr string, ...)
- func (cfg *TraefikConfig) AddErrors(componentName string, status string, service string, query string)
- func (cfg *TraefikConfig) AddOpenShiftTokenCheck(componentName string)
- func (cfg *TraefikConfig) AddResponseHeaders(componentName string, headers map[string]string)
- func (cfg *TraefikConfig) AddRetry(componentName string, attempts int, initialInterval string)
- func (cfg *TraefikConfig) AddStripPrefix(componentName string, prefixes []string)
- type TraefikConfigErrors
- type TraefikConfigForwardAuth
- type TraefikConfigForwardingTimeouts
- type TraefikConfigHTTP
- type TraefikConfigHeaders
- type TraefikConfigLoadbalancer
- type TraefikConfigLoadbalancerServer
- type TraefikConfigMiddleware
- type TraefikConfigRetry
- type TraefikConfigRouter
- type TraefikConfigServersTransport
- type TraefikConfigService
- type TraefikConfigStripPrefix
- type TraefikConfigTLS
- type TraefikPlugin
- type TraefikPluginHeaderRewrite
Constants ¶
View Source
const ( // GatewayServiceName is the name of the service which through which the gateway can be accessed GatewayServiceName = "che-gateway" GatewayServicePort = 8080 GatewayConfigMapNamePrefix = "che-gateway-route-" )
View Source
const ( StripPrefixMiddlewareSuffix = "-strip-prefix" HeaderRewriteMiddlewareSuffix = "-header-rewrite" AuthMiddlewareSuffix = "-auth" ErrorsMiddlewareSuffix = "-errors" HeadersMiddlewareSuffix = "-headers" RetryMiddlewareSuffix = "-retry" )
Variables ¶
This section is empty.
Functions ¶
func DeleteGatewayRouteConfig ¶
func DeleteGatewayRouteConfig(componentName string, deployContext *chetypes.DeployContext) error
func GetConfigmapForGatewayConfig ¶
func GetConfigmapForGatewayConfig( deployContext *chetypes.DeployContext, componentName string, gatewayConfig *TraefikConfig) (corev1.ConfigMap, error)
func SyncGatewayToCluster ¶
func SyncGatewayToCluster(deployContext *chetypes.DeployContext) (bool, error)
SyncGatewayToCluster installs or deletes the gateway based on the custom resource configuration
Types ¶
type GatewayReconciler ¶
type GatewayReconciler struct {
deploy.Reconcilable
}
func NewGatewayReconciler ¶
func NewGatewayReconciler() *GatewayReconciler
func (*GatewayReconciler) Finalize ¶
func (p *GatewayReconciler) Finalize(ctx *chetypes.DeployContext) bool
func (*GatewayReconciler) Reconcile ¶
func (p *GatewayReconciler) Reconcile(ctx *chetypes.DeployContext) (reconcile.Result, bool, error)
type TraefikConfig ¶
type TraefikConfig struct {
HTTP TraefikConfigHTTP `json:"http"`
}
A representation of the Traefik config as we need it. This is in no way complete but can be used for the purposes we need it for.
func CreateEmptyTraefikConfig ¶
func CreateEmptyTraefikConfig() *TraefikConfig
func (*TraefikConfig) AddAuth ¶
func (cfg *TraefikConfig) AddAuth(componentName string, authAddress string)
func (*TraefikConfig) AddAuthHeaderRewrite ¶
func (cfg *TraefikConfig) AddAuthHeaderRewrite(componentName string)
func (*TraefikConfig) AddComponent ¶
func (*TraefikConfig) AddErrors ¶
func (cfg *TraefikConfig) AddErrors(componentName string, status string, service string, query string)
func (*TraefikConfig) AddOpenShiftTokenCheck ¶
func (cfg *TraefikConfig) AddOpenShiftTokenCheck(componentName string)
func (*TraefikConfig) AddResponseHeaders ¶
func (cfg *TraefikConfig) AddResponseHeaders(componentName string, headers map[string]string)
func (*TraefikConfig) AddRetry ¶
func (cfg *TraefikConfig) AddRetry(componentName string, attempts int, initialInterval string)
func (*TraefikConfig) AddStripPrefix ¶
func (cfg *TraefikConfig) AddStripPrefix(componentName string, prefixes []string)
type TraefikConfigErrors ¶
type TraefikConfigForwardAuth ¶
type TraefikConfigForwardAuth struct { Address string `json:"address"` TrustForwardHeader bool `json:"trustForwardHeader"` TLS *TraefikConfigTLS `json:"tls,omitempty"` }
type TraefikConfigForwardingTimeouts ¶
type TraefikConfigForwardingTimeouts struct {
DialTimeout string `json:"dialTimeout"`
}
type TraefikConfigHTTP ¶
type TraefikConfigHTTP struct { Routers map[string]*TraefikConfigRouter `json:"routers"` Services map[string]*TraefikConfigService `json:"services"` Middlewares map[string]*TraefikConfigMiddleware `json:"middlewares,omitempty"` ServersTransports map[string]*TraefikConfigServersTransport `json:"serversTransports,omitempty"` }
type TraefikConfigHeaders ¶
type TraefikConfigLoadbalancer ¶
type TraefikConfigLoadbalancer struct { Servers []TraefikConfigLoadbalancerServer `json:"servers"` ServersTransport string `json:"serversTransport,omitempty"` }
type TraefikConfigLoadbalancerServer ¶
type TraefikConfigLoadbalancerServer struct {
URL string `json:"url"`
}
type TraefikConfigMiddleware ¶
type TraefikConfigMiddleware struct { StripPrefix *TraefikConfigStripPrefix `json:"stripPrefix,omitempty"` ForwardAuth *TraefikConfigForwardAuth `json:"forwardAuth,omitempty"` Errors *TraefikConfigErrors `json:"errors,omitempty"` Headers *TraefikConfigHeaders `json:"headers,omitempty"` Retry *TraefikConfigRetry `json:"retry,omitempty"` Plugin *TraefikPlugin `json:"plugin,omitempty"` }
type TraefikConfigRetry ¶
type TraefikConfigRouter ¶
type TraefikConfigServersTransport ¶
type TraefikConfigServersTransport struct {
ForwardingTimeouts *TraefikConfigForwardingTimeouts `json:"forwardingTimeouts"`
}
type TraefikConfigService ¶
type TraefikConfigService struct {
LoadBalancer TraefikConfigLoadbalancer `json:"loadBalancer"`
}
type TraefikConfigStripPrefix ¶
type TraefikConfigStripPrefix struct {
Prefixes []string `json:"prefixes"`
}
type TraefikConfigTLS ¶
type TraefikConfigTLS struct {
InsecureSkipVerify bool `json:"insecureSkipVerify"`
}
type TraefikPlugin ¶
type TraefikPlugin struct {
HeaderRewrite *TraefikPluginHeaderRewrite `json:"header-rewrite,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.