@@ -79,7 +79,7 @@ func getControllerNamespace() (string, error) {
79
79
}
80
80
81
81
func main () {
82
- var metricsAddr , probeAddr , oauthProxyImage string
82
+ var metricsAddr , probeAddr , oauthProxyImage , webhookCertDir string
83
83
var webhookPort int
84
84
var enableLeaderElection , enableDebugLogging bool
85
85
flag .StringVar (& metricsAddr , "metrics-bind-address" , ":8080" ,
@@ -88,6 +88,10 @@ func main() {
88
88
"The address the probe endpoint binds to." )
89
89
flag .StringVar (& oauthProxyImage , "oauth-proxy-image" , controllers .OAuthProxyImage ,
90
90
"Image of the OAuth proxy sidecar container." )
91
+ // specified explicitly, since on macOS the default temporary directory often resolves to a path under /var/folders/...
92
+ // this default path in /tmp/ is already hardcoded in the Makefile and manifests used for ktunnel deployment
93
+ flag .StringVar (& webhookCertDir , "webhook-cert-dir" , "/tmp/k8s-webhook-server/serving-certs" ,
94
+ "Directory that contains the server key and certificate for the webhook server." )
91
95
flag .IntVar (& webhookPort , "webhook-port" , 8443 ,
92
96
"Port that the webhook server serves at." )
93
97
flag .BoolVar (& enableLeaderElection , "leader-elect" , false ,
@@ -112,7 +116,8 @@ func main() {
112
116
LeaderElection : enableLeaderElection ,
113
117
LeaderElectionID : "odh-notebook-controller" ,
114
118
WebhookServer : webhook .NewServer (webhook.Options {
115
- Port : webhookPort ,
119
+ Port : webhookPort ,
120
+ CertDir : webhookCertDir ,
116
121
}),
117
122
}
118
123
0 commit comments