-
Notifications
You must be signed in to change notification settings - Fork 48
Conversation
8f1bd43
to
e8c42b1
Compare
dc85800
to
2eeed53
Compare
TODO: Add retry logic to the tests. This will buy some time for the prometheus to reconcile. |
2eeed53
to
5b5abe0
Compare
8308789
to
6d67b4f
Compare
6d67b4f
to
36f75a4
Compare
The alternative for new file mode 100644
index 00000000..4939ffc1
--- /dev/null
+++ b/test/components/util/platform_generic.go
@@ -0,0 +1,20 @@
+// Copyright 2020 The Lokomotive Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build !packet !aws
+
+package util
+
+const Platform = PlatformAll
diff --git a/test/components/util/platform_aws.go b/test/components/util/platform_aws.go
new file mode 100644
index 00000000..ad6050f9
--- /dev/null
+++ b/test/components/util/platform_aws.go
@@ -0,0 +1,20 @@
+// Copyright 2020 The Lokomotive Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// +build aws
+
+package util
+
+const Platform = PlatformAWS
diff --git a/test/components/util/platform.go b/test/components/util/platform.go
new file mode 100644
index 00000000..ad6050f9
--- /dev/null
+++ b/test/components/util/platform.go
@@ -0,0 +1,20 @@
+// Copyright 2020 The Lokomotive Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package util
+
+const (
+ PlatformAWS = "aws"
+ PlatformPacket = "packet"
+ PlatformAll = "generic"
+)
+
+type PlatformSelector struct {
+ Include []string
+ Exlude []string
+}
+
+func IsPlatformSupported(t *testing.T, ps *PlatformSelector) {
+ if ps == nil {
+ return
+ }
+
+ for _, p := range ps.Include {
+ if p == Platform {
+ return
+ }
+ }
+
+ for _, p := range ps.Exclude {
+ if p == Platform {
+ t.Skip("Not supported on platform %q", Platform)
+ }
+ }
+
+ return t.Skip("Not supported on platform %q", Platform)
+ } This way, the test would define following value in test matrix: PlatformSelector: util.PlatformSelector{
Exclude: []string{
util.PlatformBareMetal,
},
} Or the field would be skipped if test is intended to run on all platforms. Then, when running tests, following needs to be used: util.IsPlatformSupported(t, testCase.PlatformSelector) |
f3e525f
to
e207e51
Compare
|
b6dd1ff
to
0cb5014
Compare
d2200bd
to
8b47a07
Compare
8b47a07
to
84cf490
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one last nit, otherwise LGTM
84cf490
to
572bc3e
Compare
This commit adds a prometheus operator CR PrometheusRule which includes alertmanager rules for metallb. * This sends an alert when it sees that a session is not established for more than 2mins. * This sends an alert when any of the pods have stale config. Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
When metallb controller deployment pod is not available for more than a minute then an alert will be triggered. Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
When metallb speaker daemonset pods are not available for more than a minute then an alert will be triggered. Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
572bc3e
to
17a9366
Compare
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
17a9366
to
922554b
Compare
@invidian can you review again? |
This commit adds a prometheus operator CR PrometheusRule which includes
alertmanager rules for metallb.
This sends an alert when it sees that a session is not established for
more than 2mins.
This sends an alert when any of the pods have stale config.
Signed-off-by: Suraj Deshmukh suraj@kinvolk.io