You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: images/chart-values-controller/cmd/chart-values-controller/main.go
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,8 @@ func main() {
55
55
metricsAddrstring
56
56
healthProbeAddrstring
57
57
apiAddrstring
58
+
apiTLSCertFilestring
59
+
apiTLSKeyFilestring
58
60
cacheDirstring
59
61
cacheTTL time.Duration
60
62
sourceInterval time.Duration
@@ -64,6 +66,8 @@ func main() {
64
66
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metrics endpoint binds to.")
65
67
flag.StringVar(&healthProbeAddr, "health-probe-bind-address", ":9440", "The address the health probe endpoint binds to.")
66
68
flag.StringVar(&apiAddr, "api-bind-address", "127.0.0.1:8081", "The address the chart-values HTTP API binds to.")
69
+
flag.StringVar(&apiTLSCertFile, "api-tls-cert-file", "", "Path to the PEM-encoded certificate for the chart-values HTTP API; enables TLS together with --api-tls-key-file.")
70
+
flag.StringVar(&apiTLSKeyFile, "api-tls-key-file", "", "Path to the PEM-encoded private key for the chart-values HTTP API; enables TLS together with --api-tls-cert-file.")
67
71
flag.StringVar(&cacheDir, "cache-dir", "/cache", "Directory used to cache extracted values.yaml files.")
68
72
flag.DurationVar(&cacheTTL, "chart-values-cache-ttl", time.Hour, "Lifetime of auxiliary source resources and their cache entries; refreshed on each request.")
69
73
flag.DurationVar(&sourceInterval, "source-interval", 10*time.Minute, "Reconcile interval set on auxiliary source resources.")
@@ -81,6 +85,11 @@ func main() {
81
85
}
82
86
maxArtifactBytes:=int64(maxChartSizeMB) <<20
83
87
88
+
if (apiTLSCertFile=="") != (apiTLSKeyFile=="") {
89
+
logger.Error(nil, "--api-tls-cert-file and --api-tls-key-file must be set together")
0 commit comments