mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 15:07:55 +00:00
cmd/{k8s-proxy,containerboot,k8s-operator},kube: add health check and metrics endpoints for k8s-proxy (#16540)
* Modifies the k8s-proxy to expose health check and metrics endpoints on the Pod's IP. * Moves cmd/containerboot/healthz.go and cmd/containerboot/metrics.go to /kube to be shared with /k8s-proxy. Updates #13358 Signed-off-by: David Bond <davidsbond93@gmail.com>
This commit is contained in:
@@ -826,6 +826,8 @@ func (r *ProxyGroupReconciler) ensureConfigSecretsCreated(ctx context.Context, p
|
||||
// as containerboot does for ingress-pg-reconciler.
|
||||
IssueCerts: opt.NewBool(i == 0),
|
||||
},
|
||||
LocalPort: ptr.To(uint16(9002)),
|
||||
HealthCheckEnabled: opt.NewBool(true),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -849,7 +851,11 @@ func (r *ProxyGroupReconciler) ensureConfigSecretsCreated(ctx context.Context, p
|
||||
}
|
||||
|
||||
if proxyClass != nil && proxyClass.Spec.TailscaleConfig != nil {
|
||||
cfg.AcceptRoutes = &proxyClass.Spec.TailscaleConfig.AcceptRoutes
|
||||
cfg.AcceptRoutes = opt.NewBool(proxyClass.Spec.TailscaleConfig.AcceptRoutes)
|
||||
}
|
||||
|
||||
if proxyClass != nil && proxyClass.Spec.Metrics != nil {
|
||||
cfg.MetricsEnabled = opt.NewBool(proxyClass.Spec.Metrics.Enable)
|
||||
}
|
||||
|
||||
if len(endpoints[nodePortSvcName]) > 0 {
|
||||
|
@@ -1379,6 +1379,8 @@ func TestKubeAPIServerType_DoesNotOverwriteServicesConfig(t *testing.T) {
|
||||
Mode: ptr.To(kubetypes.APIServerProxyModeNoAuth),
|
||||
IssueCerts: opt.NewBool(true),
|
||||
},
|
||||
LocalPort: ptr.To(uint16(9002)),
|
||||
HealthCheckEnabled: opt.NewBool(true),
|
||||
},
|
||||
}
|
||||
cfgB, err := json.Marshal(cfg)
|
||||
|
Reference in New Issue
Block a user