Skip to content

Commit 0b4856c

Browse files
committed
remove unnecessary function
1 parent b39a6d4 commit 0b4856c

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

pkg/investigations/chgm/chgm.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ func Investigate(r *investigation.Resources) error {
8282
logging.Infof("Network verifier reported failure: %s", failureReason)
8383

8484
if strings.Contains(failureReason, "nosnch.in") {
85-
err := r.OcmClient.PostLimitedSupportReason(createEgressLS(), r.Cluster.ID())
85+
egressLS := ocm.LimitedSupportReason{
86+
Summary: "Cluster is in Limited Support due to unsupported cloud provider configuration",
87+
Details: "Your cluster requires you to take action. SRE has observed that there have been changes made to the network configuration which impacts normal working of the cluster, including lack of network egress to internet-based resources which are required for the cluster operation and support. Please revert changes, and refer to documentation regarding firewall requirements for PrivateLink clusters: https://access.redhat.com/documentation/en-us/red_hat_openshift_service_on_aws/4/html/prepare_your_environment/rosa-sts-aws-prereqs#osd-aws-privatelink-firewall-prerequisites_rosa-sts-aws-prereqs#",
88+
}
89+
90+
err := r.OcmClient.PostLimitedSupportReason(&egressLS, r.Cluster.ID())
8691
if err != nil {
8792
return err
8893
}

pkg/investigations/chgm/util.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,3 @@ func createEgressSL(blockedUrls string) *ocm.ServiceLog {
1919

2020
return &egressSL
2121
}
22-
23-
func createEgressLS() *ocm.LimitedSupportReason {
24-
details := "Your cluster requires you to take action. SRE has observed that there have been changes made to the network configuration which impacts normal working of the cluster, including lack of network egress to internet-based resources which are required for the cluster operation and support. Please revert changes, and refer to documentation regarding firewall requirements for PrivateLink clusters: https://access.redhat.com/documentation/en-us/red_hat_openshift_service_on_aws/4/html/prepare_your_environment/rosa-sts-aws-prereqs#osd-aws-privatelink-firewall-prerequisites_rosa-sts-aws-prereqs#"
25-
26-
egressLS := ocm.LimitedSupportReason{
27-
Summary: "Cluster is in Limited Support due to unsupported cloud provider configuration",
28-
Details: details,
29-
}
30-
31-
return &egressLS
32-
}

pkg/investigations/chgm/util_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,3 @@ func TestCreateEgressSL(t *testing.T) {
2929
result := createEgressSL(blockedUrls)
3030
assert.Equal(t, *expected, *result)
3131
}
32-
33-
// TestCreateEgressLS tests the createEgressLS function
34-
func TestCreateEgressLS(t *testing.T) {
35-
expectedDetails := "Your cluster requires you to take action. SRE has observed that there have been changes made to the network configuration which impacts normal working of the cluster, including lack of network egress to internet-based resources which are required for the cluster operation and support. Please revert changes, and refer to documentation regarding firewall requirements for PrivateLink clusters: https://access.redhat.com/documentation/en-us/red_hat_openshift_service_on_aws/4/html/prepare_your_environment/rosa-sts-aws-prereqs#osd-aws-privatelink-firewall-prerequisites_rosa-sts-aws-prereqs#"
36-
37-
expected := &ocm.LimitedSupportReason{
38-
Summary: "Cluster is in Limited Support due to unsupported cloud provider configuration",
39-
Details: expectedDetails,
40-
}
41-
42-
result := createEgressLS()
43-
assert.Equal(t, *expected, *result)
44-
}

0 commit comments

Comments
 (0)