Skip to content

Commit

Permalink
[Test] : add assert service to setup
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
  • Loading branch information
drivebyer committed Oct 23, 2023
1 parent 5b003ae commit a88d998
Show file tree
Hide file tree
Showing 2 changed files with 306 additions and 0 deletions.
207 changes: 207 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,207 @@
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
namespace: default
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
namespace: default
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
namespace: default
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
namespace: default
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
namespace: default
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
namespace: default
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: {}
99 changes: 99 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,99 @@
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
namespace: default
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
namespace: default
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
namespace: default
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 a88d998

Please sign in to comment.