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

[release-4.6] Bug 1887339: Preserve labels and annotations during reconciliation #955

Merged
Show file tree
Hide file tree
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
215 changes: 113 additions & 102 deletions pkg/client/client.go

Large diffs are not rendered by default.

1,439 changes: 1,333 additions & 106 deletions pkg/client/client_test.go

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions test/e2e/multi_namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package e2e

import (
"context"
"strconv"
"testing"
"time"
Expand All @@ -31,15 +32,15 @@ func TestMultinamespacePrometheusRule(t *testing.T) {
t.Parallel()

nsName := "openshift-test-prometheus-rules" + strconv.FormatInt(time.Now().Unix(), 36)

err := f.OperatorClient.CreateOrUpdateNamespace(&v1.Namespace{
ns := &v1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: nsName,
Labels: map[string]string{
"openshift.io/cluster-monitoring": "true",
},
},
})
}
_, err := f.KubeClient.CoreV1().Namespaces().Create(context.TODO(), ns, metav1.CreateOptions{})
if err != nil {
t.Fatal(err)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.