Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1857192: test/e2e: don't count central grpc-tls #899

Merged
merged 1 commit into from Aug 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions test/e2e/user_workload_monitoring_test.go
Expand Up @@ -849,12 +849,14 @@ func assertGRPCTLSRotation(t *testing.T) {
// We know the amount of expected secrets in forehand.
// We should not calculate it on-the-fly as the calculation could be racy.
//
// 1. openshift-monitoring/grpc-tls
// 2. openshift-monitoring/prometheus-k8s-grpc-tls-[hash]
// 3. openshift-user-workload-monitoring/prometheus-user-workload-grpc-tls-[hash]
// 4. openshift-monitoring/thanos-querier-grpc-tls-[hash]
// 5. openshift-user-workload-monitoring/thanos-ruler-grpc-tls-[hash]
const expectedGRPCSecretCount = 5
// 1. openshift-monitoring/prometheus-k8s-grpc-tls-[hash]
// 2. openshift-user-workload-monitoring/prometheus-user-workload-grpc-tls-[hash]
// 3. openshift-monitoring/thanos-querier-grpc-tls-[hash]
// 4. openshift-user-workload-monitoring/thanos-ruler-grpc-tls-[hash]
//
// The central grpc-tls secret is verified independently by getting it directly
// and verifying if the force-rotation annotation has been removed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we ensure that openshift-monitoring/grpc-tls is excluded from being counted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fact we do that already (that was the actual flake cause) by setting the label selector in

s, err := f.KubeClient.CoreV1().Secrets(ns).List(context.TODO(), metav1.ListOptions{LabelSelector: "monitoring.openshift.io/hash"})

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

const expectedGRPCSecretCount = 4

err = framework.Poll(time.Second, 5*time.Minute, func() error {
s, err := f.KubeClient.CoreV1().Secrets(f.Ns).Get(context.TODO(), "grpc-tls", metav1.GetOptions{})
Expand Down