Versions in this module Expand all Collapse all v3 v3.4.3 Dec 27, 2023 Changes in this version + const AppProtectDosProtectedAnnotation + const AppProtectLogConfAnnotation + const AppProtectLogConfDstAnnotation + const AppProtectPolicyAnnotation + const BasicAuthSecretAnnotation + const CACrlKey + const CACrtKey + const ClientSecretKey + const DefaultSecretPath + const DefaultServerSecretName + const DefaultServerSecretPath + const HtpasswdFileKey + const JWTKeyAnnotation + const JWTKeyKey + const OffsetFmt + const PathRegexAnnotation + const SizeFmt + const WildcardSecretName + func GenerateCAFileContent(secret *api_v1.Secret) ([]byte, []byte) + func GenerateCertAndKeyFileContent(secret *api_v1.Secret) []byte + func GenerateEndpointsKey(serviceNamespace string, serviceName string, subselector map[string]string, ...) string + func GenerateExternalNameSvcKey(namespace string, service string) string + func GenerateNginxMainConfig(staticCfgParams *StaticConfigParams, config *ConfigParams) *version1.MainConfig + func GetBackendPortAsString(port networking.ServiceBackendPort) string + func GetMapKeyAsBool(m map[string]string, key string, context apiObject) (bool, bool, error) + func GetMapKeyAsInt(m map[string]string, key string, context apiObject) (int, bool, error) + func GetMapKeyAsInt64(m map[string]string, key string, context apiObject) (int64, bool, error) + func GetMapKeyAsStringSlice(m map[string]string, key string, _ apiObject, delimiter string) ([]string, bool) + func GetMapKeyAsUint64(m map[string]string, key string, context apiObject, nonZero bool) (uint64, bool, error) + func NewUpstreamNamerForVirtualServer(virtualServer *conf_v1.VirtualServer) *upstreamNamer + func NewUpstreamNamerForVirtualServerRoute(virtualServer *conf_v1.VirtualServer, ...) *upstreamNamer + func ParseBool(s string) (bool, error) + func ParseFloat64(s string) (float64, error) + func ParseInt(s string) (int, error) + func ParseInt64(s string) (int64, error) + func ParseLBMethod(method string) (string, error) + func ParseLBMethodForPlus(method string) (string, error) + func ParseOffset(s string) (string, error) + func ParsePortList(s string) ([]int, error) + func ParseProxyBuffersSpec(s string) (string, error) + func ParseRewriteList(s string) (map[string]string, error) + func ParseServiceList(s string) map[string]bool + func ParseSize(s string) (string, error) + func ParseStickyServiceList(s string) (map[string]string, error) + func ParseTime(s string) (string, error) + func ParseUint64(s string) (uint64, error) + func VerifyAppProtectThresholds(value string) bool + func VerifyPath(s string) bool + type AppProtectLog struct + Dest string + LogConf *unstructured.Unstructured + type AppProtectResources struct + AppProtectLogconfs []string + AppProtectPolicy string + type ConfigParams struct + AppProtectDosResource string + AppProtectEnable string + AppProtectLogConf string + AppProtectLogEnable string + AppProtectPolicy string + BasicAuthRealm string + BasicAuthSecret string + ClientMaxBodySize string + DefaultServerAccessLogOff bool + DefaultServerReturn string + FailTimeout string + HSTS bool + HSTSBehindProxy bool + HSTSIncludeSubdomains bool + HSTSMaxAge int64 + HTTP2 bool + HealthCheckEnabled bool + HealthCheckMandatory bool + HealthCheckMandatoryQueue int64 + IngressTemplate *string + JWTKey string + JWTLoginURL string + JWTRealm string + JWTToken string + Keepalive int + LBMethod string + LocationSnippets []string + MainAccessLogOff bool + MainAppProtectCPUThresholds string + MainAppProtectCompressedRequestsAction string + MainAppProtectCookieSeed string + MainAppProtectDosArbFqdn string + MainAppProtectDosLogFormat []string + MainAppProtectDosLogFormatEscaping string + MainAppProtectFailureModeAction string + MainAppProtectPhysicalMemoryThresholds string + MainAppProtectReconnectPeriod string + MainErrorLogLevel string + MainHTTPSnippets []string + MainKeepaliveRequests int64 + MainKeepaliveTimeout string + MainLogFormat []string + MainLogFormatEscaping string + MainMainSnippets []string + MainMapHashBucketSize string + MainMapHashMaxSize string + MainOpenTracingEnabled bool + MainOpenTracingLoadModule bool + MainOpenTracingTracer string + MainOpenTracingTracerConfig string + MainServerNamesHashBucketSize string + MainServerNamesHashMaxSize string + MainServerSSLCiphers string + MainServerSSLDHParam string + MainServerSSLDHParamFileContent *string + MainServerSSLPreferServerCiphers bool + MainServerSSLProtocols string + MainStreamLogFormat []string + MainStreamLogFormatEscaping string + MainStreamSnippets []string + MainTemplate *string + MainWorkerCPUAffinity string + MainWorkerConnections string + MainWorkerProcesses string + MainWorkerRlimitNofile string + MainWorkerShutdownTimeout string + MaxConns int + MaxFails int + Ports []int + ProxyBufferSize string + ProxyBuffering bool + ProxyBuffers string + ProxyConnectTimeout string + ProxyHideHeaders []string + ProxyMaxTempFileSize string + ProxyPassHeaders []string + ProxyProtocol bool + ProxyReadTimeout string + ProxySendTimeout string + RealIPHeader string + RealIPRecursive bool + RedirectToHTTPS bool + ResolverAddresses []string + ResolverIPV6 bool + ResolverTimeout string + ResolverValid string + SSLPorts []int + SSLRedirect bool + ServerSnippets []string + ServerTokens string + SetRealIPFrom []string + SlowStart string + SpiffeServerCerts bool + UpstreamZoneSize string + VariablesHashBucketSize uint64 + VariablesHashMaxSize uint64 + VirtualServerTemplate *string + func NewDefaultConfigParams(isPlus bool) *ConfigParams + func ParseConfigMap(cfgm *v1.ConfigMap, nginxPlus bool, hasAppProtect bool, hasAppProtectDos bool, ...) *ConfigParams + type Configurator struct + func NewConfigurator(p ConfiguratorParams) *Configurator + func (cnf *Configurator) AddInternalRouteConfig() error + func (cnf *Configurator) AddOrUpdateAppProtectResource(resource *unstructured.Unstructured, ingExes []*IngressEx, ...) (Warnings, error) + func (cnf *Configurator) AddOrUpdateDHParam(content string) (string, error) + func (cnf *Configurator) AddOrUpdateIngress(ingEx *IngressEx) (Warnings, error) + func (cnf *Configurator) AddOrUpdateMergeableIngress(mergeableIngs *MergeableIngresses) (Warnings, error) + func (cnf *Configurator) AddOrUpdateResources(resources ExtendedResources, reloadIfUnchanged bool) (Warnings, error) + func (cnf *Configurator) AddOrUpdateResourcesThatUseDosProtected(ingExes []*IngressEx, mergeableIngresses []*MergeableIngresses, ...) (Warnings, error) + func (cnf *Configurator) AddOrUpdateSecret(secret *api_v1.Secret) string + func (cnf *Configurator) AddOrUpdateSpecialTLSSecrets(secret *api_v1.Secret, secretNames []string) error + func (cnf *Configurator) AddOrUpdateSpiffeCerts(svidResponse *workloadapi.X509Context) error + func (cnf *Configurator) AddOrUpdateTransportServer(transportServerEx *TransportServerEx) (Warnings, error) + func (cnf *Configurator) AddOrUpdateVirtualServer(virtualServerEx *VirtualServerEx) (Warnings, error) + func (cnf *Configurator) AddOrUpdateVirtualServers(virtualServerExes []*VirtualServerEx) (Warnings, error) + func (cnf *Configurator) BatchDeleteIngresses(deletedKeys []string) []error + func (cnf *Configurator) BatchDeleteVirtualServers(deletedKeys []string) []error + func (cnf *Configurator) DeleteAppProtectDosLogConf(resource *unstructured.Unstructured) + func (cnf *Configurator) DeleteAppProtectDosPolicy(resource *unstructured.Unstructured) + func (cnf *Configurator) DeleteAppProtectLogConf(resource *unstructured.Unstructured, ingExes []*IngressEx, ...) (Warnings, error) + func (cnf *Configurator) DeleteAppProtectPolicy(resource *unstructured.Unstructured, ingExes []*IngressEx, ...) (Warnings, error) + func (cnf *Configurator) DeleteIngress(key string, skipReload bool) error + func (cnf *Configurator) DeleteSecret(key string) + func (cnf *Configurator) DeleteTransportServer(key string) error + func (cnf *Configurator) DeleteVirtualServer(key string, skipReload bool) error + func (cnf *Configurator) DisableReloads() + func (cnf *Configurator) DynamicSSLReloadEnabled() bool + func (cnf *Configurator) EnableReloads() + func (cnf *Configurator) GetIngressCounts() map[string]int + func (cnf *Configurator) GetVirtualServerCounts() (vsCount int, vsrCount int) + func (cnf *Configurator) GetVirtualServerRoutesForVirtualServer(key string) []*conf_v1.VirtualServerRoute + func (cnf *Configurator) HasIngress(ing *networking.Ingress) bool + func (cnf *Configurator) HasMinion(master *networking.Ingress, minion *networking.Ingress) bool + func (cnf *Configurator) IsResolverConfigured() bool + func (cnf *Configurator) RefreshAppProtectUserSigs(userSigs []*unstructured.Unstructured, delPols []string, ingExes []*IngressEx, ...) (Warnings, error) + func (cnf *Configurator) ReloadForBatchUpdates(batchReloadsEnabled bool) error + func (cnf *Configurator) StreamUpstreamsForName(name string) []string + func (cnf *Configurator) UpdateConfig(cfgParams *ConfigParams, resources ExtendedResources) (Warnings, error) + func (cnf *Configurator) UpdateEndpoints(ingExes []*IngressEx) error + func (cnf *Configurator) UpdateEndpointsForTransportServers(transportServerExes []*TransportServerEx) error + func (cnf *Configurator) UpdateEndpointsForVirtualServers(virtualServerExes []*VirtualServerEx) error + func (cnf *Configurator) UpdateEndpointsMergeableIngress(mergeableIngresses []*MergeableIngresses) error + func (cnf *Configurator) UpdateTransportServers(updatedTSExes []*TransportServerEx, deletedKeys []string) []error + func (cnf *Configurator) UpdateVirtualServers(updatedVSExes []*VirtualServerEx, deletedKeys []string) []error + func (cnf *Configurator) UpstreamsForHost(hostname string) []string + type ConfiguratorParams struct + Config *ConfigParams + IsDynamicSSLReloadEnabled bool + IsLatencyMetricsEnabled bool + IsPlus bool + IsPrometheusEnabled bool + IsWildcardEnabled bool + LabelUpdater collector.LabelUpdater + LatencyCollector latCollector.LatencyCollector + NginxManager nginx.Manager + NginxVersion nginx.Version + StaticCfgParams *StaticConfigParams + TemplateExecutor *version1.TemplateExecutor + TemplateExecutorV2 *version2.TemplateExecutor + type DosEx struct + DosLogConf *unstructured.Unstructured + DosPolicy *unstructured.Unstructured + DosProtected *v1beta1.DosProtectedResource + type ExtendedResources struct + IngressExes []*IngressEx + MergeableIngresses []*MergeableIngresses + TransportServerExes []*TransportServerEx + VirtualServerExes []*VirtualServerEx + type GlobalConfigParams struct + Listeners map[string]Listener + func NewDefaultGlobalConfigParams() *GlobalConfigParams + func NewGlobalConfigParamsWithTLSPassthrough() *GlobalConfigParams + type IngressEx struct + AppProtectLogs []AppProtectLog + AppProtectPolicy *unstructured.Unstructured + DosEx *DosEx + Endpoints map[string][]string + ExternalNameSvcs map[string]bool + HealthChecks map[string]*api_v1.Probe + Ingress *networking.Ingress + PodsByIP map[string]PodInfo + SecretRefs map[string]*secrets.SecretReference + ValidHosts map[string]bool + ValidMinionPaths map[string]bool + func (ingEx *IngressEx) String() string + type JWTKey struct + Name string + Secret *api_v1.Secret + type Listener struct + Port int + Protocol string + type MergeableIngresses struct + Master *IngressEx + Minions []*IngressEx + type MeshPodOwner struct + OwnerName string + OwnerType string + type NginxCfgParams struct + type PodInfo struct + Name string + type ResourceOperation func(resource *v1beta1.DosProtectedResource, ingExes []*IngressEx, ...) (Warnings, error) + type StaticConfigParams struct + DefaultHTTPListenerPort int + DefaultHTTPSListenerPort int + DisableIPV6 bool + DynamicSSLReload bool + EnableCertManager bool + EnableInternalRoutes bool + EnableLatencyMetrics bool + EnableOIDC bool + EnableSnippets bool + HealthStatus bool + HealthStatusURI string + InternalRouteServerName string + MainAppProtectDosLoadModule bool + MainAppProtectLoadModule bool + NginxServiceMesh bool + NginxStatus bool + NginxStatusAllowCIDRs []string + NginxStatusPort int + NginxVersion nginx.Version + SSLRejectHandshake bool + StaticSSLPath string + StubStatusOverUnixSocketForOSS bool + TLSPassthrough bool + TLSPassthroughPort int + type TransportServerEx struct + DisableIPV6 bool + Endpoints map[string][]string + ExternalNameSvcs map[string]bool + ListenerPort int + PodsByIP map[string]string + SecretRefs map[string]*secrets.SecretReference + TransportServer *conf_v1.TransportServer + func (tsEx *TransportServerEx) String() string + type VirtualServerEx struct + ApPolRefs map[string]*unstructured.Unstructured + DosProtectedEx map[string]*DosEx + DosProtectedRefs map[string]*unstructured.Unstructured + Endpoints map[string][]string + ExternalNameSvcs map[string]bool + HTTPPort int + HTTPSPort int + LogConfRefs map[string]*unstructured.Unstructured + PodsByIP map[string]PodInfo + Policies map[string]*conf_v1.Policy + SecretRefs map[string]*secrets.SecretReference + VirtualServer *conf_v1.VirtualServer + VirtualServerRoutes []*conf_v1.VirtualServerRoute + func (vsx *VirtualServerEx) String() string + type Warnings map[runtime.Object][]string + func (w Warnings) Add(warnings Warnings) + func (w Warnings) AddWarning(obj runtime.Object, msg string) + func (w Warnings) AddWarningf(obj runtime.Object, msgFmt string, args ...interface{}) Other modules containing this package github.com/jjngx/kubernetes-ingress