MCPcopy Index your code
hub / github.com/zalando/skipper / defaultConfig

Function defaultConfig

config/config_test.go:73–201  ·  view source on GitHub ↗
(with func(*Config))

Source from the content-addressed store, hash-verified

71}
72
73func defaultConfig(with func(*Config)) *Config {
74 cfg := &Config{
75 Flags: nil,
76 Address: ":9090",
77 StatusChecks: commaListFlag(),
78 ExpectedBytesPerRequest: 50 * 1024,
79 SupportListener: ":9911",
80 MaxLoopbacks: proxy.DefaultMaxLoopbacks,
81 DefaultHTTPStatus: 404,
82 MaxAuditBody: 1024,
83 MaxMatcherBufferSize: 2097152,
84 MetricsFlavour: commaListFlag("codahale", "prometheus", "otel"),
85 FilterPlugins: newPluginFlag(),
86 PredicatePlugins: newPluginFlag(),
87 DataclientPlugins: newPluginFlag(),
88 MultiPlugins: newPluginFlag(),
89 CompressEncodings: commaListFlag("gzip", "deflate", "br", "zstd"),
90 OpenTracing: "noop",
91 OpenTracingInitialSpan: "ingress",
92 OpentracingLogFilterLifecycleEvents: true,
93 OpentracingLogStreamEvents: true,
94 MetricsListener: ":9911",
95 MetricsPrefix: "skipper.",
96 RuntimeMetrics: true,
97 HistogramMetricBuckets: []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10},
98 ResponseSizeBuckets: metrics.DefaultResponseSizeBuckets,
99 RequestSizeBuckets: metrics.DefaultRequestSizeBuckets,
100 ApplicationLogLevel: log.InfoLevel,
101 ApplicationLogLevelString: "INFO",
102 ApplicationLogPrefix: "[APP]",
103 EtcdPrefix: "/skipper",
104 EtcdTimeout: time.Second,
105 AppendFilters: &defaultFiltersFlags{},
106 PrependFilters: &defaultFiltersFlags{},
107 DisabledFilters: commaListFlag(),
108 CloneRoute: routeChangerConfig{},
109 EditRoute: routeChangerConfig{},
110 SourcePollTimeout: 3000,
111 KubernetesEastWestRangeDomains: commaListFlag(),
112 KubernetesHealthcheck: true,
113 KubernetesHTTPSRedirect: true,
114 KubernetesHTTPSRedirectCode: 308,
115 KubernetesPathModeString: "kubernetes-ingress",
116 KubernetesRedisServicePort: 6379,
117 KubernetesValkeyServicePort: 6379,
118 KubernetesBackendTrafficAlgorithmString: "traffic-predicate",
119 KubernetesDefaultLoadBalancerAlgorithm: "roundRobin",
120 RouteServerFilters: &defaultFiltersFlags{},
121 Oauth2TokeninfoTimeout: 2 * time.Second,
122 Oauth2TokenintrospectionTimeout: 2 * time.Second,
123 Oauth2TokeninfoSubjectKey: "uid",
124 Oauth2GrantTokeninfoKeys: commaListFlag(),
125 Oauth2TokenCookieName: "oauth2-grant",
126 Oauth2TokenCookieRemoveSubdomains: 1,
127 WebhookTimeout: 2 * time.Second,
128 OidcDistributedClaimsTimeout: 2 * time.Second,
129 OIDCCookieValidity: time.Hour,
130 OIDCCookieRemoveSubdomains: 1,

Callers 2

TestToOptionsFunction · 0.85
Test_NewConfigWithArgsFunction · 0.85

Calls 2

commaListFlagFunction · 0.85
newPluginFlagFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…