mirror of https://github.com/linkerd/linkerd2.git
Remove jaeger existence check (#7750)
Fixes #7663 The `linkerd jaeger check` command checks that jaeger and the opencensus-collector are installed and that all of the associated resources such as configmaps and service accounts exist. However, the linkerd-jaeger extension allows users to skip installing jaeger and the oc-collector by using the `jaeger.enabled=false` and `collector.enabled=false` values respectively. This is to support the BYO jaeger or BYO collector use-cases. However, if either jaeger or the collector is not installed, check will fail. Since it is valid for these resources to not exist, we remove these checks. There isn't an easy way to know at runtime which values the extension was installed with, so it is difficult to know if these resources should exist or not. Signed-off-by: Alex Leong <alex@buoyant.io>
This commit is contained in:
parent
2665435bda
commit
a2046bee23
|
|
@ -11,7 +11,6 @@ import (
|
|||
"github.com/linkerd/linkerd2/pkg/healthcheck"
|
||||
"github.com/linkerd/linkerd2/pkg/version"
|
||||
"github.com/spf13/cobra"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -56,29 +55,6 @@ func jaegerCategory(hc *healthcheck.HealthChecker) *healthcheck.Category {
|
|||
return nil
|
||||
}))
|
||||
|
||||
checkers = append(checkers,
|
||||
*healthcheck.NewChecker("collector and jaeger service account exists").
|
||||
WithHintAnchor("l5d-jaeger-sc-exists").
|
||||
Fatal().
|
||||
Warning().
|
||||
WithCheck(func(ctx context.Context) error {
|
||||
// Check for Collector Service Account
|
||||
return healthcheck.CheckServiceAccounts(ctx, hc.KubeAPIClient(), []string{"collector", "jaeger"}, jaegerNamespace, "")
|
||||
}))
|
||||
|
||||
checkers = append(checkers,
|
||||
*healthcheck.NewChecker("collector config map exists").
|
||||
WithHintAnchor("l5d-jaeger-oc-cm-exists").
|
||||
Warning().
|
||||
WithCheck(func(ctx context.Context) error {
|
||||
// Check for Jaeger Service Account
|
||||
_, err := hc.KubeAPIClient().CoreV1().ConfigMaps(jaegerNamespace).Get(ctx, "collector-config", metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}))
|
||||
|
||||
checkers = append(checkers,
|
||||
*healthcheck.NewChecker("jaeger extension pods are injected").
|
||||
WithHintAnchor("l5d-jaeger-pods-injection").
|
||||
|
|
@ -93,7 +69,7 @@ func jaegerCategory(hc *healthcheck.HealthChecker) *healthcheck.Category {
|
|||
}))
|
||||
|
||||
checkers = append(checkers,
|
||||
*healthcheck.NewChecker("jaeger extension pods are running").
|
||||
*healthcheck.NewChecker("jaeger injector pods are running").
|
||||
WithHintAnchor("l5d-jaeger-pods-running").
|
||||
Warning().
|
||||
WithRetryDeadline(hc.RetryDeadline).
|
||||
|
|
@ -105,7 +81,7 @@ func jaegerCategory(hc *healthcheck.HealthChecker) *healthcheck.Category {
|
|||
}
|
||||
|
||||
// Check for relevant pods to be present
|
||||
err = healthcheck.CheckForPods(pods, []string{"collector", "jaeger", "jaeger-injector"})
|
||||
err = healthcheck.CheckForPods(pods, []string{"jaeger-injector"})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue