mirror of
https://github.com/paralus/paralus.git
synced 2026-04-20 00:26:43 +00:00
restructure rcloud-base as a single base controller (#37)
* restructure rcloud-base as a single base controller * updated master.rest * moved sentry from internal to pkg as it is used by relay * removing unused rpc and it's dependencies * Fix usermgmt tests * Don't redefine variables in rest file Co-authored-by: Abin Simon <abin.simon@rafay.co>
This commit is contained in:
12
pkg/controller/runtime/testdata/configmap.yaml
vendored
Normal file
12
pkg/controller/runtime/testdata/configmap.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: example-config
|
||||
namespace: default
|
||||
data:
|
||||
example.property.1: helloss
|
||||
example.property.2: world
|
||||
example.property.file: |-
|
||||
property.1=value-1
|
||||
property.2=value-2
|
||||
property.3=value-3
|
||||
17
pkg/controller/runtime/testdata/crd.yaml
vendored
Normal file
17
pkg/controller/runtime/testdata/crd.yaml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: crontabs.stable.example.com
|
||||
spec:
|
||||
group: stable.example.com
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
scope: Namespaced
|
||||
names:
|
||||
plural: crontabs
|
||||
singular: crontab
|
||||
kind: CronTab
|
||||
shortNames:
|
||||
- ct
|
||||
0
pkg/controller/runtime/testdata/daemonset.yaml
vendored
Normal file
0
pkg/controller/runtime/testdata/daemonset.yaml
vendored
Normal file
21
pkg/controller/runtime/testdata/deployment1.yaml
vendored
Normal file
21
pkg/controller/runtime/testdata/deployment1.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.7.9
|
||||
ports:
|
||||
- containerPort: 80
|
||||
25
pkg/controller/runtime/testdata/deployment2.yaml
vendored
Normal file
25
pkg/controller/runtime/testdata/deployment2.yaml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
labels:
|
||||
app: nginx
|
||||
annotations:
|
||||
test: test1
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: side-car
|
||||
image: sidecar:latest
|
||||
- name: nginx
|
||||
image: nginx:1.7.10
|
||||
ports:
|
||||
- containerPort: 80
|
||||
10
pkg/controller/runtime/testdata/etcd-patch.yaml
vendored
Normal file
10
pkg/controller/runtime/testdata/etcd-patch.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: etcd0
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: etcd0
|
||||
image: quay.io/coreos/etcd:v3.4
|
||||
64
pkg/controller/runtime/testdata/etcd.yaml
vendored
Normal file
64
pkg/controller/runtime/testdata/etcd.yaml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: etcd0
|
||||
etcd_node: etcd0
|
||||
name: etcd0
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: etcd0
|
||||
etcd_node: etcd0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: etcd0
|
||||
etcd_node: etcd0
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /usr/local/bin/etcd
|
||||
- --name
|
||||
- etcd0
|
||||
- --initial-advertise-peer-urls
|
||||
- http://etcd0:2380
|
||||
- --listen-peer-urls
|
||||
- http://0.0.0.0:2380
|
||||
- --listen-client-urls
|
||||
- http://0.0.0.0:2379
|
||||
- --advertise-client-urls
|
||||
- http://etcd0:2379
|
||||
- --initial-cluster
|
||||
- etcd0=http://etcd0:2380
|
||||
- --initial-cluster-state
|
||||
- new
|
||||
env:
|
||||
- name: ETCDCTL_API
|
||||
value: "3"
|
||||
image: quay.io/coreos/etcd:v3.3
|
||||
name: etcd0
|
||||
ports:
|
||||
- containerPort: 2379
|
||||
name: client
|
||||
protocol: TCP
|
||||
- containerPort: 2380
|
||||
name: server
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- mountPath: /etcd0.etcd
|
||||
name: etcd-storage
|
||||
hostname: etcd0
|
||||
priorityClassName: rafay-cluster-critical
|
||||
volumes:
|
||||
- name: etcd-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: etcd-pv-claim
|
||||
0
pkg/controller/runtime/testdata/job.yaml
vendored
Normal file
0
pkg/controller/runtime/testdata/job.yaml
vendored
Normal file
8
pkg/controller/runtime/testdata/secret.yaml
vendored
Normal file
8
pkg/controller/runtime/testdata/secret.yaml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: mysecret
|
||||
type: Opaque
|
||||
data:
|
||||
username: YWRtaW4=
|
||||
password: MWYyZDFlMmU2N2Rm
|
||||
15
pkg/controller/runtime/testdata/statefulset-patch.yaml
vendored
Normal file
15
pkg/controller/runtime/testdata/statefulset-patch.yaml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: rafay-connector
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: connector
|
||||
image: rafaysystems/rafay-connector:latest-1
|
||||
imagePullSecrets:
|
||||
- name: rcloud-registry-creds
|
||||
command:
|
||||
- test1
|
||||
- ""
|
||||
29
pkg/controller/runtime/testdata/statefulset.yaml
vendored
Normal file
29
pkg/controller/runtime/testdata/statefulset.yaml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: rafay-connector
|
||||
namespace: rafay-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: rafay-connector
|
||||
serviceName: "connector"
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: rafay-connector
|
||||
spec:
|
||||
priorityClassName: rafay-cluster-critical
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: connector
|
||||
image: rafaysystems/rafay-connector:latest
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: connector-config
|
||||
mountPath: /etc/config
|
||||
volumes:
|
||||
- name: connector-config
|
||||
configMap:
|
||||
name: connector-config
|
||||
7
pkg/controller/runtime/testdata/unstructured1.yaml
vendored
Normal file
7
pkg/controller/runtime/testdata/unstructured1.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: "stable.example.com/v1"
|
||||
kind: CronTab
|
||||
metadata:
|
||||
name: my-new-cron-object
|
||||
spec:
|
||||
cronSpec: "* * * * */5"
|
||||
image: my-awesome-cron-image
|
||||
7
pkg/controller/runtime/testdata/unstructured2.yaml
vendored
Normal file
7
pkg/controller/runtime/testdata/unstructured2.yaml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: "stable.example.com/v1"
|
||||
kind: CronTab
|
||||
metadata:
|
||||
name: my-new-cron-object
|
||||
spec:
|
||||
cronSpec: "* * * * */5"
|
||||
image: my-awesome-cron-image2
|
||||
Reference in New Issue
Block a user