Skip to content

Commit e779426

Browse files
authored
K8SPS-228 - Change async-ignore-annotations test to use ClusterIP (#358)
1 parent 17b1fd8 commit e779426

File tree

10 files changed

+28
-28
lines changed

10 files changed

+28
-28
lines changed

e2e-tests/tests/async-ignore-annotations/01-assert.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ spec:
100100
app.kubernetes.io/name: percona-server
101101
app.kubernetes.io/part-of: percona-server
102102
sessionAffinity: None
103-
type: LoadBalancer
103+
type: ClusterIP

e2e-tests/tests/async-ignore-annotations/01-create-cluster.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ commands:
1111
get_cr \
1212
| yq eval '.spec.mysql.clusterType="async"' - \
1313
| yq eval '.spec.mysql.expose.enabled=true' - \
14-
| yq eval '.spec.mysql.expose.type="LoadBalancer"' - \
15-
| yq eval '.spec.proxy.haproxy.expose.type="LoadBalancer"' - \
16-
| yq eval '.spec.orchestrator.expose.type="LoadBalancer"' - \
14+
| yq eval '.spec.mysql.expose.type="ClusterIP"' - \
15+
| yq eval '.spec.proxy.haproxy.expose.type="ClusterIP"' - \
16+
| yq eval '.spec.orchestrator.expose.type="ClusterIP"' - \
1717
| kubectl -n "${NAMESPACE}" apply -f -

e2e-tests/tests/async-ignore-annotations/02-assert.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ spec:
4949
app.kubernetes.io/name: percona-server
5050
app.kubernetes.io/part-of: percona-server
5151
sessionAffinity: None
52-
type: LoadBalancer
52+
type: ClusterIP
5353
---
5454
apiVersion: v1
5555
kind: Service
@@ -96,7 +96,7 @@ spec:
9696
app.kubernetes.io/name: percona-server
9797
app.kubernetes.io/part-of: percona-server
9898
sessionAffinity: None
99-
type: LoadBalancer
99+
type: ClusterIP
100100
---
101101
apiVersion: v1
102102
kind: Service
@@ -140,4 +140,4 @@ spec:
140140
app.kubernetes.io/name: percona-server
141141
app.kubernetes.io/part-of: percona-server
142142
sessionAffinity: None
143-
type: LoadBalancer
143+
type: ClusterIP

e2e-tests/tests/async-ignore-annotations/04-add-annotations-to-service-via-cr.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ commands:
99
1010
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1111
--type json \
12-
-p '[{"op": "add", "path": "/spec/mysql/expose", "value": {"enabled": true, "type": LoadBalancer,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http","service.beta.kubernetes.io/aws-load-balancer-backend": "test-type"}, "labels": {"rack": "rack-22","rack-test": "rack-test-22"}}}]'
12+
-p '[{"op": "add", "path": "/spec/mysql/expose", "value": {"enabled": true, "type": ClusterIP,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http","service.beta.kubernetes.io/aws-load-balancer-backend": "test-type"}, "labels": {"rack": "rack-22","rack-test": "rack-test-22"}}}]'
1313
1414
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1515
--type json \
16-
-p '[{"op": "add", "path": "/spec/proxy/haproxy/expose", "value": {"type": LoadBalancer ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http","service.beta.kubernetes.io/aws-load-balancer-backend": "test-type"}, "labels": {"rack": "rack-22","rack-test": "rack-test-22"}}}]'
16+
-p '[{"op": "add", "path": "/spec/proxy/haproxy/expose", "value": {"type": ClusterIP ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http","service.beta.kubernetes.io/aws-load-balancer-backend": "test-type"}, "labels": {"rack": "rack-22","rack-test": "rack-test-22"}}}]'
1717
1818
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1919
--type json \
20-
-p '[{"op": "add", "path": "/spec/orchestrator/expose", "value": {"type": LoadBalancer ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http","service.beta.kubernetes.io/aws-load-balancer-backend": "test-type"}, "labels": {"rack": "rack-22","rack-test": "rack-test-22"}}}]'
20+
-p '[{"op": "add", "path": "/spec/orchestrator/expose", "value": {"type": ClusterIP ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http","service.beta.kubernetes.io/aws-load-balancer-backend": "test-type"}, "labels": {"rack": "rack-22","rack-test": "rack-test-22"}}}]'
2121
2222
timeout: 30

e2e-tests/tests/async-ignore-annotations/04-assert.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ spec:
5353
rack: rack-22
5454
rack-test: rack-test-22
5555
sessionAffinity: None
56-
type: LoadBalancer
56+
type: ClusterIP
5757
---
5858
apiVersion: v1
5959
kind: Service
@@ -104,7 +104,7 @@ spec:
104104
rack: rack-22
105105
rack-test: rack-test-22
106106
sessionAffinity: None
107-
type: LoadBalancer
107+
type: ClusterIP
108108
---
109109
apiVersion: v1
110110
kind: Service
@@ -152,4 +152,4 @@ spec:
152152
rack: rack-22
153153
rack-test: rack-test-22
154154
sessionAffinity: None
155-
type: LoadBalancer
155+
type: ClusterIP

e2e-tests/tests/async-ignore-annotations/05-assert.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ spec:
5050
app.kubernetes.io/part-of: percona-server
5151
rack: rack-22
5252
sessionAffinity: None
53-
type: LoadBalancer
53+
type: ClusterIP
5454
---
5555
apiVersion: v1
5656
kind: Service
@@ -98,7 +98,7 @@ spec:
9898
app.kubernetes.io/part-of: percona-server
9999
rack: rack-22
100100
sessionAffinity: None
101-
type: LoadBalancer
101+
type: ClusterIP
102102
---
103103
apiVersion: v1
104104
kind: Service
@@ -143,4 +143,4 @@ spec:
143143
app.kubernetes.io/part-of: percona-server
144144
rack: rack-22
145145
sessionAffinity: None
146-
type: LoadBalancer
146+
type: ClusterIP

e2e-tests/tests/async-ignore-annotations/05-delete-annotations.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ commands:
99
1010
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1111
--type json \
12-
-p '[{"op": "replace", "path": "/spec/mysql/expose", "value": {"enabled": true, "type": LoadBalancer,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http"}, "labels": {"rack": "rack-22"}}}]'
12+
-p '[{"op": "replace", "path": "/spec/mysql/expose", "value": {"enabled": true, "type": ClusterIP,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http"}, "labels": {"rack": "rack-22"}}}]'
1313
1414
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1515
--type json \
16-
-p '[{"op": "replace", "path": "/spec/proxy/haproxy/expose", "value": {"type": LoadBalancer ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http"}, "labels": {"rack": "rack-22"}}}]'
16+
-p '[{"op": "replace", "path": "/spec/proxy/haproxy/expose", "value": {"type": ClusterIP ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http"}, "labels": {"rack": "rack-22"}}}]'
1717
1818
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1919
--type json \
20-
-p '[{"op": "replace", "path": "/spec/orchestrator/expose", "value": {"type": LoadBalancer ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http"}, "labels": {"rack": "rack-22"}}}]'
20+
-p '[{"op": "replace", "path": "/spec/orchestrator/expose", "value": {"type": ClusterIP ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http"}, "labels": {"rack": "rack-22"}}}]'
2121
2222
timeout: 30

e2e-tests/tests/async-ignore-annotations/06-assert.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ spec:
5050
app.kubernetes.io/part-of: percona-server
5151
rack: rack-22-test
5252
sessionAffinity: None
53-
type: LoadBalancer
53+
type: ClusterIP
5454
---
5555
apiVersion: v1
5656
kind: Service
@@ -98,7 +98,7 @@ spec:
9898
app.kubernetes.io/part-of: percona-server
9999
rack: rack-22-test
100100
sessionAffinity: None
101-
type: LoadBalancer
101+
type: ClusterIP
102102
---
103103
apiVersion: v1
104104
kind: Service
@@ -143,4 +143,4 @@ spec:
143143
app.kubernetes.io/part-of: percona-server
144144
rack: rack-22-test
145145
sessionAffinity: None
146-
type: LoadBalancer
146+
type: ClusterIP

e2e-tests/tests/async-ignore-annotations/06-update-annotation.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ commands:
99
1010
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1111
--type json \
12-
-p '[{"op": "replace", "path": "/spec/mysql/expose", "value": {"enabled": true, "type": LoadBalancer,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http-test"}, "labels": {"rack": "rack-22-test"}}}]'
12+
-p '[{"op": "replace", "path": "/spec/mysql/expose", "value": {"enabled": true, "type": ClusterIP,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http-test"}, "labels": {"rack": "rack-22-test"}}}]'
1313
1414
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1515
--type json \
16-
-p '[{"op": "replace", "path": "/spec/proxy/haproxy/expose", "value": {"type": LoadBalancer ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http-test"}, "labels": {"rack": "rack-22-test"}}}]'
16+
-p '[{"op": "replace", "path": "/spec/proxy/haproxy/expose", "value": {"type": ClusterIP ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http-test"}, "labels": {"rack": "rack-22-test"}}}]'
1717
1818
kubectl -n "${NAMESPACE}" patch ps "$(get_cluster_name)" \
1919
--type json \
20-
-p '[{"op": "replace", "path": "/spec/orchestrator/expose", "value": {"type": LoadBalancer ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http-test"}, "labels": {"rack": "rack-22-test"}}}]'
20+
-p '[{"op": "replace", "path": "/spec/orchestrator/expose", "value": {"type": ClusterIP ,"annotations": {"service.beta.kubernetes.io/aws-load-balancer-backend-protocol": "http-test"}, "labels": {"rack": "rack-22-test"}}}]'
2121
2222
timeout: 30

e2e-tests/tests/async-ignore-annotations/07-assert.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
app.kubernetes.io/part-of: percona-server
4949
rack: rack-22-test
5050
sessionAffinity: None
51-
type: LoadBalancer
51+
type: ClusterIP
5252
---
5353
apiVersion: v1
5454
kind: Service
@@ -94,7 +94,7 @@ spec:
9494
app.kubernetes.io/part-of: percona-server
9595
rack: rack-22-test
9696
sessionAffinity: None
97-
type: LoadBalancer
97+
type: ClusterIP
9898
---
9999
apiVersion: v1
100100
kind: Service
@@ -137,5 +137,5 @@ spec:
137137
app.kubernetes.io/part-of: percona-server
138138
rack: rack-22-test
139139
sessionAffinity: None
140-
type: LoadBalancer
140+
type: ClusterIP
141141

0 commit comments

Comments
 (0)