-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability to render and monitor Cloud LB IPs
On some cloud platforms, the user cannot use the cloud's default DNS solution. They are expected to use their own custom DNS solution that is external to the cluster. OpenShift is not allowed to configure this DNS solution. In this scenario, these same customers want to continue using the cloud provided Load Balancers (LBs). OpenShift is expected to continue configuing the cloud LBs for API, API-Int and Ingress access. Since the LB information is not available, before cluster installation, the user cannot configure their custom DNS solution before cluster installation. So, to support this mode, OpenShift needs to start its in-cluster CoreDNS based DNS solution for API, API-Int and Ingress resolution so that cluster installation is successful. The customer is expected to configure their DNS solution post-install. At this the time, the cloud's API and API-Int LBs are configured by the Installer and its value is not expected to change during the life of the cluster. The Ingress operator continues to handle Ingress LB configuration. Based on enhancement: openshift/enhancements#1468
- Loading branch information
Showing
8 changed files
with
225 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package config | ||
|
||
import ( | ||
"net" | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
var ( | ||
testKubeconfigPath = "/test/path/kubeconfig" | ||
testClusterConfigPath = "/test/path/clusterConfig" | ||
testResolvConfPath = "/test/path/resolvConf" | ||
testApiLBIPv4 = net.ParseIP("192.168.0.111") | ||
testApiIntLBIPv4 = net.ParseIP("10.10.10.20") | ||
testIngressOneIPv4 = net.ParseIP("192.168.20.140") | ||
testIngressTwoIPv4 = net.ParseIP("10.10.10.40") | ||
testClusterLBConfig = ClusterLBConfig{ | ||
ApiLBIPs: []net.IP{testApiLBIPv4}, | ||
ApiIntLBIPs: []net.IP{testApiIntLBIPv4}, | ||
IngressLBIPs: []net.IP{testIngressOneIPv4, testIngressTwoIPv4}} | ||
expectedApiLBIPv4 = "192.168.0.111" | ||
expectedIngressTwoIPv4 = "10.10.10.40" | ||
testNode = Node{} | ||
) | ||
|
||
var _ = Describe("PopulateCloudLBIPAddresses", func() { | ||
Context("for IPV4 Cloud LB IPs", func() { | ||
Context("with multiple Ingress LB IPs", func() { | ||
It("matches multiple IPs in 1 node", func() { | ||
testNode, err := PopulateCloudLBIPAddresses(testClusterLBConfig, testNode) | ||
Expect(testNode.Cluster.APILBIPs[0]).To(Equal(expectedApiLBIPv4)) | ||
Expect(testNode.Cluster.IngressLBIPs[1]).To(Equal(expectedIngressTwoIPv4)) | ||
Expect(testNode.Cluster.CloudLBRecordType).To(Equal("A")) | ||
Expect(err).To(BeNil()) | ||
}) | ||
}) | ||
}) | ||
}) | ||
|
||
func TestCloudLBConfig(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "Cloud LB Config Tests") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters