Skip to content

Commit

Permalink
[Test] : add assert service to setup (#678)
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
  • Loading branch information
drivebyer authored Oct 23, 2023
1 parent 5b003ae commit 5a4b6cf
Show file tree
Hide file tree
Showing 4 changed files with 301 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/e2e/v1beta2/setup/redis-cluster/00-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ apply :
assert :
- ready-cluster.yaml
- ready-sts.yaml
- ready-pvc.yaml
- ready-pvc.yaml
- ready-svc.yaml
201 changes: 201 additions & 0 deletions tests/e2e/v1beta2/setup/redis-cluster/ready-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-cluster-v1beta2
labels:
app: redis-cluster-v1beta2-leader
redis_setup_type: cluster
role: leader
name: redis-cluster-v1beta2-leader-additional
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: RedisCluster
name: redis-cluster-v1beta2
spec:
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: redis-cluster-v1beta2-leader
redis_setup_type: cluster
role: leader
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-cluster-v1beta2
labels:
app: redis-cluster-v1beta2-leader
redis_setup_type: cluster
role: leader
name: redis-cluster-v1beta2-leader
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: RedisCluster
name: redis-cluster-v1beta2
spec:
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
- name: redis-exporter
port: 9121
protocol: TCP
targetPort: 9121
selector:
app: redis-cluster-v1beta2-leader
redis_setup_type: cluster
role: leader
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-cluster-v1beta2
labels:
app: redis-cluster-v1beta2-leader
redis_setup_type: cluster
role: leader
name: redis-cluster-v1beta2-leader-headless
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: RedisCluster
name: redis-cluster-v1beta2
spec:
clusterIP: None
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: redis-cluster-v1beta2-leader
redis_setup_type: cluster
role: leader
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-cluster-v1beta2
labels:
app: redis-cluster-v1beta2-follower
redis_setup_type: cluster
role: follower
name: redis-cluster-v1beta2-follower
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: RedisCluster
name: redis-cluster-v1beta2
spec:
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
- name: redis-exporter
port: 9121
protocol: TCP
targetPort: 9121
selector:
app: redis-cluster-v1beta2-follower
redis_setup_type: cluster
role: follower
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-cluster-v1beta2
labels:
app: redis-cluster-v1beta2-follower
redis_setup_type: cluster
role: follower
name: redis-cluster-v1beta2-follower-additional
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: RedisCluster
name: redis-cluster-v1beta2
spec:
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: redis-cluster-v1beta2-follower
redis_setup_type: cluster
role: follower
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-cluster-v1beta2
labels:
app: redis-cluster-v1beta2-follower
redis_setup_type: cluster
role: follower
name: redis-cluster-v1beta2-follower-headless
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: RedisCluster
name: redis-cluster-v1beta2
spec:
clusterIP: None
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: redis-cluster-v1beta2-follower
redis_setup_type: cluster
role: follower
type: ClusterIP
status:
loadBalancer: {}
3 changes: 2 additions & 1 deletion tests/e2e/v1beta2/setup/redis-standalone/00-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ apply :
assert :
# - ready-standalone.yaml
- ready-sts.yaml
- ready-pvc.yaml
- ready-pvc.yaml
- ready-svc.yaml
96 changes: 96 additions & 0 deletions tests/e2e/v1beta2/setup/redis-standalone/ready-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-standalone-v1beta2
labels:
app: redis-standalone-v1beta2
redis_setup_type: standalone
role: standalone
name: redis-standalone-v1beta2-headless
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: Redis
name: redis-standalone-v1beta2
spec:
clusterIP: None
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: redis-standalone-v1beta2
redis_setup_type: standalone
role: standalone
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-standalone-v1beta2
labels:
app: redis-standalone-v1beta2
redis_setup_type: standalone
role: standalone
name: redis-standalone-v1beta2
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: Redis
name: redis-standalone-v1beta2
spec:
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: redis-standalone-v1beta2
redis_setup_type: standalone
role: standalone
type: ClusterIP
status:
loadBalancer: {}
---
apiVersion: v1
kind: Service
metadata:
annotations:
prometheus.io/port: "9121"
prometheus.io/scrape: "true"
redis.opstreelabs.in: "true"
redis.opstreelabs.instance: redis-standalone-v1beta2
labels:
app: redis-standalone-v1beta2
redis_setup_type: standalone
role: standalone
name: redis-standalone-v1beta2-additional
ownerReferences:
- apiVersion: redis.redis.opstreelabs.in/v1beta2
controller: true
kind: Redis
name: redis-standalone-v1beta2
spec:
ports:
- name: redis-client
port: 6379
protocol: TCP
targetPort: 6379
selector:
app: redis-standalone-v1beta2
redis_setup_type: standalone
role: standalone
type: ClusterIP
status:
loadBalancer: {}

0 comments on commit 5a4b6cf

Please sign in to comment.