Skip to content

Commit e11b901

Browse files
authored
Update service-types test for targetport changes (#156)
* Update service-types test for targetport changes
1 parent 1261dce commit e11b901

File tree

12 files changed

+100
-20
lines changed

12 files changed

+100
-20
lines changed

bundle/tests/scorecard/kuttl/service-types/03-assert.yaml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,46 @@ apiVersion: liberty.websphere.ibm.com/v1
22
kind: WebSphereLibertyApplication
33
metadata:
44
name: service-types-lib
5+
spec:
6+
service:
7+
bindable: true
8+
port: 8080
9+
ports:
10+
- name: test-port1
11+
port: 8081
12+
protocol: TCP
13+
targetPort: 8081
14+
- name: test-port2
15+
port: 8082
16+
protocol: TCP
17+
targetPort: 8083
18+
annotations:
19+
name: ClusterIPService
520
status:
621
binding:
722
name: service-types-lib-expose-binding
823
---
924
apiVersion: v1
1025
kind: Service
1126
metadata:
12-
name: service-types-lib
1327
annotations:
14-
name: LoadBalancerService
28+
name: ClusterIPService
29+
name: service-types-lib
1530
spec:
1631
ports:
17-
- name: test-port
32+
- name: 8080-tcp
1833
protocol: TCP
19-
port: 8082
20-
targetPort: 8083
34+
port: 8080
35+
targetPort: 8080
2136
- name: test-port1
2237
protocol: TCP
2338
port: 8081
39+
targetPort: 8081
40+
- name: test-port2
41+
protocol: TCP
42+
port: 8082
2443
targetPort: 8083
25-
type: LoadBalancer
44+
type: ClusterIP
2645
---
2746
apiVersion: v1
2847
kind: Secret
@@ -37,4 +56,4 @@ metadata:
3756
status:
3857
replicas: 1
3958
readyReplicas: 1
40-
updatedReplicas: 1
59+
updatedReplicas: 1
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: liberty.websphere.ibm.com/v1
2+
kind: WebSphereLibertyApplication
3+
metadata:
4+
name: service-types-lib
5+
spec:
6+
# Add fields here
7+
applicationImage: icr.io/appcafe/websphere-liberty:full-java8-openj9-ubi
8+
replicas: 1
9+
service:
10+
bindable: true
11+
port: 8080
12+
ports:
13+
- name: test-port1
14+
port: 8081
15+
protocol: TCP
16+
- name: test-port2
17+
port: 8082
18+
protocol: TCP
19+
targetPort: 8083
20+
annotations:
21+
name: ClusterIPService

bundle/tests/scorecard/kuttl/service-types/04-assert.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ metadata:
1414
name: LoadBalancerService
1515
spec:
1616
ports:
17-
- name: 8082-tcp
17+
- name: test-port
1818
protocol: TCP
1919
port: 8082
20-
targetPort: 8082
20+
targetPort: 8083
2121
- name: test-port1
2222
protocol: TCP
2323
port: 8081

bundle/tests/scorecard/kuttl/service-types/05-assert.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,18 @@ kind: Service
1111
metadata:
1212
name: service-types-lib
1313
annotations:
14-
name: NodePort
14+
name: LoadBalancerService
1515
spec:
1616
ports:
17-
- name: test-port
18-
protocol: TCP
19-
port: 8080
20-
targetPort: 8081
21-
nodePort: 30932
22-
- name: test-port1
17+
- name: 8082-tcp
2318
protocol: TCP
2419
port: 8082
2520
targetPort: 8082
26-
- name: test-port2
27-
port: 8083
21+
- name: test-port1
2822
protocol: TCP
23+
port: 8081
2924
targetPort: 8083
30-
type: NodePort
25+
type: LoadBalancer
3126
---
3227
apiVersion: v1
3328
kind: Secret

bundle/tests/scorecard/kuttl/service-types/07-assert.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
protocol: TCP
1919
port: 8080
2020
targetPort: 8081
21+
nodePort: 30932
2122
- name: test-port1
2223
protocol: TCP
2324
port: 8082
@@ -26,7 +27,7 @@ spec:
2627
port: 8083
2728
protocol: TCP
2829
targetPort: 8083
29-
type: ClusterIP
30+
type: NodePort
3031
---
3132
apiVersion: v1
3233
kind: Secret
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: liberty.websphere.ibm.com/v1
2+
kind: WebSphereLibertyApplication
3+
metadata:
4+
name: service-types-lib
5+
status:
6+
binding:
7+
name: service-types-lib-expose-binding
8+
---
9+
apiVersion: v1
10+
kind: Service
11+
metadata:
12+
name: service-types-lib
13+
annotations:
14+
name: NodePort
15+
spec:
16+
ports:
17+
- name: test-port
18+
protocol: TCP
19+
port: 8080
20+
targetPort: 8081
21+
- name: test-port1
22+
protocol: TCP
23+
port: 8082
24+
targetPort: 8082
25+
- name: test-port2
26+
port: 8083
27+
protocol: TCP
28+
targetPort: 8083
29+
type: ClusterIP
30+
---
31+
apiVersion: v1
32+
kind: Secret
33+
type: Opaque
34+
metadata:
35+
name: service-types-lib-expose-binding
36+
---
37+
apiVersion: apps/v1
38+
kind: Deployment
39+
metadata:
40+
name: service-types-lib
41+
status:
42+
replicas: 1
43+
readyReplicas: 1
44+
updatedReplicas: 1

0 commit comments

Comments
 (0)