mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-24 15:55:17 -04:00
Azure: Only create debugd loadbalancer when debugCluster is set
This commit is contained in:
parent
1a4b4f564a
commit
d74c7a3769
7 changed files with 109 additions and 40 deletions
|
@ -164,7 +164,7 @@ type NetworkSecurityGroupInput struct {
|
|||
}
|
||||
|
||||
// CreateExternalLoadBalancer creates an external load balancer.
|
||||
func (c *Client) CreateExternalLoadBalancer(ctx context.Context) error {
|
||||
func (c *Client) CreateExternalLoadBalancer(ctx context.Context, isDebugCluster bool) error {
|
||||
// First, create a public IP address for the load balancer.
|
||||
publicIPAddress, err := c.createPublicIPAddress(ctx, "loadbalancer-public-ip-"+c.uid)
|
||||
if err != nil {
|
||||
|
@ -182,6 +182,9 @@ func (c *Client) CreateExternalLoadBalancer(ctx context.Context) error {
|
|||
UID: c.uid,
|
||||
}
|
||||
azureLoadBalancer := loadBalancer.Azure()
|
||||
if isDebugCluster {
|
||||
azureLoadBalancer = loadBalancer.AppendDebugRules(azureLoadBalancer)
|
||||
}
|
||||
|
||||
poller, err := c.loadBalancersAPI.BeginCreateOrUpdate(
|
||||
ctx, c.resourceGroup, loadBalancerName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue