mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-07 16:55:15 -04:00
bootstrapper: add fallback endpoint and custom endpoint to SAN field (#2108)
terraform: collect apiserver cert SANs and support custom endpoint constants: add new constants for cluster configuration and custom endpoint cloud: support apiserver cert sans and prepare for endpoint migration on AWS config: add customEndpoint field bootstrapper: use per-CSP apiserver cert SANs cli: route customEndpoint to terraform and add migration for apiserver cert SANs bootstrapper: change interface of GetLoadBalancerEndpoint to return host and port separately
This commit is contained in:
parent
3324a4eba2
commit
8da6a23aa5
64 changed files with 724 additions and 301 deletions
|
@ -211,7 +211,7 @@ func TestGetLoadbalancerEndpoint(t *testing.T) {
|
|||
instanceAPI stubInstanceAPI
|
||||
globalForwardingRulesAPI stubGlobalForwardingRulesAPI
|
||||
regionalForwardingRulesAPI stubRegionalForwardingRulesAPI
|
||||
wantEndpoint string
|
||||
wantHost string
|
||||
wantErr bool
|
||||
}{
|
||||
"success global forwarding rule": {
|
||||
|
@ -236,7 +236,7 @@ func TestGetLoadbalancerEndpoint(t *testing.T) {
|
|||
regionalForwardingRulesAPI: stubRegionalForwardingRulesAPI{
|
||||
iterator: &stubForwardingRulesIterator{},
|
||||
},
|
||||
wantEndpoint: "192.0.2.255:6443",
|
||||
wantHost: "192.0.2.255",
|
||||
},
|
||||
"success regional forwarding rule": {
|
||||
imds: stubIMDS{
|
||||
|
@ -261,7 +261,7 @@ func TestGetLoadbalancerEndpoint(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
wantEndpoint: "192.0.2.255:6443",
|
||||
wantHost: "192.0.2.255",
|
||||
},
|
||||
"regional forwarding rule has no region": {
|
||||
imds: stubIMDS{
|
||||
|
@ -473,13 +473,14 @@ func TestGetLoadbalancerEndpoint(t *testing.T) {
|
|||
regionalForwardingRulesAPI: &tc.regionalForwardingRulesAPI,
|
||||
}
|
||||
|
||||
endpoint, err := cloud.GetLoadBalancerEndpoint(context.Background())
|
||||
gotHost, gotPort, err := cloud.GetLoadBalancerEndpoint(context.Background())
|
||||
if tc.wantErr {
|
||||
assert.Error(err)
|
||||
return
|
||||
}
|
||||
assert.NoError(err)
|
||||
assert.Equal(tc.wantEndpoint, endpoint)
|
||||
assert.Equal(tc.wantHost, gotHost)
|
||||
assert.Equal("6443", gotPort)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue