forked from openshift/hypershift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unittests for haproxy config generation
This change adds a couple of unittests for the static haproxy pods config to ensure it is correct in various hostedcluster configurations.
- Loading branch information
1 parent
dfff72a
commit 08c44e4
Showing
9 changed files
with
341 additions
and
4 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
29 changes: 29 additions & 0 deletions
29
...ta/zz_fixture_TestReconcileHAProxyIgnitionConfig_private_cluster_uses_.local_address.yaml
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,29 @@ | ||
global | ||
maxconn 7000 | ||
log stdout local0 | ||
log stdout local1 notice | ||
|
||
defaults | ||
mode tcp | ||
timeout client 10m | ||
timeout server 10m | ||
timeout connect 10s | ||
timeout client-fin 5s | ||
timeout server-fin 5s | ||
timeout queue 5s | ||
retries 3 | ||
|
||
frontend local_apiserver | ||
bind 172.20.0.1:6443 | ||
log global | ||
mode tcp | ||
option tcplog | ||
default_backend remote_apiserver | ||
|
||
backend remote_apiserver | ||
mode tcp | ||
log global | ||
option httpchk GET /version | ||
option log-health-checks | ||
default-server inter 10s fall 3 rise 3 | ||
server controlplane api.hc.hypershift.local:6443 |
29 changes: 29 additions & 0 deletions
29
...eHAProxyIgnitionConfig_private_cluster_uses_.local_address_and_custom_apiserver_port.yaml
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,29 @@ | ||
global | ||
maxconn 7000 | ||
log stdout local0 | ||
log stdout local1 notice | ||
|
||
defaults | ||
mode tcp | ||
timeout client 10m | ||
timeout server 10m | ||
timeout connect 10s | ||
timeout client-fin 5s | ||
timeout server-fin 5s | ||
timeout queue 5s | ||
retries 3 | ||
|
||
frontend local_apiserver | ||
bind 172.20.0.1:443 | ||
log global | ||
mode tcp | ||
option tcplog | ||
default_backend remote_apiserver | ||
|
||
backend remote_apiserver | ||
mode tcp | ||
log global | ||
option httpchk GET /version | ||
option log-health-checks | ||
default-server inter 10s fall 3 rise 3 | ||
server controlplane api.hc.hypershift.local:443 |
29 changes: 29 additions & 0 deletions
29
...re_TestReconcileHAProxyIgnitionConfig_public_and_private_cluster_uses_.local_address.yaml
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,29 @@ | ||
global | ||
maxconn 7000 | ||
log stdout local0 | ||
log stdout local1 notice | ||
|
||
defaults | ||
mode tcp | ||
timeout client 10m | ||
timeout server 10m | ||
timeout connect 10s | ||
timeout client-fin 5s | ||
timeout server-fin 5s | ||
timeout queue 5s | ||
retries 3 | ||
|
||
frontend local_apiserver | ||
bind 172.20.0.1:6443 | ||
log global | ||
mode tcp | ||
option tcplog | ||
default_backend remote_apiserver | ||
|
||
backend remote_apiserver | ||
mode tcp | ||
log global | ||
option httpchk GET /version | ||
option log-health-checks | ||
default-server inter 10s fall 3 rise 3 | ||
server controlplane api.hc.hypershift.local:6443 |
29 changes: 29 additions & 0 deletions
29
...itionConfig_public_and_private_cluster_uses_.local_address_and_custom_apiserver_port.yaml
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,29 @@ | ||
global | ||
maxconn 7000 | ||
log stdout local0 | ||
log stdout local1 notice | ||
|
||
defaults | ||
mode tcp | ||
timeout client 10m | ||
timeout server 10m | ||
timeout connect 10s | ||
timeout client-fin 5s | ||
timeout server-fin 5s | ||
timeout queue 5s | ||
retries 3 | ||
|
||
frontend local_apiserver | ||
bind 172.20.0.1:443 | ||
log global | ||
mode tcp | ||
option tcplog | ||
default_backend remote_apiserver | ||
|
||
backend remote_apiserver | ||
mode tcp | ||
log global | ||
option httpchk GET /version | ||
option log-health-checks | ||
default-server inter 10s fall 3 rise 3 | ||
server controlplane api.hc.hypershift.local:443 |
29 changes: 29 additions & 0 deletions
29
...xture_TestReconcileHAProxyIgnitionConfig_public_cluster_uses_address_from_kubeconfig.yaml
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,29 @@ | ||
global | ||
maxconn 7000 | ||
log stdout local0 | ||
log stdout local1 notice | ||
|
||
defaults | ||
mode tcp | ||
timeout client 10m | ||
timeout server 10m | ||
timeout connect 10s | ||
timeout client-fin 5s | ||
timeout server-fin 5s | ||
timeout queue 5s | ||
retries 3 | ||
|
||
frontend local_apiserver | ||
bind 172.20.0.1:6443 | ||
log global | ||
mode tcp | ||
option tcplog | ||
default_backend remote_apiserver | ||
|
||
backend remote_apiserver | ||
mode tcp | ||
log global | ||
option httpchk GET /version | ||
option log-health-checks | ||
default-server inter 10s fall 3 rise 3 | ||
server controlplane kubeconfig-host:6443 |
29 changes: 29 additions & 0 deletions
29
...ileHAProxyIgnitionConfig_public_cluster_uses_address_from_kubeconfig_and_custom_port.yaml
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,29 @@ | ||
global | ||
maxconn 7000 | ||
log stdout local0 | ||
log stdout local1 notice | ||
|
||
defaults | ||
mode tcp | ||
timeout client 10m | ||
timeout server 10m | ||
timeout connect 10s | ||
timeout client-fin 5s | ||
timeout server-fin 5s | ||
timeout queue 5s | ||
retries 3 | ||
|
||
frontend local_apiserver | ||
bind 172.20.0.1:443 | ||
log global | ||
mode tcp | ||
option tcplog | ||
default_backend remote_apiserver | ||
|
||
backend remote_apiserver | ||
mode tcp | ||
log global | ||
option httpchk GET /version | ||
option log-health-checks | ||
default-server inter 10s fall 3 rise 3 | ||
server controlplane kubeconfig-host:443 |