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
feat: Enabled webhook in upstream & prod via config. (#330)
* Added configuration for Pod & CRP webhooks to either be service ref or URL (DNS).
* Added E2E tests.
Co-authored-by: Sean Hobbs <sehobbs@microsoft.com>
Copy file name to clipboardExpand all lines: cmd/hubagent/options/options.go
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
Copyright (c) Microsoft Corporation.
3
3
Licensed under the MIT license.
4
4
*/
5
+
5
6
package options
6
7
7
8
import (
@@ -34,6 +35,8 @@ type Options struct {
34
35
MetricsBindAddressstring
35
36
// EnableWebhook indicates if we will run a webhook
36
37
EnableWebhookbool
38
+
// Sets the connection type for the webhook.
39
+
WebhookClientConnectionTypestring
37
40
// NetworkingAgentsEnabled indicates if we enable network agents
38
41
NetworkingAgentsEnabledbool
39
42
// ClusterUnhealthyThreshold is the duration of failure for the cluster to be considered unhealthy.
@@ -87,7 +90,8 @@ func (o *Options) AddFlags(flags *flag.FlagSet) {
87
90
flags.BoolVar(&o.LeaderElection.LeaderElect, "leader-elect", false, "Start a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability.")
88
91
flags.DurationVar(&o.LeaderElection.LeaseDuration.Duration, "leader-lease-duration", 15*time.Second, "This is effectively the maximum duration that a leader can be stopped before someone else will replace it.")
89
92
flag.StringVar(&o.LeaderElection.ResourceNamespace, "leader-election-namespace", utils.FleetSystemNamespace, "The namespace in which the leader election resource will be created.")
90
-
flag.BoolVar(&o.EnableWebhook, "enable-webhook", false, "If set, the fleet webhook is enabled.")
93
+
flag.BoolVar(&o.EnableWebhook, "enable-webhook", true, "If set, the fleet webhook is enabled.")
94
+
flag.StringVar(&o.WebhookClientConnectionType, "webhook-client-connection-type", "url", "Sets the connection type used by the webhook client. Only URL or Service is valid.")
91
95
flag.BoolVar(&o.NetworkingAgentsEnabled, "networking-agents-enabled", false, "Whether the networking agents are enabled or not.")
92
96
flags.DurationVar(&o.ClusterUnhealthyThreshold.Duration, "cluster-unhealthy-threshold", 60*time.Second, "The duration for a member cluster to be in a degraded state before considered unhealthy.")
0 commit comments