-
Notifications
You must be signed in to change notification settings - Fork 4
/
dev.env
45 lines (34 loc) · 1.78 KB
/
dev.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Useful functions for tests
op() {
kubectl logs -n default -f $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }')
}
oplog() {
kubectl logs -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') | less
}
opkill() {
kubectl delete pod -n default -l app=elassandra-operator -n default
}
opjdb() {
kubectl port-forward -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') 5005:5005
}
opdc() {
kubectl exec -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') -- curl -k https://localhost/datacenter/$1/$2/$3 | jq
}
opstatus() {
kubectl exec -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') -- curl -k https://localhost/datacenter/$1/$2/$3/_status | jq
}
opsts() {
kubectl exec -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') -- curl -k https://localhost/datacenter/$1/$2/$3/_statefulset | jq
}
opks() {
kubectl exec -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') -- curl -k https://localhost/datacenter/$1/$2/$3/_keyspace | jq
}
oprole() {
kubectl exec -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') -- curl -k https://localhost/datacenter/$1/$2/$3/_role | jq
}
opseed() {
kubectl exec -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') -- curl -k https://localhost/seeds/$1/$2/$3 | jq
}
opnode() {
kubectl exec -n default $(kubectl get pod -l app=elassandra-operator -n default --no-headers | awk '{ print $1 }') -- curl -k https://localhost/node/ | jq
}