Merge pull request #164 from paralus/rename-to-paralus

Rename code to paralus
This commit is contained in:
Nirav Parikh
2022-06-10 13:36:06 +05:30
committed by GitHub
351 changed files with 8228 additions and 8162 deletions

View File

@@ -7,8 +7,8 @@ import (
"strings"
"time"
logv2 "github.com/RafayLabs/rcloud-base/pkg/log"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
logv2 "github.com/paralus/paralus/pkg/log"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
"go.uber.org/zap"
"google.golang.org/grpc/metadata"
)

View File

@@ -5,10 +5,10 @@ import (
"fmt"
"os"
"github.com/RafayLabs/rcloud-base/pkg/enforcer"
logv2 "github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/RafayLabs/rcloud-base/pkg/service"
kclient "github.com/ory/kratos-client-go"
"github.com/paralus/paralus/pkg/enforcer"
logv2 "github.com/paralus/paralus/pkg/log"
"github.com/paralus/paralus/pkg/service"
"github.com/uptrace/bun"
"go.uber.org/zap"
@@ -23,7 +23,7 @@ var _log = logv2.GetLogger()
type Option struct {
// ExcludeRPCMethods is a list of full RPC method string in
// format /package.service/method (for example,
// /rafay.dev.rpc.v3.Idp/ListIdps). These RPC methods are to
// /paralus.dev.rpc.v3.Idp/ListIdps). These RPC methods are to
// be excluded from the auth interceptor.
ExcludeRPCMethods []string

View File

@@ -7,11 +7,11 @@ import (
"errors"
"strings"
"github.com/RafayLabs/rcloud-base/internal/dao"
rpcv3 "github.com/RafayLabs/rcloud-base/proto/rpc/user"
authzv1 "github.com/RafayLabs/rcloud-base/proto/types/authz"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
rpcv3 "github.com/paralus/paralus/proto/rpc/user"
authzv1 "github.com/paralus/paralus/proto/types/authz"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
)
var (

View File

@@ -4,10 +4,10 @@ import (
context "context"
"strings"
"github.com/RafayLabs/rcloud-base/pkg/common"
"github.com/RafayLabs/rcloud-base/pkg/gateway"
"github.com/RafayLabs/rcloud-base/pkg/utils"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/paralus/paralus/pkg/common"
"github.com/paralus/paralus/pkg/gateway"
"github.com/paralus/paralus/pkg/utils"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
@@ -46,9 +46,9 @@ func (ac authContext) NewAuthUnaryInterceptor(opt Option) grpc.UnaryServerInterc
// XXX: This requires any new items which does not follow
// metadata convention to be added here
switch strings.Split(info.FullMethod, "/")[1] {
case "rafay.dev.rpc.v3.Project":
case "paralus.dev.rpc.v3.Project":
project = meta.Name
case "rafay.dev.rpc.v3.Organization":
case "paralus.dev.rpc.v3.Organization":
org = meta.Name
}
}

View File

@@ -7,10 +7,10 @@ import (
"regexp"
"strings"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/pkg/common"
rpcv3 "github.com/RafayLabs/rcloud-base/proto/rpc/v3"
commonpbv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/pkg/common"
rpcv3 "github.com/paralus/paralus/proto/rpc/v3"
commonpbv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
"github.com/uptrace/bun"
"github.com/uptrace/bun/dialect/pgdialect"
"github.com/uptrace/bun/driver/pgdriver"
@@ -44,7 +44,7 @@ type remoteAuthMiddleware struct {
// NewRemoteAuthMiddleware creates a middleware for the HTTP server
// which does auth and authz by talking to the auth service exposed by
// rcloud-base via grpc.
// paralus via grpc.
func NewRemoteAuthMiddleware(al *zap.Logger, as string, opt Option) negroni.Handler {
sqldb := sql.OpenDB(pgdriver.NewConnector(pgdriver.WithDSN(getDSN())))
conn, err := grpc.Dial(as, grpc.WithInsecure())

View File

@@ -1,8 +1,8 @@
package authv3
import (
"github.com/RafayLabs/rcloud-base/pkg/pool"
rpcv3 "github.com/RafayLabs/rcloud-base/proto/rpc/v3"
"github.com/paralus/paralus/pkg/pool"
rpcv3 "github.com/paralus/paralus/proto/rpc/v3"
"context"

View File

@@ -3,7 +3,7 @@ package authv3
import (
"context"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
)
type authService struct {

View File

@@ -20,7 +20,7 @@ const (
NamespacePrefix = "ns"
)
// rcloud constant
// paralus constant
const (
HeartBeatInterval = time.Second * 30
SessionID = "sessionid"

View File

@@ -7,10 +7,10 @@ import (
"strings"
"time"
"github.com/RafayLabs/rcloud-base/pkg/controller/client"
scheme "github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
"github.com/RafayLabs/rcloud-base/pkg/controller/util"
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
"github.com/paralus/paralus/pkg/controller/client"
scheme "github.com/paralus/paralus/pkg/controller/scheme"
"github.com/paralus/paralus/pkg/controller/util"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
apixv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
apierrs "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
@@ -72,7 +72,7 @@ func WithUseUpdate(o runtime.Object) Option {
}
// WithForceUseUpdate sets if update should be used instead of patch for apply
// operation, irrespective of whether the object is of rafay domain or not
// operation, irrespective of whether the object is of paralus domain or not
func WithForceUseUpdate() Option {
return func(opts *Options) {
opts.UseUpdate = true

View File

@@ -12,8 +12,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
cruntime "github.com/RafayLabs/rcloud-base/pkg/controller/runtime"
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
cruntime "github.com/paralus/paralus/pkg/controller/runtime"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
"sigs.k8s.io/yaml"
)

View File

@@ -4,8 +4,8 @@ import (
"bytes"
"fmt"
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
"github.com/RafayLabs/rcloud-base/pkg/controller/util"
"github.com/paralus/paralus/pkg/controller/scheme"
"github.com/paralus/paralus/pkg/controller/util"
sp "k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/apimachinery/pkg/types"

View File

@@ -6,7 +6,7 @@ metadata:
labels:
app: nginx
annotations:
rafay.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}]}]}}}}'
paralus.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}]}]}}}}'
spec:
replicas: 1
selector:

View File

@@ -6,7 +6,7 @@ metadata:
labels:
app: nginx
annotations:
rafay.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}],"readinessProbe":{"httpGet":{"path":"/healthz","port":8080,"httpHeaders":[{"name":"X-Custom-Header","value":"Awesome"}]}}}]}}}}'
paralus.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}],"readinessProbe":{"httpGet":{"path":"/healthz","port":8080,"httpHeaders":[{"name":"X-Custom-Header","value":"Awesome"}]}}}]}}}}'
spec:
replicas: 1
selector:

View File

@@ -6,7 +6,7 @@ metadata:
labels:
app: nginx
annotations:
rafay.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}],"readinessProbe":{"httpGet":{"path":"/healthz","port":8080,"httpHeaders":[{"name":"X-Custom-Header","value":"Awesome"}]}}}]}}}}'
paralus.dev/original: '{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"namespace":"default","name":"nginx-deployment","labels":{"app":"nginx"}},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"name":"nginx","image":"nginx:1.7.9","ports":[{"containerPort":80}],"readinessProbe":{"httpGet":{"path":"/healthz","port":8080,"httpHeaders":[{"name":"X-Custom-Header","value":"Awesome"}]}}}]}}}}'
spec:
replicas: 1
selector:

View File

@@ -1,15 +1,15 @@
apiVersion: cluster.rafay.dev/v2
apiVersion: cluster.paralus.dev/v2
kind: Task
metadata:
annotations:
rafay.dev/object-hash: 25dc4a1045d581e9cb506c8e8c840c3ea0e68ee1007d2a0e60b2fa109e7088c4
rafay.dev/resource-hash: 508efe2a19717df6493adfa2dc65b9aef2e3db72316a954689da2c45346ddda6
paralus.dev/object-hash: 25dc4a1045d581e9cb506c8e8c840c3ea0e68ee1007d2a0e60b2fa109e7088c4
paralus.dev/resource-hash: 508efe2a19717df6493adfa2dc65b9aef2e3db72316a954689da2c45346ddda6
finalizers:
- cluster.rafay.dev.v2.predelete
- cluster.paralus.dev.v2.predelete
labels:
rafay.dev/component: v1-prometheus
rafay.dev/global: "true"
rafay.dev/system: "true"
paralus.dev/component: v1-prometheus
paralus.dev/global: "true"
paralus.dev/system: "true"
name: v1-prometheus
namespace: default
spec:
@@ -6177,7 +6177,7 @@ spec:
kind: ServiceAccount
metadata:
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-k8s-clusterrole
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6208,14 +6208,14 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-k8s-roleconfig
object:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: prometheus-k8s-config
namespace: rafay-infra
namespace: paralus-infra
rules:
- apiGroups:
- ""
@@ -6261,13 +6261,13 @@ spec:
- get
- list
- watch
- name: prometheus-k8s-role-rafay-infra
- name: prometheus-k8s-role-paralus-infra
object:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
rules:
- apiGroups:
- ""
@@ -6286,7 +6286,7 @@ spec:
kind: RoleBinding
metadata:
name: prometheus-k8s-config
namespace: rafay-infra
namespace: paralus-infra
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
@@ -6294,7 +6294,7 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-k8s-rolebinding-default
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6309,7 +6309,7 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-k8s-rolebinding-kube-system
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6324,14 +6324,14 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: rafay-infra
- name: prometheus-k8s-rolebinding-rafay-infra
namespace: paralus-infra
- name: prometheus-k8s-rolebinding-paralus-infra
object:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
@@ -6339,14 +6339,14 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-operator-serviceaccount
object:
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-operator
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-operator-clusterrole
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6428,7 +6428,7 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-operator
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-operator-servicemonitor
object:
apiVersion: monitoring.coreos.com/v1
@@ -6437,7 +6437,7 @@ spec:
labels:
k8s-app: prometheus-operator
name: prometheus-operator
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- honorLabels: true
@@ -6451,7 +6451,7 @@ spec:
kind: ServiceAccount
metadata:
name: alertmanager-main
namespace: rafay-infra
namespace: paralus-infra
- name: alertmanager-main-secret
object:
apiVersion: v1
@@ -6460,9 +6460,9 @@ spec:
kind: Secret
metadata:
annotations:
rafay.dev/overridedBy: cluster/default-override-eks-london-1118
paralus.dev/overridedBy: cluster/default-override-eks-london-1118
name: alertmanager-main
namespace: rafay-infra
namespace: paralus-infra
type: Opaque
- name: kube-state-metrics-service-account
object:
@@ -6470,7 +6470,7 @@ spec:
kind: ServiceAccount
metadata:
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
- name: kube-state-metrics-cluster-role
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6555,14 +6555,14 @@ spec:
subjects:
- kind: ServiceAccount
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
- name: kube-state-metrics-role
object:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
rules:
- apiGroups:
- ""
@@ -6594,7 +6594,7 @@ spec:
kind: RoleBinding
metadata:
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
@@ -6602,14 +6602,14 @@ spec:
subjects:
- kind: ServiceAccount
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
- name: node-exporter-serviceaccount
object:
apiVersion: v1
kind: ServiceAccount
metadata:
name: node-exporter
namespace: rafay-infra
namespace: paralus-infra
- name: node-exporter-cluster-role
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6642,14 +6642,14 @@ spec:
subjects:
- kind: ServiceAccount
name: node-exporter
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-adapter-service-account
object:
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-adapter-cluster-role
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6674,7 +6674,7 @@ spec:
kind: ClusterRoleBinding
metadata:
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -6682,7 +6682,7 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-adapter-cluster-role-binding-delegator
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6696,7 +6696,7 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-adapter-cluster-role-server-resources
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6744,7 +6744,7 @@ spec:
kind: ConfigMap
metadata:
name: adapter-config
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-adapter-role-binding-auth-reader
object:
apiVersion: rbac.authorization.k8s.io/v1
@@ -6759,7 +6759,7 @@ spec:
subjects:
- kind: ServiceAccount
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
- name: prometheus-k8s-edge-creds-configmap
object:
apiVersion: v1
@@ -6770,17 +6770,17 @@ spec:
kind: Secret
metadata:
annotations:
rafay.dev/overridedBy: cluster/default-override-eks-london-1118
paralus.dev/overridedBy: cluster/default-override-eks-london-1118
name: edge-creds
namespace: rafay-infra
namespace: paralus-infra
type: Opaque
tasklet:
metadata:
creationTimestamp: null
finalizers:
- cluster.rafay.dev.v2.predelete
- cluster.paralus.dev.v2.predelete
name: v1-prometheus
namespace: rafay-infra
namespace: paralus-infra
spec:
init:
- name: prometheus-k8s-prometheus
@@ -6789,26 +6789,26 @@ spec:
kind: Prometheus
metadata:
annotations:
rafay.dev/overridedBy: cluster/default-override-eks-london-1118
paralus.dev/overridedBy: cluster/default-override-eks-london-1118
labels:
prometheus: k8s
name: k8s
namespace: rafay-infra
namespace: paralus-infra
spec:
alerting:
alertmanagers:
- name: alertmanager-main
namespace: rafay-infra
namespace: paralus-infra
port: web
baseImage: quay.io/prometheus/prometheus
evaluationInterval: 1m
externalLabels:
deployment_env: staging
rc_edgeid: g29loe2.private.pkvwv2n.edge.stage.rafay-edge.net
externalUrl: https://prometheusrelay.ops.stage.rafay-edge.net
rc_edgeid: g29loe2.private.pkvwv2n.edge.stage.paralus-edge.net
externalUrl: https://prometheusrelay.ops.stage.paralus-edge.net
nodeSelector:
beta.kubernetes.io/os: linux
priorityClassName: rafay-cluster-critical
priorityClassName: paralus-cluster-critical
remoteWrite:
- queueConfig:
batchSendDeadline: 10s
@@ -6824,8 +6824,8 @@ spec:
caFile: /etc/prometheus/secrets/edge-creds/ca.crt
certFile: /etc/prometheus/secrets/edge-creds/client.crt
keyFile: /etc/prometheus/secrets/edge-creds/client.key
serverName: influxdb01.core.stage.rafay-edge.net
url: https://influxdb01.core.stage.rafay-edge.net/api/v1/prom/write?db=monitoringdb&rp=shortterm&u=prometheus_svc&p=Rafay!98
serverName: influxdb01.core.stage.paralus-edge.net
url: https://influxdb01.core.stage.paralus-edge.net/api/v1/prom/write?db=monitoringdb&rp=shortterm&u=prometheus_svc&p=Paralus!98
writeRelabelConfigs:
- action: keep
regex: rcloud.*|kube_daemonset_metadata_generation|kube_deployment_metadata_generation|node_cpu_seconds_total|kube_pod_container_status_running|kube_pod_container_resource_requests_cpu_cores|kube_pod_container_resource_limits_cpu_cores|node:node_num_cpu:sum|:node_memory_MemFreeCachedBuffers_bytes:sum|:node_memory_MemTotal_bytes:sum|node_memory_MemTotal_bytes|kube_pod_container_resource_requests_memory_bytes|kube_pod_container_resource_limits_memory_bytes|amespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate|namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate|container_memory_rss|namespace_pod_name_container_name:container_cpu_usage_seconds_total:sum_rate|node:node_cpu_utilisation:avg1m|node:node_cpu_saturation_load1:|kube_pod_info|node:node_memory_utilisation:|node:node_memory_utilisation:ratio|node:node_memory_swap_io_bytes:sum_rate|node:node_disk_utilisation:avg_irate|:kube_pod_info_node_count:|node:node_disk_saturation:avg_irate|node:node_net_utilisation:sum_irate|node:node_net_saturation:sum_irate|node_filesystem_size_bytes|node_filesystem_avail_bytes|node_namespace_pod:kube_pod_info:|node_load1|node_load5|node_load15|node_memory_MemFree_bytes|node_memory_Buffers_bytes|node_memory_Cached_bytes|node_disk_read_bytes_total|node_disk_written_bytes_total|node_disk_io_time_seconds_total|node:node_filesystem_usage:|node_network_receive_bytes_total|node_network_transmit_bytes_total|container_memory_usage_bytes|kube_pod_container_resource_requests_memory_bytes|container_cpu_usage_seconds_total|container_network_receive_bytes_total|container_network_transmit_bytes_total|kube_statefulset_replicas|kube_statefulset_status_replicas|kube_statefulset_status_replicas_ready|kube_statefulset_status_replicas_current|kube_statefulset_status_replicas_updated|node_boot_time_seconds|kube_node_info|kube_pod_container_info|kube_statefulset_metadata_generation|kube_statefulset_status_observed_generation|kubelet_volume_stats_capacity_bytes|kubelet_volume_stats_available_bytes|kubelet_volume_stats_used_bytes|kube_node_status_condition|fluentd_input_status_num_records_total|fluentd_output_status_buffer_queue_length|fluentd_output_status_num_errors|fluentd_output_status_emit_count|fluentd_output_status_buffer_queue_length|fluentd_output_status_retry_count|fluentd_output_status_rollback_count|fluentd_output_status_buffer_total_bytes|fluentd_output_status_num_records_total
@@ -6853,7 +6853,7 @@ spec:
serviceAccountName: prometheus-k8s
serviceMonitorNamespaceSelector:
matchNames:
- rafay-infra
- paralus-infra
serviceMonitorSelector:
matchExpressions:
- key: k8s-app
@@ -6877,7 +6877,7 @@ spec:
labels:
k8s-app: prometheus
name: prometheus
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- interval: 30s
@@ -6893,7 +6893,7 @@ spec:
labels:
k8s-app: alertmanager
name: alertmanager
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- interval: 30s
@@ -6914,7 +6914,7 @@ spec:
labels:
alertmanager: main
name: main
namespace: rafay-infra
namespace: paralus-infra
spec:
baseImage: quay.io/prometheus/alertmanager
nodeSelector:
@@ -6934,7 +6934,7 @@ spec:
labels:
k8s-app: kube-state-metrics
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
@@ -6963,7 +6963,7 @@ spec:
labels:
k8s-app: node-exporter
name: node-exporter
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
@@ -6982,14 +6982,14 @@ spec:
kind: APIService
metadata:
name: v1beta1.custom.metrics.k8s.io
namespace: rafay-infra
namespace: paralus-infra
spec:
group: custom.metrics.k8s.io
groupPriorityMinimum: 100
insecureSkipTLSVerify: true
service:
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
version: v1beta1
versionPriority: 5
- name: kube-control-manager-service
@@ -7019,7 +7019,7 @@ spec:
labels:
prometheus: k8s
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
spec:
ports:
- name: web
@@ -7036,7 +7036,7 @@ spec:
labels:
k8s-app: prometheus-operator
name: prometheus-operator
namespace: rafay-infra
namespace: paralus-infra
spec:
clusterIP: None
ports:
@@ -7053,7 +7053,7 @@ spec:
labels:
alertmanager: main
name: alertmanager-main
namespace: rafay-infra
namespace: paralus-infra
spec:
ports:
- name: web
@@ -7072,7 +7072,7 @@ spec:
labels:
k8s-app: kube-state-metrics
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
spec:
clusterIP: None
ports:
@@ -7092,7 +7092,7 @@ spec:
labels:
k8s-app: node-exporter
name: node-exporter
namespace: rafay-infra
namespace: paralus-infra
spec:
clusterIP: None
ports:
@@ -7109,7 +7109,7 @@ spec:
labels:
name: prometheus-adapter
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
spec:
ports:
- name: https
@@ -7125,7 +7125,7 @@ spec:
labels:
k8s-app: kubelet
name: kubelet
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
@@ -7170,7 +7170,7 @@ spec:
labels:
k8s-app: fluentd
name: fluentd
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- interval: 1m
@@ -7200,7 +7200,7 @@ spec:
labels:
k8s-app: apiserver
name: kube-apiserver
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
@@ -7231,7 +7231,7 @@ spec:
labels:
k8s-app: coredns
name: coredns
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
@@ -7251,7 +7251,7 @@ spec:
labels:
k8s-app: kube-controller-manager
name: kube-controller-manager
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- interval: 30s
@@ -7276,7 +7276,7 @@ spec:
labels:
k8s-app: kube-scheduler
name: kube-scheduler
namespace: rafay-infra
namespace: paralus-infra
spec:
endpoints:
- interval: 30s
@@ -7297,7 +7297,7 @@ spec:
labels:
k8s-app: prometheus-operator
name: prometheus-operator
namespace: rafay-infra
namespace: paralus-infra
spec:
replicas: 1
selector:
@@ -7342,7 +7342,7 @@ spec:
labels:
app: kube-state-metrics
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
spec:
replicas: 1
selector:
@@ -7441,7 +7441,7 @@ spec:
labels:
app: node-exporter
name: node-exporter
namespace: rafay-infra
namespace: paralus-infra
spec:
selector:
matchLabels:
@@ -7524,7 +7524,7 @@ spec:
kind: Deployment
metadata:
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
spec:
replicas: 1
selector:
@@ -7544,7 +7544,7 @@ spec:
- --prometheus-url=http://prometheus-k8s.monitoring.svc:9090/
- --secure-port=6443
- --v=4
image: registry.dev.rafay-edge.net:5000/rafay/k8s-prometheus-adapter-amd64:v1.0.4
image: registry.dev.paralus-edge.net:5000/paralus/k8s-prometheus-adapter-amd64:v1.0.4
name: prometheus-adapter
ports:
- containerPort: 6443
@@ -7572,7 +7572,7 @@ spec:
prometheus: k8s
role: alert-rules
name: prometheus-k8s-rules
namespace: rafay-infra
namespace: paralus-infra
spec:
groups:
- name: k8s.rules
@@ -8503,7 +8503,7 @@ spec:
prometheus: k8s
role: alert-rules
name: custom-prometheus-k8s-rules
namespace: rafay-infra
namespace: paralus-infra
spec:
groups:
- name: custom.rules
@@ -8679,7 +8679,7 @@ status:
apiVersion: v1
kind: ServiceAccount
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4345"
uid: bfca15e3-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8719,7 +8719,7 @@ status:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
name: prometheus-k8s-config
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4351"
uid: bfd1918a-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8755,13 +8755,13 @@ status:
state: StepComplete
- jobReason: not configured
jobState: StepJobComplete
name: prometheus-k8s-role-rafay-infra
name: prometheus-k8s-role-paralus-infra
objectReason: object type *v1.Role not handled
objectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4354"
uid: bfe3792f-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8775,7 +8775,7 @@ status:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
name: prometheus-k8s-config
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4355"
uid: bfe4dbec-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8811,13 +8811,13 @@ status:
state: StepComplete
- jobReason: not configured
jobState: StepJobComplete
name: prometheus-k8s-rolebinding-rafay-infra
name: prometheus-k8s-rolebinding-paralus-infra
objectReason: object type *v1.RoleBinding not handled
objectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
name: prometheus-k8s
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4359"
uid: bff0fd0d-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8831,7 +8831,7 @@ status:
apiVersion: v1
kind: ServiceAccount
name: prometheus-operator
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4360"
uid: bff248c3-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8871,7 +8871,7 @@ status:
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
name: prometheus-operator
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4365"
uid: bff65354-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8885,7 +8885,7 @@ status:
apiVersion: v1
kind: ServiceAccount
name: alertmanager-main
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4366"
uid: bff799f4-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8899,7 +8899,7 @@ status:
apiVersion: v1
kind: Secret
name: alertmanager-main
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4367"
uid: bff8f244-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8913,7 +8913,7 @@ status:
apiVersion: v1
kind: ServiceAccount
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4370"
uid: bffeb3cb-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8953,7 +8953,7 @@ status:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4375"
uid: c0027a33-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8967,7 +8967,7 @@ status:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
name: kube-state-metrics
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4376"
uid: c00399d7-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -8981,7 +8981,7 @@ status:
apiVersion: v1
kind: ServiceAccount
name: node-exporter
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4377"
uid: c0050866-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -9021,7 +9021,7 @@ status:
apiVersion: v1
kind: ServiceAccount
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4382"
uid: c00f3ed8-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -9048,7 +9048,7 @@ status:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
name: prometheus-adapter
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4386"
uid: c011c005-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -9088,7 +9088,7 @@ status:
apiVersion: v1
kind: ConfigMap
name: adapter-config
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4389"
uid: c01581ce-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -9116,7 +9116,7 @@ status:
apiVersion: v1
kind: Secret
name: edge-creds
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4391"
uid: c01ebd57-0a47-11ea-8c3a-0219fcc74e7c
objectState: StepObjectComplete
@@ -9124,9 +9124,9 @@ status:
state: StepComplete
observedGeneration: 1
taskletRef:
apiVersion: cluster.rafay.dev/v2
apiVersion: cluster.paralus.dev/v2
kind: Tasklet
name: v1-prometheus
namespace: rafay-infra
namespace: paralus-infra
resourceVersion: "4456"
uid: c3930f90-0a47-11ea-8c3a-0219fcc74e7c

View File

@@ -1,25 +1,25 @@
apiVersion: cluster.rafay.dev/v2
apiVersion: cluster.paralus.dev/v2
kind: Namespace
metadata:
annotations:
rafay.dev/object-hash: avinash-test
paralus.dev/object-hash: avinash-test
label-1: test
rafay.dev/pruned: "null"
rafay.dev/random: jcoVQsZEXH
rafay.dev/resource-hash: 4fc5c12346ea0fb4ac19cca416fbaffb3c77a0ace763c2ad37510c0cca274af1
paralus.dev/pruned: "null"
paralus.dev/random: jcoVQsZEXH
paralus.dev/resource-hash: 4fc5c12346ea0fb4ac19cca416fbaffb3c77a0ace763c2ad37510c0cca274af1
rep-drift-action: deny
creationTimestamp: "2021-09-15T05:00:18Z"
finalizers:
- cluster.rafay.dev.v2.predelete
- cluster.paralus.dev.v2.predelete
generation: 1
labels:
rafay.dev/global: "true"
rafay.dev/modified-sa: "true"
rafay.dev/psp: rafay-privileged-psp
rafay.dev/system: "true"
paralus.dev/global: "true"
paralus.dev/modified-sa: "true"
paralus.dev/psp: paralus-privileged-psp
paralus.dev/system: "true"
rep-drift-reconcillation: enabled
managedFields:
- apiVersion: cluster.rafay.dev/v2
- apiVersion: cluster.paralus.dev/v2
fieldsType: FieldsV1
fieldsV1:
f:spec:
@@ -35,34 +35,34 @@ metadata:
manager: manager
operation: Update
time: "2021-09-15T05:00:18Z"
- apiVersion: cluster.rafay.dev/v2
- apiVersion: cluster.paralus.dev/v2
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:rafay.dev/object-hash: {}
f:rafay.dev/pruned: {}
f:rafay.dev/random: {}
f:rafay.dev/resource-hash: {}
f:paralus.dev/object-hash: {}
f:paralus.dev/pruned: {}
f:paralus.dev/random: {}
f:paralus.dev/resource-hash: {}
f:rep-drift-action: {}
f:finalizers:
.: {}
v:"cluster.rafay.dev.v2.predelete": {}
v:"cluster.paralus.dev.v2.predelete": {}
f:labels:
.: {}
f:rafay.dev/global: {}
f:rafay.dev/modified-sa: {}
f:rafay.dev/psp: {}
f:rafay.dev/system: {}
f:paralus.dev/global: {}
f:paralus.dev/modified-sa: {}
f:paralus.dev/psp: {}
f:paralus.dev/system: {}
f:rep-drift-reconcillation: {}
f:spec:
.: {}
f:postCreate: {}
manager: rafay-connector
manager: paralus-connector
operation: Update
time: "2021-09-15T05:00:18Z"
name: rafay-system
name: paralus-system
namespace: default
resourceVersion: "1272"
uid: e4550a5c-a2ef-4277-8283-0f4e3478970c
@@ -74,12 +74,12 @@ spec:
kind: ClusterRole
metadata:
annotations:
rafay.dev/original: '{"kind":"ClusterRole","rules":[{"verbs":["*"],"apiGroups":["*"],"resources":["*"]},{"verbs":["*"],"nonResourceURLs":["*"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.rafay.dev"],"resources":["namespaces"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.rafay.dev"],"resources":["namespaces/status"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.rafay.dev"],"resources":["tasklets"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.rafay.dev"],"resources":["tasklets/status"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.rafay.dev"],"resources":["tasks"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.rafay.dev"],"resources":["tasks/status"]}],"metadata":{"name":"rafay:manager","creationTimestamp":null,"labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}'
paralus.dev/original: '{"kind":"ClusterRole","rules":[{"verbs":["*"],"apiGroups":["*"],"resources":["*"]},{"verbs":["*"],"nonResourceURLs":["*"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.paralus.dev"],"resources":["namespaces"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.paralus.dev"],"resources":["namespaces/status"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.paralus.dev"],"resources":["tasklets"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.paralus.dev"],"resources":["tasklets/status"]},{"verbs":["create","delete","get","list","patch","update","watch"],"apiGroups":["cluster.paralus.dev"],"resources":["tasks"]},{"verbs":["get","patch","update"],"apiGroups":["cluster.paralus.dev"],"resources":["tasks/status"]}],"metadata":{"name":"paralus:manager","creationTimestamp":null,"labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}'
rep-drift-action: deny
creationTimestamp: null
labels:
rep-drift-reconcillation: enabled
name: rafay:manager
name: paralus:manager
rules:
- apiGroups:
- '*'
@@ -92,7 +92,7 @@ spec:
verbs:
- '*'
- apiGroups:
- cluster.rafay.dev
- cluster.paralus.dev
resources:
- namespaces
verbs:
@@ -104,7 +104,7 @@ spec:
- update
- watch
- apiGroups:
- cluster.rafay.dev
- cluster.paralus.dev
resources:
- namespaces/status
verbs:
@@ -112,7 +112,7 @@ spec:
- patch
- update
- apiGroups:
- cluster.rafay.dev
- cluster.paralus.dev
resources:
- tasklets
verbs:
@@ -124,7 +124,7 @@ spec:
- update
- watch
- apiGroups:
- cluster.rafay.dev
- cluster.paralus.dev
resources:
- tasklets/status
verbs:
@@ -132,7 +132,7 @@ spec:
- patch
- update
- apiGroups:
- cluster.rafay.dev
- cluster.paralus.dev
resources:
- tasks
verbs:
@@ -144,7 +144,7 @@ spec:
- update
- watch
- apiGroups:
- cluster.rafay.dev
- cluster.paralus.dev
resources:
- tasks/status
verbs:
@@ -157,11 +157,11 @@ spec:
kind: ClusterRole
metadata:
annotations:
rafay.dev/original: '{"kind":"ClusterRole","rules":[{"verbs":["create"],"apiGroups":["authentication.k8s.io"],"resources":["tokenreviews"]},{"verbs":["create"],"apiGroups":["authorization.k8s.io"],"resources":["subjectaccessreviews"]}],"metadata":{"name":"rafay:proxy-role","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}'
paralus.dev/original: '{"kind":"ClusterRole","rules":[{"verbs":["create"],"apiGroups":["authentication.k8s.io"],"resources":["tokenreviews"]},{"verbs":["create"],"apiGroups":["authorization.k8s.io"],"resources":["subjectaccessreviews"]}],"metadata":{"name":"paralus:proxy-role","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}'
rep-drift-action: deny
labels:
rep-drift-reconcillation: enabled
name: rafay:proxy-role
name: paralus:proxy-role
rules:
- apiGroups:
- authentication.k8s.io
@@ -178,17 +178,17 @@ spec:
namespaceMeta:
annotations:
rep-drift-action: deny
role: rafay-system
role: paralus-system
creationTimestamp: null
labels:
control-plane: controller-manager
rafay.dev/global: "true"
rafay.dev/modified-sa: "true"
rafay.dev/psp: rafay-privileged-psp
rafay.dev/system: "true"
paralus.dev/global: "true"
paralus.dev/modified-sa: "true"
paralus.dev/psp: paralus-privileged-psp
paralus.dev/system: "true"
rep-drift-reconcillation: enabled
role: rafay-system
name: rafay-system
role: paralus-system
name: paralus-system
postCreate:
- name: create-system-sa-serviceaccount
object:
@@ -196,24 +196,24 @@ spec:
kind: ServiceAccount
metadata:
annotations:
rafay.dev/original: '{"kind":"ServiceAccount","metadata":{"name":"system-sa","namespace":"rafay-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"v1"}'
paralus.dev/original: '{"kind":"ServiceAccount","metadata":{"name":"system-sa","namespace":"paralus-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"v1"}'
rep-drift-action: deny
labels:
rep-drift-reconcillation: enabled
name: system-sa
namespace: rafay-system
namespace: paralus-system
- name: create-leader-election-role
object:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
annotations:
rafay.dev/original: '{"kind":"Role","rules":[{"verbs":["get","list","watch","create","update","patch","delete"],"apiGroups":[""],"resources":["configmaps"]},{"verbs":["get","update","patch"],"apiGroups":[""],"resources":["configmaps/status"]},{"verbs":["create"],"apiGroups":[""],"resources":["events"]}],"metadata":{"name":"rafay:leader-election-role","namespace":"rafay-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}'
paralus.dev/original: '{"kind":"Role","rules":[{"verbs":["get","list","watch","create","update","patch","delete"],"apiGroups":[""],"resources":["configmaps"]},{"verbs":["get","update","patch"],"apiGroups":[""],"resources":["configmaps/status"]},{"verbs":["create"],"apiGroups":[""],"resources":["events"]}],"metadata":{"name":"paralus:leader-election-role","namespace":"paralus-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"apiVersion":"rbac.authorization.k8s.io/v1"}'
rep-drift-action: deny
labels:
rep-drift-reconcillation: enabled
name: rafay:leader-election-role
namespace: rafay-system
name: paralus:leader-election-role
namespace: paralus-system
rules:
- apiGroups:
- ""
@@ -247,73 +247,73 @@ spec:
kind: RoleBinding
metadata:
annotations:
rafay.dev/original: '{"kind":"RoleBinding","roleRef":{"kind":"Role","name":"rafay:leader-election-role","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"rafay:leader-election-rolebinding","namespace":"rafay-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"rafay-system"},{"kind":"ServiceAccount","name":"default","namespace":"rafay-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}'
paralus.dev/original: '{"kind":"RoleBinding","roleRef":{"kind":"Role","name":"paralus:leader-election-role","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"paralus:leader-election-rolebinding","namespace":"paralus-system","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"paralus-system"},{"kind":"ServiceAccount","name":"default","namespace":"paralus-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}'
rep-drift-action: deny
labels:
rep-drift-reconcillation: enabled
name: rafay:leader-election-rolebinding
namespace: rafay-system
name: paralus:leader-election-rolebinding
namespace: paralus-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rafay:leader-election-role
name: paralus:leader-election-role
subjects:
- kind: ServiceAccount
name: system-sa
namespace: rafay-system
namespace: paralus-system
- kind: ServiceAccount
name: default
namespace: rafay-system
namespace: paralus-system
- name: create-manager-role-binding
object:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
rafay.dev/original: '{"kind":"ClusterRoleBinding","roleRef":{"kind":"ClusterRole","name":"rafay:manager","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"rafay:rafay-system:manager-rolebinding","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"rafay-system"},{"kind":"ServiceAccount","name":"default","namespace":"rafay-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}'
paralus.dev/original: '{"kind":"ClusterRoleBinding","roleRef":{"kind":"ClusterRole","name":"paralus:manager","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"paralus:paralus-system:manager-rolebinding","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"paralus-system"},{"kind":"ServiceAccount","name":"default","namespace":"paralus-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}'
rep-drift-action: deny
labels:
rep-drift-reconcillation: enabled
name: rafay:rafay-system:manager-rolebinding
name: paralus:paralus-system:manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rafay:manager
name: paralus:manager
subjects:
- kind: ServiceAccount
name: system-sa
namespace: rafay-system
namespace: paralus-system
- kind: ServiceAccount
name: default
namespace: rafay-system
namespace: paralus-system
- name: create-proxy-role-binding
object:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
rafay.dev/original: '{"kind":"ClusterRoleBinding","roleRef":{"kind":"ClusterRole","name":"rafay:proxy-role","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"rafay:rafay-system:proxy-rolebinding","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"rafay-system"},{"kind":"ServiceAccount","name":"default","namespace":"rafay-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}'
paralus.dev/original: '{"kind":"ClusterRoleBinding","roleRef":{"kind":"ClusterRole","name":"paralus:proxy-role","apiGroup":"rbac.authorization.k8s.io"},"metadata":{"name":"paralus:paralus-system:proxy-rolebinding","labels":{"rep-drift-reconcillation":"enabled"},"annotations":{"rep-drift-action":"deny"}},"subjects":[{"kind":"ServiceAccount","name":"system-sa","namespace":"paralus-system"},{"kind":"ServiceAccount","name":"default","namespace":"paralus-system"}],"apiVersion":"rbac.authorization.k8s.io/v1"}'
rep-drift-action: deny
labels:
rep-drift-reconcillation: enabled
name: rafay:rafay-system:proxy-rolebinding
name: paralus:paralus-system:proxy-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rafay:proxy-role
name: paralus:proxy-role
subjects:
- kind: ServiceAccount
name: system-sa
namespace: rafay-system
namespace: paralus-system
- kind: ServiceAccount
name: default
namespace: rafay-system
namespace: paralus-system
- name: create-access-log-configmap_v2_1
object:
apiVersion: v1
data:
fluent.conf: |
<match kube.rafay-system.ingress-nginx-controller**>
<match kube.paralus-system.ingress-nginx-controller**>
@type forward
require_ack_response true
ack_response_timeout 190
@@ -333,27 +333,27 @@ spec:
overflow_action block
</buffer>
<server>
host log-aggregator.rafay-infra.svc.cluster.local
host log-aggregator.paralus-infra.svc.cluster.local
port 24224
</server>
</match>
kind: ConfigMap
metadata:
annotations:
rafay.dev/original: '{"data":{"fluent.conf":"<match kube.rafay-system.ingress-nginx-controller**>\n @type
paralus.dev/original: '{"data":{"fluent.conf":"<match kube.paralus-system.ingress-nginx-controller**>\n @type
forward\n require_ack_response true\n ack_response_timeout 190\n <buffer>\n @type
memory\n flush_mode interval\n retry_type exponential_backoff\n flush_thread_count
2\n flush_interval 60s\n retry_forever false\n retry_max_interval
1h\n retry_timeout 32h\n retry_max_times 17\n retry_randomize
true\n chunk_limit_size 5M\n queue_limit_length 8\n overflow_action
block\n </buffer>\n <server>\n host log-aggregator.rafay-infra.svc.cluster.local\n port
24224\n </server>\n</match>\n"},"kind":"ConfigMap","metadata":{"name":"rafay-ingress-log-config","labels":{"logger":"rafay-logger","rep-drift-reconcillation":"enabled"},"namespace":"rafay-system","annotations":{"rep-drift-action":"deny"}},"apiVersion":"v1"}'
block\n </buffer>\n <server>\n host log-aggregator.paralus-infra.svc.cluster.local\n port
24224\n </server>\n</match>\n"},"kind":"ConfigMap","metadata":{"name":"paralus-ingress-log-config","labels":{"logger":"paralus-logger","rep-drift-reconcillation":"enabled"},"namespace":"paralus-system","annotations":{"rep-drift-action":"deny"}},"apiVersion":"v1"}'
rep-drift-action: deny
labels:
logger: rafay-logger
logger: paralus-logger
rep-drift-reconcillation: enabled
name: rafay-ingress-log-config
namespace: rafay-system
name: paralus-ingress-log-config
namespace: paralus-system
status:
conditions:
- lastUpdateTime: "2021-09-15T05:00:18Z"
@@ -380,7 +380,7 @@ status:
objectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
name: rafay:manager
name: paralus:manager
resourceVersion: "1258"
uid: 855e1d07-8a75-47be-9e98-d03810f634a6
objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -394,7 +394,7 @@ status:
objectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
name: rafay:proxy-role
name: paralus:proxy-role
resourceVersion: "1259"
uid: abf1cc60-8f9a-4fad-be5d-5551fc6c236a
objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -404,7 +404,7 @@ status:
namespaceRef:
apiVersion: v1
kind: Namespace
name: rafay-system
name: paralus-system
resourceVersion: "1262"
uid: 574a3611-2ab8-436f-999a-f463360e5d3d
observedGeneration: 1
@@ -417,7 +417,7 @@ status:
apiVersion: v1
kind: ServiceAccount
name: system-sa
namespace: rafay-system
namespace: paralus-system
resourceVersion: "1265"
uid: f1981c17-775d-4138-8633-776ad49fb586
objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -431,8 +431,8 @@ status:
objectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
name: rafay:leader-election-role
namespace: rafay-system
name: paralus:leader-election-role
namespace: paralus-system
resourceVersion: "1266"
uid: 3afaf464-0b94-4116-9bcc-93a4978174c6
objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -446,8 +446,8 @@ status:
objectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
name: rafay:leader-election-rolebinding
namespace: rafay-system
name: paralus:leader-election-rolebinding
namespace: paralus-system
resourceVersion: "1267"
uid: 12551dfd-7143-4e83-a0a6-0c4ab1e1d4fe
objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -461,7 +461,7 @@ status:
objectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
name: rafay:rafay-system:manager-rolebinding
name: paralus:paralus-system:manager-rolebinding
resourceVersion: "1268"
uid: 2fe8a87a-d571-4997-b22e-a6da5bdcbe49
objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -475,7 +475,7 @@ status:
objectRef:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
name: rafay:rafay-system:proxy-rolebinding
name: paralus:paralus-system:proxy-rolebinding
resourceVersion: "1269"
uid: 7f3c4c02-cd90-40c0-8663-5f156c50e6c3
objectSpecHash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
@@ -489,11 +489,11 @@ status:
objectRef:
apiVersion: v1
kind: ConfigMap
name: rafay-ingress-log-config
namespace: rafay-system
name: paralus-ingress-log-config
namespace: paralus-system
resourceVersion: "1270"
uid: e86e3ea0-a3b2-4187-b552-c18e5f6ca30f
objectSpecHash: d26d566c010b3b8a7dde8ef1a406a961c8839d60951b08cbd8d34c1c885c6cd2
objectState: StepObjectComplete
reason: complete
state: StepComplete
state: StepComplete

View File

@@ -2,21 +2,21 @@ apiVersion: v1
kind: Service
metadata:
annotations:
rafay.dev/original: '{"kind": "Service", "spec": {"type": "ClusterIP", "ports":
paralus.dev/original: '{"kind": "Service", "spec": {"type": "ClusterIP", "ports":
[{"name": "log-aggregator-tcp", "port": 8888, "nodePort": null, "protocol":
"TCP", "targetPort": 8888}, {"name": "log-aggregator-udp", "port": 5140, "nodePort":
null, "protocol": "UDP", "targetPort": 5140}, {"name": "log-aggregator-fwd",
"port": 24224, "nodePort": null, "protocol": "TCP", "targetPort": 24224}, {"name":
"prometheus", "port": 24231, "nodePort": null, "protocol": "TCP", "targetPort":
24231}], "selector": {"app": "log-aggregator"}}, "metadata": {"name": "log-aggregator",
"namespace": "rafay-infra", "annotations": {"rafay.dev/previous": "{\"kind\":
"namespace": "paralus-infra", "annotations": {"paralus.dev/previous": "{\"kind\":
\"Service\", \"spec\": {\"type\": \"ClusterIP\", \"ports\": [{\"name\": \"log-aggregator-tcp\",
\"port\": 8888, \"protocol\": \"TCP\", \"targetPort\": 8888}, {\"name\": \"log-aggregator-udp\",
\"port\": 5140, \"protocol\": \"UDP\", \"targetPort\": 5140}, {\"name\": \"log-aggregator-fwd\",
\"port\": 24224, \"protocol\": \"TCP\", \"targetPort\": 24224}, {\"name\": \"prometheus\",
\"port\": 24231, \"protocol\": \"TCP\", \"targetPort\": 24231}], \"selector\":
{\"app\": \"log-aggregator\"}}, \"metadata\": {\"name\": \"log-aggregator\",
\"namespace\": \"rafay-infra\"}, \"apiVersion\": \"v1\"}"}}, "apiVersion": "v1"}'
\"namespace\": \"paralus-infra\"}, \"apiVersion\": \"v1\"}"}}, "apiVersion": "v1"}'
creationTimestamp: "2020-02-12T21:49:41Z"
name: log-aggregator
namespace: default
@@ -52,4 +52,4 @@ spec:
sessionAffinity: None
type: NodePort
status:
loadBalancer: {}
loadBalancer: {}

View File

@@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
annotations:
rafay.dev/original: |
paralus.dev/original: |
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"service.beta.kubernetes.io/aws-load-balancer-internal":"0.0.0.0/0"},"name":"device-manager-service","namespace":"default"},"spec":{"ports":[{"name":"grpc","port":55050}],"selector":{"app":"device-manager-service"},"type":"LoadBalancer"}}
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
creationTimestamp: "2020-02-12T23:52:46Z"

View File

@@ -2,33 +2,33 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
rafay.dev/overridedBy: global/global-override
name: rafay-connector
paralus.dev/overridedBy: global/global-override
name: paralus-connector
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: rafay-connector
app: paralus-connector
serviceName: "connector"
template:
metadata:
labels:
app: rafay-connector
app: paralus-connector
spec:
containers:
- image: rafaysystems/rafay-connector:latest
- image: paralussystems/paralus-connector:latest
imagePullPolicy: Always
name: connector
resources: {}
volumeMounts:
- mountPath: /etc/config
name: connector-config
priorityClassName: rafay-cluster-critical
priorityClassName: paralus-cluster-critical
terminationGracePeriodSeconds: 10
volumes:
- configMap:
name: connector-config
name: connector-config
status:
replicas: 0
replicas: 0

View File

@@ -3,8 +3,8 @@ kind: StatefulSet
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apps/v1","kind":"StatefulSet","metadata":{"annotations":{},"name":"rafay-connector","namespace":"rafay-system"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"rafay-connector"}},"serviceName":"connector","template":{"metadata":{"labels":{"app":"rafay-connector"}},"spec":{"containers":[{"image":"rafaysystems/rafay-connector:latest","name":"connector","volumeMounts":[{"mountPath":"/etc/config","name":"connector-config"}]}],"priorityClassName":"rafay-cluster-critical","terminationGracePeriodSeconds":10,"volumes":[{"configMap":{"name":"connector-config"},"name":"connector-config"}]}}}}
name: rafay-connector
{"apiVersion":"apps/v1","kind":"StatefulSet","metadata":{"annotations":{},"name":"paralus-connector","namespace":"paralus-system"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"paralus-connector"}},"serviceName":"connector","template":{"metadata":{"labels":{"app":"paralus-connector"}},"spec":{"containers":[{"image":"paralussystems/paralus-connector:latest","name":"connector","volumeMounts":[{"mountPath":"/etc/config","name":"connector-config"}]}],"priorityClassName":"paralus-cluster-critical","terminationGracePeriodSeconds":10,"volumes":[{"configMap":{"name":"connector-config"},"name":"connector-config"}]}}}}
name: paralus-connector
namespace: default
spec:
podManagementPolicy: OrderedReady
@@ -12,16 +12,16 @@ spec:
revisionHistoryLimit: 10
selector:
matchLabels:
app: rafay-connector
app: paralus-connector
serviceName: connector
template:
metadata:
creationTimestamp: null
labels:
app: rafay-connector
app: paralus-connector
spec:
containers:
- image: rafaysystems/rafay-connector:latest
- image: paralussystems/paralus-connector:latest
imagePullPolicy: Always
name: connector
resources: {}
@@ -31,7 +31,7 @@ spec:
- mountPath: /etc/config
name: connector-config
dnsPolicy: ClusterFirst
priorityClassName: rafay-cluster-critical
priorityClassName: paralus-cluster-critical
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
@@ -48,9 +48,9 @@ spec:
status:
collisionCount: 0
currentReplicas: 1
currentRevision: rafay-connector-568bcd85cb
currentRevision: paralus-connector-568bcd85cb
observedGeneration: 1
readyReplicas: 1
replicas: 1
updateRevision: rafay-connector-568bcd85cb
updatedReplicas: 1
updateRevision: paralus-connector-568bcd85cb
updatedReplicas: 1

View File

@@ -7,12 +7,12 @@ import (
v1 "k8s.io/api/core/v1"
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
"github.com/paralus/paralus/pkg/controller/scheme"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
cruntime "github.com/RafayLabs/rcloud-base/pkg/controller/runtime"
cruntime "github.com/paralus/paralus/pkg/controller/runtime"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)

View File

@@ -3,7 +3,7 @@ package apply
import (
"testing"
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
)
func TestGetGVK(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package client
import (
"time"
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
"github.com/paralus/paralus/pkg/controller/scheme"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
"sigs.k8s.io/controller-runtime/pkg/client/config"

View File

@@ -4,8 +4,8 @@ import (
"bytes"
"errors"
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
apiv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
"github.com/paralus/paralus/pkg/controller/scheme"
apiv2 "github.com/paralus/paralus/proto/types/controller"
rbacv1 "k8s.io/api/rbac/v1"
apixv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
"k8s.io/apimachinery/pkg/runtime"
@@ -14,7 +14,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"github.com/RafayLabs/rcloud-base/pkg/controller/util"
"github.com/paralus/paralus/pkg/controller/util"
)
var (

View File

@@ -7,7 +7,7 @@ import (
"reflect"
"testing"
apiv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
apiv2 "github.com/paralus/paralus/proto/types/controller"
appsv1 "k8s.io/api/apps/v1"
"sigs.k8s.io/yaml"
)

View File

@@ -57,7 +57,7 @@ spec:
- mountPath: /etcd0.etcd
name: etcd-storage
hostname: etcd0
priorityClassName: rafay-cluster-critical
priorityClassName: paralus-cluster-critical
volumes:
- name: etcd-storage
persistentVolumeClaim:

View File

@@ -1,15 +1,15 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: rafay-connector
name: paralus-connector
spec:
template:
spec:
containers:
- name: connector
image: rafaysystems/rafay-connector:latest-1
image: paralussystems/paralus-connector:latest-1
imagePullSecrets:
- name: rcloud-registry-creds
- name: paralus-registry-creds
command:
- test1
- ""
- ""

View File

@@ -1,24 +1,24 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: rafay-connector
namespace: rafay-system
name: paralus-connector
namespace: paralus-system
spec:
selector:
matchLabels:
app: rafay-connector
app: paralus-connector
serviceName: "connector"
replicas: 1
template:
metadata:
labels:
app: rafay-connector
app: paralus-connector
spec:
priorityClassName: rafay-cluster-critical
priorityClassName: paralus-cluster-critical
terminationGracePeriodSeconds: 10
containers:
- name: connector
image: rafaysystems/rafay-connector:latest
image: paralussystems/paralus-connector:latest
imagePullPolicy: Always
volumeMounts:
- name: connector-config
@@ -26,4 +26,4 @@ spec:
volumes:
- name: connector-config
configMap:
name: connector-config
name: connector-config

View File

@@ -3,7 +3,7 @@ package scheme
import (
"sync"
apiv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
apiv2 "github.com/paralus/paralus/proto/types/controller"
// DO NOT UPDATE
// API Extensions v1 is not available in k8s v1.14.x
apixv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"

View File

@@ -3,7 +3,7 @@ package step
import (
"fmt"
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"

View File

@@ -3,12 +3,12 @@ package step
import (
"context"
"github.com/RafayLabs/rcloud-base/pkg/controller/apply"
cr "github.com/RafayLabs/rcloud-base/pkg/controller/runtime"
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
"github.com/RafayLabs/rcloud-base/pkg/controller/util"
hash "github.com/RafayLabs/rcloud-base/pkg/hasher"
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
"github.com/paralus/paralus/pkg/controller/apply"
cr "github.com/paralus/paralus/pkg/controller/runtime"
"github.com/paralus/paralus/pkg/controller/scheme"
"github.com/paralus/paralus/pkg/controller/util"
hash "github.com/paralus/paralus/pkg/hasher"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
corev1 "k8s.io/api/core/v1"
apierrs "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"

View File

@@ -1,7 +1,7 @@
package util
import (
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
"github.com/paralus/paralus/pkg/controller/scheme"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/client"

View File

@@ -4,13 +4,13 @@ import (
"encoding/json"
"fmt"
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
"github.com/paralus/paralus/pkg/controller/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
ctrlutil "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
)
@@ -75,7 +75,7 @@ func newOwnerRef(owner metav1.Object) (*metav1.OwnerReference, error) {
}
// SetOwnerReference sets owner reference for objects controlled
// by rafay cluster controllers
// by paralus cluster controllers
func SetOwnerReference(owner, object metav1.Object) error {
// Create a new ref

View File

@@ -3,11 +3,11 @@ package util
import (
"fmt"
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
apixv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
jp "github.com/evanphx/json-patch"
"github.com/paralus/paralus/pkg/controller/scheme"
"k8s.io/apimachinery/pkg/runtime/schema"
jmp "k8s.io/apimachinery/pkg/util/jsonmergepatch"
mp "k8s.io/apimachinery/pkg/util/mergepatch"

View File

@@ -5,9 +5,9 @@ import (
"io/ioutil"
"os"
"github.com/RafayLabs/rcloud-base/pkg/controller/scheme"
"github.com/paralus/paralus/pkg/controller/scheme"
apiv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
apiv2 "github.com/paralus/paralus/proto/types/controller"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/yaml"

View File

@@ -1,7 +1,7 @@
package util
import (
clusterv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
clusterv2 "github.com/paralus/paralus/proto/types/controller"
)
const (

View File

@@ -1,14 +1,14 @@
apiVersion: cluster.rafay.dev/v2
apiVersion: cluster.paralus.dev/v2
kind: Tasklet
metadata:
annotations:
rafay.dev/ownerRef: '{"apiVersion":"cluster.rafay.dev/v2","kind":"Task","name":"wordpress-demo","uid":"b0e6d87f-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}'
paralus.dev/ownerRef: '{"apiVersion":"cluster.paralus.dev/v2","kind":"Task","name":"wordpress-demo","uid":"b0e6d87f-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}'
creationTimestamp: "2020-02-11T22:56:08Z"
generation: 1
name: wordpress-demo
namespace: wordpress
resourceVersion: "11710944"
selfLink: /apis/cluster.rafay.dev/v2/namespaces/wordpress/tasklets/wordpress-demo
selfLink: /apis/cluster.paralus.dev/v2/namespaces/wordpress/tasklets/wordpress-demo
uid: b0e210f3-4d21-11ea-b8ec-0ec508a9a2df
spec:
init:
@@ -387,7 +387,7 @@ spec:
- name: WORDPRESS_EMAIL
value: user@example.com
- name: WORDPRESS_FIRST_NAME
value: Rafay
value: Paralus
- name: WORDPRESS_LAST_NAME
value: Demo
- name: WORDPRESS_HTACCESS_OVERRIDE_NONE
@@ -504,7 +504,7 @@ spec:
namespace: wordpress
spec:
rules:
- host: wordpress.stage.rafay.dev
- host: wordpress.stage.paralus.dev
http:
paths:
- backend:
@@ -513,7 +513,7 @@ spec:
path: /
tls:
- hosts:
- wordpress.stage.rafay.dev
- wordpress.stage.paralus.dev
secretName: wordpress-stage-tls
status:
conditions:

View File

@@ -1,14 +1,14 @@
apiVersion: cluster.rafay.dev/v2
apiVersion: cluster.paralus.dev/v2
kind: Tasklet
metadata:
annotations:
rafay.dev/ownerRef: '{"apiVersion":"cluster.rafay.dev/v2","kind":"Task","name":"wordpress-demo","uid":"b0e6d87f-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}'
paralus.dev/ownerRef: '{"apiVersion":"cluster.paralus.dev/v2","kind":"Task","name":"wordpress-demo","uid":"b0e6d87f-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}'
creationTimestamp: "2020-02-11T22:56:08Z"
generation: 1
name: wordpress-demo-1
namespace: wordpress
resourceVersion: "11710944"
selfLink: /apis/cluster.rafay.dev/v2/namespaces/wordpress/tasklets/wordpress-demo
selfLink: /apis/cluster.paralus.dev/v2/namespaces/wordpress/tasklets/wordpress-demo
uid: b0e210f3-4d21-11ea-b8ec-0ec508a9a2df
spec:
init:
@@ -387,7 +387,7 @@ spec:
- name: WORDPRESS_EMAIL
value: user@example.com
- name: WORDPRESS_FIRST_NAME
value: Rafay
value: Paralus
- name: WORDPRESS_LAST_NAME
value: Demo
- name: WORDPRESS_HTACCESS_OVERRIDE_NONE
@@ -504,7 +504,7 @@ spec:
namespace: wordpress
spec:
rules:
- host: wordpress.stage.rafay.dev
- host: wordpress.stage.paralus.dev
http:
paths:
- backend:
@@ -513,7 +513,7 @@ spec:
path: /
tls:
- hosts:
- wordpress.stage.rafay.dev
- wordpress.stage.paralus.dev
secretName: wordpress-stage-tls
status:
conditions:

View File

@@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
annotations:
rafay.dev/ownerRef: '{"apiVersion":"cluster.rafay.dev/v2","kind":"Tasklet","name":"wordpress-demo","uid":"b0e210f3-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}'
paralus.dev/ownerRef: '{"apiVersion":"cluster.paralus.dev/v2","kind":"Tasklet","name":"wordpress-demo","uid":"b0e210f3-4d21-11ea-b8ec-0ec508a9a2df","controller":true,"blockOwnerDeletion":true}'
creationTimestamp: "2020-02-11T22:56:08Z"
labels:
app: wordpress-demo

View File

@@ -5,10 +5,10 @@ import (
"fmt"
"strings"
runtimeutil "github.com/RafayLabs/rcloud-base/pkg/controller/runtime"
runtimeutil "github.com/paralus/paralus/pkg/controller/runtime"
"github.com/RafayLabs/rcloud-base/pkg/log"
controllerv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
"github.com/paralus/paralus/pkg/log"
controllerv2 "github.com/paralus/paralus/proto/types/controller"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

View File

@@ -7,7 +7,7 @@ import (
var (
// namespace gvk
namespaceGVK = schema.GroupVersionKind{Version: "v1", Kind: "Namespace"}
placementGVK = schema.GroupVersionKind{Group: "config.rafay.dev", Version: "v2", Kind: "Placement"}
placementGVK = schema.GroupVersionKind{Group: "config.paralus.dev", Version: "v2", Kind: "Placement"}
// namespace post install gvks
limitRangeGVK = schema.GroupVersionKind{Version: "v1", Kind: "LimitRange"}

View File

@@ -3,7 +3,7 @@ package converter
import (
gojson "encoding/json"
apiv2 "github.com/RafayLabs/rcloud-base/proto/types/controller"
apiv2 "github.com/paralus/paralus/proto/types/controller"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)

View File

@@ -3,7 +3,7 @@ package event
import (
"sync"
"github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/paralus/paralus/pkg/log"
)
const (

View File

@@ -7,7 +7,7 @@ import (
"google.golang.org/grpc/metadata"
)
// Rafay Gateway annotations
// Paralus Gateway annotations
const (
GatewayRequest = "x-gateway-request"
GatewayURL = "x-gateway-url"
@@ -21,8 +21,8 @@ const (
RemoteAddr = "x-gateway-remote-addr"
)
// rafayGatewayAnnotator adds rafay gateway specific annotations
var rafayGatewayAnnotator = func(ctx context.Context, r *http.Request) metadata.MD {
// paralusGatewayAnnotator adds paralus gateway specific annotations
var paralusGatewayAnnotator = func(ctx context.Context, r *http.Request) metadata.MD {
return metadata.New(map[string]string{
GatewayRequest: "true",
GatewayURL: r.URL.EscapedPath(),

View File

@@ -19,14 +19,14 @@ type HandlerFromEndpoint func(ctx context.Context, mux *runtime.ServeMux, endpoi
// NewGateway returns new grpc gateway
func NewGateway(ctx context.Context, endpoint string, serveMuxOptions []runtime.ServeMuxOption, handlers ...HandlerFromEndpoint) (http.Handler, error) {
rafayJSON := NewRafayJSON()
rafayYAML := NewRafayYAML()
paralusJSON := NewParalusJSON()
paralusYAML := NewParalusYAML()
httpBody := NewHTTPBodyMarshaler()
serveMuxOptions = append(serveMuxOptions,
runtime.WithMarshalerOption(runtime.MIMEWildcard, httpBody),
runtime.WithMarshalerOption(jsonContentType, rafayJSON),
runtime.WithMarshalerOption(yamlContentType, rafayYAML),
runtime.WithMetadata(rafayGatewayAnnotator),
runtime.WithMarshalerOption(jsonContentType, paralusJSON),
runtime.WithMarshalerOption(yamlContentType, paralusYAML),
runtime.WithMetadata(paralusGatewayAnnotator),
)
mux := runtime.NewServeMux(serveMuxOptions...)

View File

@@ -1,12 +1,12 @@
package gateway
import (
common "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
common "github.com/paralus/paralus/proto/types/commonpb/v3"
)
// httpBodyMarshaler is a Marshaler which supports marshaling of a
// rafay.dev.common.types.v2.HttpBody message as the full response body if it is
// paralus.dev.common.types.v2.HttpBody message as the full response body if it is
// the actual message used as the response. If not, then this will
// simply fallback to the Marshaler specified as its default Marshaler.
type httpBodyMarshaler struct {
@@ -16,7 +16,7 @@ type httpBodyMarshaler struct {
// NewHTTPBodyMarshaler returns new http body marshaler
func NewHTTPBodyMarshaler() runtime.Marshaler {
return &httpBodyMarshaler{
Marshaler: &rafayJSON{},
Marshaler: &paralusJSON{},
}
}

View File

@@ -11,39 +11,39 @@ const (
jsonContentType string = "application/json"
)
// rafayJSON is the rafay object to json marshaller
type rafayJSON struct {
// paralusJSON is the paralus object to json marshaller
type paralusJSON struct {
}
// NewRafayJSON returns new grpc gateway rafay json marshaller
func NewRafayJSON() runtime.Marshaler {
return &rafayJSON{}
// NewParalusJSON returns new grpc gateway paralus json marshaller
func NewParalusJSON() runtime.Marshaler {
return &paralusJSON{}
}
// Marshal marshals "v" into byte sequence.
func (m *rafayJSON) Marshal(v interface{}) ([]byte, error) {
func (m *paralusJSON) Marshal(v interface{}) ([]byte, error) {
return json.Marshal(v)
}
// Unmarshal unmarshals "data" into "v".
// "v" must be a pointer value.
func (m *rafayJSON) Unmarshal(b []byte, v interface{}) error {
func (m *paralusJSON) Unmarshal(b []byte, v interface{}) error {
return json.Unmarshal(b, v)
}
// NewDecoder returns a Decoder which reads byte sequence from "r".
func (m *rafayJSON) NewDecoder(r io.Reader) runtime.Decoder {
func (m *paralusJSON) NewDecoder(r io.Reader) runtime.Decoder {
return json.NewDecoder(r)
}
// NewEncoder returns an Encoder which writes bytes sequence into "w".
func (m *rafayJSON) NewEncoder(w io.Writer) runtime.Encoder {
func (m *paralusJSON) NewEncoder(w io.Writer) runtime.Encoder {
return json.NewEncoder(w)
}
// ContentType returns the Content-Type which this marshaler is responsible for.
func (m *rafayJSON) ContentType(v interface{}) string {
func (m *paralusJSON) ContentType(v interface{}) string {
return jsonContentType
}

View File

@@ -4,13 +4,13 @@ import (
"bytes"
"testing"
"github.com/RafayLabs/rcloud-base/pkg/gateway"
"github.com/RafayLabs/rcloud-base/pkg/gateway/testdata"
"github.com/paralus/paralus/pkg/gateway"
"github.com/paralus/paralus/pkg/gateway/testdata"
"google.golang.org/protobuf/types/known/timestamppb"
)
func TestRafayJSONMarshaller(t *testing.T) {
m := gateway.NewRafayJSON()
func TestParalusJSONMarshaller(t *testing.T) {
m := gateway.NewParalusJSON()
t1 := testdata.TestYAML{
Name: "test",

View File

@@ -9,9 +9,9 @@ import (
"net/http"
"testing"
"github.com/RafayLabs/rcloud-base/pkg/gateway"
"github.com/RafayLabs/rcloud-base/pkg/grpc"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/paralus/paralus/pkg/gateway"
"github.com/paralus/paralus/pkg/grpc"
)
type testServer struct {

View File

@@ -319,17 +319,16 @@ var file_pkg_gateway_testdata_test_proto_rawDesc = []byte{
0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x65, 0x73,
0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6e, 0x61, 0x6d, 0x65,
0x7d, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x7b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x90, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x74,
0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x8a, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x74,
0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x42, 0x09, 0x54, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75,
0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xa2, 0x02, 0x03, 0x54, 0x58,
0x58, 0xaa, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xca, 0x02, 0x08, 0x54,
0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xe2, 0x02, 0x14, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61,
0x74, 0x61, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x75, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x75, 0x73,
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x74, 0x65, 0x73,
0x74, 0x64, 0x61, 0x74, 0x61, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x54, 0x65,
0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xca, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74,
0x61, 0xe2, 0x02, 0x14, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5c, 0x47, 0x50, 0x42,
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64,
0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -7,7 +7,7 @@ import (
)
// IsGatewayRequest returns true if the request is originated from
// Rafay Gateway
// Paralus Gateway
func IsGatewayRequest(ctx context.Context) bool {
if md, ok := metadata.FromIncomingContext(ctx); ok {
if vals := md.Get(GatewayRequest); vals != nil {

View File

@@ -13,17 +13,17 @@ const (
yamlContentType string = "application/yaml"
)
// rafayJSON is the rafay object to YAML marshaller
type rafayYAML struct {
// paralusJSON is the paralus object to YAML marshaller
type paralusYAML struct {
}
// NewRafayYAML returns new grpc gateway yaml marshaller
func NewRafayYAML() runtime.Marshaler {
return &rafayYAML{}
// NewParalusYAML returns new grpc gateway yaml marshaller
func NewParalusYAML() runtime.Marshaler {
return &paralusYAML{}
}
// Marshal marshals "v" into byte sequence.
func (m *rafayYAML) Marshal(v interface{}) ([]byte, error) {
func (m *paralusYAML) Marshal(v interface{}) ([]byte, error) {
b, err := json.Marshal(v)
if err != nil {
return nil, err
@@ -39,7 +39,7 @@ func (m *rafayYAML) Marshal(v interface{}) ([]byte, error) {
// Unmarshal unmarshals "data" into "v".
// "v" must be a pointer value.
func (m *rafayYAML) Unmarshal(yb []byte, v interface{}) error {
func (m *paralusYAML) Unmarshal(yb []byte, v interface{}) error {
jb, err := yaml.YAMLToJSON(yb)
if err != nil {
return err
@@ -49,7 +49,7 @@ func (m *rafayYAML) Unmarshal(yb []byte, v interface{}) error {
}
// NewDecoder returns a Decoder which reads byte sequence from "r".
func (m *rafayYAML) NewDecoder(r io.Reader) runtime.Decoder {
func (m *paralusYAML) NewDecoder(r io.Reader) runtime.Decoder {
return runtime.DecoderFunc(func(v interface{}) error {
yb, err := ioutil.ReadAll(r)
if err != nil {
@@ -60,7 +60,7 @@ func (m *rafayYAML) NewDecoder(r io.Reader) runtime.Decoder {
}
// NewEncoder returns an Encoder which writes bytes sequence into "w".
func (m *rafayYAML) NewEncoder(w io.Writer) runtime.Encoder {
func (m *paralusYAML) NewEncoder(w io.Writer) runtime.Encoder {
return runtime.EncoderFunc(func(v interface{}) error {
yb, err := m.Marshal(v)
if err != nil {
@@ -73,6 +73,6 @@ func (m *rafayYAML) NewEncoder(w io.Writer) runtime.Encoder {
}
// ContentType returns the Content-Type which this marshaler is responsible for.
func (m *rafayYAML) ContentType(v interface{}) string {
func (m *paralusYAML) ContentType(v interface{}) string {
return yamlContentType
}

View File

@@ -4,13 +4,13 @@ import (
"bytes"
"testing"
"github.com/RafayLabs/rcloud-base/pkg/gateway"
"github.com/RafayLabs/rcloud-base/pkg/gateway/testdata"
"github.com/paralus/paralus/pkg/gateway"
"github.com/paralus/paralus/pkg/gateway/testdata"
"google.golang.org/protobuf/types/known/timestamppb"
)
func TestYamlMarshaller(t *testing.T) {
m := gateway.NewRafayYAML()
m := gateway.NewParalusYAML()
t1 := testdata.TestYAML{
Name: "test",

View File

@@ -13,8 +13,8 @@ import (
)
const (
// ObjectHash is the hash of the object processed by Rafay
ObjectHash = "rafay.dev/object-hash"
// ObjectHash is the hash of the object processed by Paralus
ObjectHash = "paralus.dev/object-hash"
)
var json = k8sapijson.CaseSensitiveJsonIterator()

View File

@@ -3,7 +3,7 @@ package leaderelection
import (
"context"
log "github.com/RafayLabs/rcloud-base/pkg/log"
log "github.com/paralus/paralus/pkg/log"
le "k8s.io/client-go/tools/leaderelection"
rl "k8s.io/client-go/tools/leaderelection/resourcelock"
)

View File

@@ -1,8 +1,8 @@
package match
import (
"github.com/RafayLabs/rcloud-base/pkg/query"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/paralus/paralus/pkg/query"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
"k8s.io/apimachinery/pkg/labels"
)

View File

@@ -8,12 +8,12 @@ import (
"sync"
"time"
"github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/RafayLabs/rcloud-base/pkg/match"
"github.com/RafayLabs/rcloud-base/pkg/query"
"github.com/RafayLabs/rcloud-base/pkg/service"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
"github.com/paralus/paralus/pkg/log"
"github.com/paralus/paralus/pkg/match"
"github.com/paralus/paralus/pkg/query"
"github.com/paralus/paralus/pkg/service"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
)
var (

View File

@@ -3,9 +3,9 @@ package patch
import (
"encoding/json"
sp "github.com/RafayLabs/rcloud-base/pkg/controller/strategicpatch"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
"github.com/RafayLabs/rcloud-base/proto/types/scheduler"
sp "github.com/paralus/paralus/pkg/controller/strategicpatch"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
"github.com/paralus/paralus/proto/types/scheduler"
)
type clusterConditions struct {

View File

@@ -27,8 +27,9 @@ type GRPCPool struct {
// NewGRPCPool returns new auth pool
func NewGRPCPool(addr string, maxConnections int, creds credentials.TransportCredentials) *GRPCPool {
// as per https://rafaysystems.atlassian.net/browse/RC-9291 min number of connections for grpc
// across all services is set to 20; any service creating a connection pool size < 20 is now defaulted to 20
// min number of connections for grpc across all services is
// set to 20; any service creating a connection pool size < 20
// is now defaulted to 20
if maxConnections < DefaultMaxPoolConn {
maxConnections = DefaultMaxPoolConn
}

View File

@@ -5,8 +5,8 @@ import (
"fmt"
"time"
"github.com/RafayLabs/rcloud-base/internal/random"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/paralus/paralus/internal/random"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
"github.com/uptrace/bun"
)

View File

@@ -1,7 +1,7 @@
package query
import (
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
"github.com/uptrace/bun"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/selection"

View File

@@ -3,9 +3,9 @@ package reconcile
import (
"context"
"github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/RafayLabs/rcloud-base/pkg/service"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
"github.com/paralus/paralus/pkg/log"
"github.com/paralus/paralus/pkg/service"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
)
var _log = log.GetLogger()

View File

@@ -4,11 +4,11 @@ import (
"context"
"time"
"github.com/RafayLabs/rcloud-base/pkg/event"
"github.com/RafayLabs/rcloud-base/pkg/query"
"github.com/RafayLabs/rcloud-base/pkg/service"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
"github.com/paralus/paralus/pkg/event"
"github.com/paralus/paralus/pkg/query"
"github.com/paralus/paralus/pkg/service"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/util/workqueue"
)

View File

@@ -5,12 +5,12 @@ import (
"fmt"
"time"
clstrutil "github.com/RafayLabs/rcloud-base/internal/cluster"
"github.com/RafayLabs/rcloud-base/internal/cluster/constants"
"github.com/RafayLabs/rcloud-base/pkg/service"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
clstrutil "github.com/paralus/paralus/internal/cluster"
"github.com/paralus/paralus/internal/cluster/constants"
"github.com/paralus/paralus/pkg/service"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
"github.com/RafayLabs/rcloud-base/pkg/query"
"github.com/paralus/paralus/pkg/query"
"github.com/pkg/errors"
)

View File

@@ -3,7 +3,7 @@ package reconcile
import (
"encoding/json"
"github.com/RafayLabs/rcloud-base/pkg/event"
"github.com/paralus/paralus/pkg/event"
)
func resourceToKey(r event.Resource) string {

View File

@@ -7,17 +7,17 @@ import (
"strings"
"time"
"github.com/RafayLabs/rcloud-base/internal/constants"
"github.com/RafayLabs/rcloud-base/pkg/controller/runtime"
"github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/RafayLabs/rcloud-base/pkg/query"
"github.com/RafayLabs/rcloud-base/pkg/sentry/kubeconfig"
"github.com/RafayLabs/rcloud-base/pkg/service"
sentryrpc "github.com/RafayLabs/rcloud-base/proto/rpc/sentry"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/RafayLabs/rcloud-base/proto/types/controller"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/constants"
"github.com/paralus/paralus/pkg/controller/runtime"
"github.com/paralus/paralus/pkg/log"
"github.com/paralus/paralus/pkg/query"
"github.com/paralus/paralus/pkg/sentry/kubeconfig"
"github.com/paralus/paralus/pkg/service"
sentryrpc "github.com/paralus/paralus/proto/rpc/sentry"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
"github.com/paralus/paralus/proto/types/controller"
"github.com/paralus/paralus/proto/types/sentry"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
)
@@ -44,10 +44,10 @@ var namespaceScopePermissions = []string{
}
const (
rafayRelayLabel = "rafay-relay"
paralusRelayLabel = "paralus-relay"
relayUserLabel = "relay-user"
authzRefreshedLabel = "authz-refreshed"
systemUsername = "admin@rafay.co"
systemUsername = "admin@paralus.co"
)
type roleBindExclusionList struct {
@@ -61,7 +61,7 @@ func getCurrentEpoch() string {
func getAuthzLabels(userName string) map[string]string {
return map[string]string{
rafayRelayLabel: "true",
paralusRelayLabel: "true",
relayUserLabel: userName,
authzRefreshedLabel: getCurrentEpoch(),
}
@@ -187,9 +187,9 @@ func getRole(permission string) (r *rbacv1.Role, err error) {
func getRoleName(nsName, permission string) string {
switch permission {
case sentry.KubectlNamespaceWritePermission:
return "rafay-ns-role-write-" + nsName
return "paralus-ns-role-write-" + nsName
case sentry.KubectlNamespaceReadPermission:
return "rafay-ns-role-read-" + nsName
return "paralus-ns-role-read-" + nsName
default:
_log.Infow("getRoleName invalid namespace", "permission", permission)
}
@@ -211,7 +211,7 @@ func getClusterRoleBinding(sa *corev1.ServiceAccount, clusterRole string) *rbacv
crb.Kind = "ClusterRoleBinding"
crb.Name = getClusterRoleBindingName(sa.Name, clusterRole)
// crb.Labels = map[string]string{
// "rafay-relay": "true",
// "paralus-relay": "true",
// "relay-user": sa.Name,
// }
subject := rbacv1.Subject{}
@@ -246,7 +246,7 @@ func getRoleBinding(sa *corev1.ServiceAccount, roleName, namespace string) *rbac
rb.Name = getRoleBindingName(sa.Name, roleName)
rb.Namespace = namespace
// rb.Labels = map[string]string{
// "rafay-relay": "true",
// "paralus-relay": "true",
// "relay-user": sa.Name,
// }
subject := rbacv1.Subject{}
@@ -459,7 +459,7 @@ func GetAuthorization(ctx context.Context, req *sentryrpc.GetUserAuthorizationRe
sa.APIVersion = "v1"
sa.Kind = "ServiceAccount"
sa.Name = cnAttr.Username
sa.Namespace = "rafay-system"
sa.Namespace = "paralus-system"
crMap := make(map[string]*rbacv1.ClusterRole)
crbMap := make(map[string]*rbacv1.ClusterRoleBinding)
@@ -693,7 +693,7 @@ func getSystemUserAuthz(cnAttrs kubeconfig.CNAttributes) (resp *sentryrpc.GetUse
sa.APIVersion = "v1"
sa.Kind = "ServiceAccount"
sa.Name = cnAttrs.Username
sa.Namespace = "rafay-system"
sa.Namespace = "paralus-system"
sa.Labels = authzLabels
cr, err := getClusterRole(sentry.KubectlFullAccessPermission)
@@ -745,7 +745,7 @@ func isNamespaceScopePermission(permission string) bool {
}
func verifyClusterKubectlSettings(ctx context.Context, bs service.BootstrapService, kcs service.KubectlClusterSettingsService, cnAttr kubeconfig.CNAttributes, clusterID string, orgID string) error {
if cnAttr.SessionType == kubeconfig.RafaySystem {
if cnAttr.SessionType == kubeconfig.ParalusSystem {
// internal system sessions are always allowed
return nil
}
@@ -787,7 +787,7 @@ func verifyClusterKubectlSettings(ctx context.Context, bs service.BootstrapServi
}
func verifyKubectlSettings(cnAttr kubeconfig.CNAttributes, ks *sentry.KubeconfigSetting, level string) error {
if cnAttr.SessionType == kubeconfig.RafaySystem {
if cnAttr.SessionType == kubeconfig.ParalusSystem {
// internal system sessions are always allowed
return nil
}

View File

@@ -3,7 +3,7 @@ kind: ClusterRole
metadata:
name: cluster-scope-read-cluster-role
labels:
rafay-relay: "true"
paralus-relay: "true"
rules:
- apiGroups: ["*"]
resources: ["*"]

View File

@@ -3,7 +3,7 @@ kind: ClusterRole
metadata:
name: cluster-scope-write-cluster-role
labels:
rafay-relay: "true"
paralus-relay: "true"
rules:
- apiGroups: ["*"]
resources: ["*"]

View File

@@ -3,7 +3,7 @@ kind: ClusterRole
metadata:
name: full-access-cluster-role
labels:
rafay-relay: "true"
paralus-relay: "true"
rules:
- apiGroups: ["*"]
resources: ["*"]

View File

@@ -3,7 +3,7 @@ kind: ClusterRole
metadata:
name: read-access-cluster-role
labels:
rafay-relay: "true"
paralus-relay: "true"
rules:
- apiGroups: ["*"]
resources: ["*"]

View File

@@ -3,7 +3,7 @@ kind: ClusterRole
metadata:
name: write-access-cluster-role
labels:
rafay-relay: "true"
paralus-relay: "true"
rules:
- apiGroups: ["*"]
resources: ["*"]

View File

@@ -3,4 +3,4 @@ kind: Namespace
metadata:
name: namespace-name
labels:
rafay-relay: "true"
paralus-relay: "true"

View File

@@ -3,7 +3,7 @@ kind: Role
metadata:
name: read-access-role
labels:
rafay-relay: "true"
paralus-relay: "true"
rules:
- apiGroups: ["*"]
resources: ["*"]

View File

@@ -3,8 +3,8 @@ kind: Role
metadata:
name: write-access-role
labels:
rafay-relay: "true"
paralus-relay: "true"
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
verbs: ["*"]

View File

@@ -7,8 +7,8 @@ import (
func TestGenerateCA(t *testing.T) {
cert, key, err := GenerateCA(pkix.Name{
CommonName: "Rafay Sentry Bootstrap CA",
Organization: []string{"Rafay Systems"},
CommonName: "Paralus Sentry Bootstrap CA",
Organization: []string{"Paralus"},
Country: []string{"USA"},
Province: []string{"California"},
Locality: []string{"Sunnyvale"},

View File

@@ -12,29 +12,29 @@ func TestVerifyCertHostname(t *testing.T) {
CommonName: "---",
},
DNSNames: []string{
"peering.sentry.rafay.local",
"peering.sentry.rafay.local",
"rafay-sentry",
"rafay-sentry.rafay-system",
"rafay-sentry.rafay-system.cluster.local",
"peering.sentry.paralus.local",
"peering.sentry.paralus.local",
"paralus-sentry",
"paralus-sentry.paralus-system",
"paralus-sentry.paralus-system.cluster.local",
},
}
err := cert.VerifyHostname("peering.sentry.rafay.local")
err := cert.VerifyHostname("peering.sentry.paralus.local")
if err != nil {
t.Error(err)
return
}
err = cert.VerifyHostname("rafay-sentry.rafay-system")
err = cert.VerifyHostname("paralus-sentry.paralus-system")
if err != nil {
t.Error(err)
return
}
err = cert.VerifyHostname("rafay-sentry")
err = cert.VerifyHostname("paralus-sentry")
if err != nil {
t.Error(err)
return
}
err = cert.VerifyHostname("rafay-sentry.rafay-system.cluster.local")
err = cert.VerifyHostname("paralus-sentry.paralus-system.cluster.local")
if err != nil {
t.Error(err)
return

View File

@@ -7,8 +7,8 @@ import (
func TestSigner(t *testing.T) {
certBytes, keyBytes, err := GenerateCA(pkix.Name{
CommonName: "Rafay Sentry Bootstrap CA",
Organization: []string{"Rafay Systems"},
CommonName: "Paralus Sentry Bootstrap CA",
Organization: []string{"Paralus"},
Country: []string{"USA"},
Province: []string{"California"},
Locality: []string{"Sunnyvale"},

View File

@@ -24,8 +24,8 @@ const (
TerminalShell = "ts"
// WebShell is the session originated for browser based kubectl
WebShell = "ws"
// RafaySystem is the session originated for rafay system controller purpose e.g. native helm
RafaySystem = "rs"
// ParalusSystem is the session originated for paralus system controller purpose e.g. native helm
ParalusSystem = "rs"
// RelayNetwork is the session originated for custom relay network (non-core-relay)
RelayNetworkCN = "rn"
)
@@ -82,8 +82,8 @@ func GetSessionTypeString(t string) string {
return "kubectl cli"
case WebShell:
return "browser shell"
case RafaySystem:
return "rafay system"
case ParalusSystem:
return "paralus system"
default:
return "unknown session type " + t
}

View File

@@ -9,26 +9,26 @@ import (
"strings"
"time"
"github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/RafayLabs/rcloud-base/pkg/query"
sentryrpc "github.com/RafayLabs/rcloud-base/proto/rpc/sentry"
rpcv3 "github.com/RafayLabs/rcloud-base/proto/rpc/user"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
sentry "github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
"github.com/paralus/paralus/pkg/log"
"github.com/paralus/paralus/pkg/query"
sentryrpc "github.com/paralus/paralus/proto/rpc/sentry"
rpcv3 "github.com/paralus/paralus/proto/rpc/user"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
sentry "github.com/paralus/paralus/proto/types/sentry"
clientcmdapiv1 "k8s.io/client-go/tools/clientcmd/api/v1"
"sigs.k8s.io/yaml"
"github.com/RafayLabs/rcloud-base/internal/constants"
"github.com/RafayLabs/rcloud-base/pkg/sentry/cryptoutil"
"github.com/RafayLabs/rcloud-base/pkg/sentry/util"
"github.com/RafayLabs/rcloud-base/pkg/service"
"github.com/paralus/paralus/internal/constants"
"github.com/paralus/paralus/pkg/sentry/cryptoutil"
"github.com/paralus/paralus/pkg/sentry/util"
"github.com/paralus/paralus/pkg/service"
)
const (
kubeconfigPermission = sentry.KubeconfigReadPermission
systemUsername = "admin@rafay.co"
systemUsername = "admin@paralus.co"
)
var _log = log.GetLogger()
@@ -114,11 +114,11 @@ func getProjectsForAccount(ctx context.Context, accountID, orgID, partnerID stri
func GetConfigForUser(ctx context.Context, bs service.BootstrapService, aps service.AccountPermissionService, gps service.GroupPermissionService, req *sentryrpc.GetForUserRequest, pf cryptoutil.PasswordFunc, kss service.KubeconfigSettingService, ksvc service.ApiKeyService, os service.OrganizationService, ps service.PartnerService) ([]byte, error) {
opts := req.Opts
if opts.Selector != "" {
opts.Selector = fmt.Sprintf("%s,!rafay.dev/cdRelayAgent", opts.Selector)
opts.Selector = fmt.Sprintf("%s,!paralus.dev/cdRelayAgent", opts.Selector)
} else {
opts.Selector = "!rafay.dev/cdRelayAgent"
opts.Selector = "!paralus.dev/cdRelayAgent"
}
batl, err := bs.SelectBootstrapAgentTemplates(ctx, query.WithSelector("rafay.dev/defaultUser=true"), query.WithGlobalScope())
batl, err := bs.SelectBootstrapAgentTemplates(ctx, query.WithSelector("paralus.dev/defaultUser=true"), query.WithGlobalScope())
if err != nil {
_log.Errorw("error getting default user bootstrap agent templates", "error", err.Error())
return nil, err
@@ -232,7 +232,7 @@ func GetConfigForUser(ctx context.Context, bs service.BootstrapService, aps serv
if !isSSOAcc {
projects, isOrgScope, err = getProjectsForAccount(ctx, opts.Account, opts.Organization, opts.Partner, aps)
if err != nil {
_log.Errorw("error getting project for rafay ", "account", opts.Account, "error", err.Error())
_log.Errorw("error getting project for paralus ", "account", opts.Account, "error", err.Error())
return nil, err
}
} else {
@@ -276,7 +276,7 @@ func GetConfigForUser(ctx context.Context, bs service.BootstrapService, aps serv
return nil, err
}
for _, ba := range bal.Items {
if ba.Spec.TemplateRef != "rafay-core-relay-agent" && ba.Spec.TemplateRef != "rafay-core-cd-relay-agent" {
if ba.Spec.TemplateRef != "paralus-core-relay-agent" && ba.Spec.TemplateRef != "paralus-core-cd-relay-agent" {
if vi, ok := set[ba.Metadata.Name]; ok {
v := vi.(sentry.BootstrapAgent)
if v.Spec.TemplateRef == ba.Spec.TemplateRef {
@@ -418,7 +418,7 @@ func getConfig(username, namespace, certCN, serverHost string, bootstrapInfra *s
var contexts []clientcmdapiv1.NamedContext
for _, ba := range bootstrapAgents {
if ba.Spec.TemplateRef != "rafay-core-relay-agent" && ba.Spec.TemplateRef != "rafay-core-cd-relay-agent" {
if ba.Spec.TemplateRef != "paralus-core-relay-agent" && ba.Spec.TemplateRef != "paralus-core-cd-relay-agent" {
// skip non default agents from system kubeconfiog
continue
}
@@ -462,12 +462,12 @@ func getConfig(username, namespace, certCN, serverHost string, bootstrapInfra *s
func GetConfigForCluster(ctx context.Context, bs service.BootstrapService, req *sentryrpc.GetForClusterRequest, pf cryptoutil.PasswordFunc, kss service.KubeconfigSettingService, sessionType string) ([]byte, error) {
opts := req.Opts
if opts.Selector != "" {
opts.Selector = fmt.Sprintf("%s,!rafay.dev/cdRelayAgent", opts.Selector)
opts.Selector = fmt.Sprintf("%s,!paralus.dev/cdRelayAgent", opts.Selector)
} else {
opts.Selector = fmt.Sprintf("!rafay.dev/cdRelayAgent")
opts.Selector = fmt.Sprintf("!paralus.dev/cdRelayAgent")
}
_log.Infow("get config for cluster ", "opts", opts, "namespace", req.Namespace, "systemUser", req.SystemUser)
batl, err := bs.SelectBootstrapAgentTemplates(ctx, query.WithSelector("rafay.dev/defaultUser=true"), query.WithGlobalScope())
batl, err := bs.SelectBootstrapAgentTemplates(ctx, query.WithSelector("paralus.dev/defaultUser=true"), query.WithGlobalScope())
if err != nil {
return nil, err
}
@@ -506,8 +506,8 @@ func GetConfigForCluster(ctx context.Context, bs service.BootstrapService, req *
if req.SystemUser {
username = systemUsername
}
if sessionType == RafaySystem {
username = RafaySystem + "-" + username
if sessionType == ParalusSystem {
username = ParalusSystem + "-" + username
}
enforceSession := false
@@ -633,7 +633,7 @@ func getUserConfig(ctx context.Context, opts commonv3.QueryOptions, username, na
// prune agent list
// if a cluster is added to custom relay then exlude it from default
for _, ba := range bootstrapAgents {
if ba.Spec.TemplateRef != "rafay-core-relay-agent" && ba.Spec.TemplateRef != "rafay-core-cd-relay-agent" {
if ba.Spec.TemplateRef != "paralus-core-relay-agent" && ba.Spec.TemplateRef != "paralus-core-cd-relay-agent" {
baMaps[ba.Metadata.Name] = *ba
} else {
if _, ok := baMaps[ba.Metadata.Name]; !ok {
@@ -643,7 +643,7 @@ func getUserConfig(ctx context.Context, opts commonv3.QueryOptions, username, na
}
for _, ba := range baMaps {
if ba.Spec.TemplateRef != "rafay-core-relay-agent" && ba.Spec.TemplateRef != "rafay-core-cd-relay-agent" {
if ba.Spec.TemplateRef != "paralus-core-relay-agent" && ba.Spec.TemplateRef != "paralus-core-cd-relay-agent" {
// handle custome relay network
} else {

View File

@@ -10,14 +10,14 @@ import (
"regexp"
"time"
"github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/RafayLabs/rcloud-base/pkg/query"
"github.com/RafayLabs/rcloud-base/pkg/sentry/cryptoutil"
"github.com/RafayLabs/rcloud-base/pkg/sentry/register"
"github.com/RafayLabs/rcloud-base/pkg/service"
sentryrpc "github.com/RafayLabs/rcloud-base/proto/rpc/sentry"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/dgraph-io/ristretto"
"github.com/paralus/paralus/pkg/log"
"github.com/paralus/paralus/pkg/query"
"github.com/paralus/paralus/pkg/sentry/cryptoutil"
"github.com/paralus/paralus/pkg/sentry/register"
"github.com/paralus/paralus/pkg/service"
sentryrpc "github.com/paralus/paralus/proto/rpc/sentry"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/rs/xid"
)
@@ -340,15 +340,15 @@ func GetPeeringServerCreds(ctx context.Context, bs service.BootstrapService, rpc
defer cancel()
var template *sentry.BootstrapAgentTemplate
template, err = bs.GetBootstrapAgentTemplate(nctx, "rafay-sentry-peering-server")
template, err = bs.GetBootstrapAgentTemplate(nctx, "paralus-sentry-peering-server")
if err != nil {
return
}
config := &register.Config{
TemplateName: "rafay-sentry-peering-server",
TemplateName: "paralus-sentry-peering-server",
Addr: fmt.Sprintf("localhost:%d", rpcPort),
Name: "rafay-sentry-peering-server",
Name: "paralus-sentry-peering-server",
Scheme: "grpc",
Mode: "server",
}
@@ -370,8 +370,8 @@ func GetPeeringServerCreds(ctx context.Context, bs service.BootstrapService, rpc
csr, err = cryptoutil.CreateCSR(pkix.Name{
CommonName: host,
Country: []string{"USA"},
Organization: []string{"Rafay Systems Inc"},
OrganizationalUnit: []string{"Rafay Sentry Peering Server"},
Organization: []string{"Paralus"},
OrganizationalUnit: []string{"Paralus Sentry Peering Server"},
Province: []string{"California"},
Locality: []string{"Sunnyvale"},
}, privKey)
@@ -383,7 +383,7 @@ func GetPeeringServerCreds(ctx context.Context, bs service.BootstrapService, rpc
var agent *sentry.BootstrapAgent
agent, err = bs.GetBootstrapAgent(nctx, template.Metadata.Name, query.WithName("rafay-sentry-peering-server"), query.WithGlobalScope())
agent, err = bs.GetBootstrapAgent(nctx, template.Metadata.Name, query.WithName("paralus-sentry-peering-server"), query.WithGlobalScope())
if err != nil {
if err != sql.ErrNoRows {

View File

@@ -10,18 +10,18 @@ import (
"os"
"strings"
"github.com/RafayLabs/rcloud-base/pkg/sentry/cryptoutil"
sentryrpc "github.com/RafayLabs/rcloud-base/proto/rpc/sentry"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/paralus/paralus/pkg/sentry/cryptoutil"
sentryrpc "github.com/paralus/paralus/proto/rpc/sentry"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/pkg/errors"
"github.com/rs/xid"
bootstrapclientv2 "github.com/RafayLabs/rcloud-base/api/def/clients/sentry/client"
bootstrapapiv2 "github.com/RafayLabs/rcloud-base/api/def/clients/sentry/client/bootstrap"
bootstrapclientv2 "github.com/paralus/paralus/api/def/clients/sentry/client"
bootstrapapiv2 "github.com/paralus/paralus/api/def/clients/sentry/client/bootstrap"
"github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/RafayLabs/rcloud-base/pkg/sentry/util"
"github.com/paralus/paralus/pkg/log"
"github.com/paralus/paralus/pkg/sentry/util"
)
var (
@@ -187,7 +187,7 @@ func registerGRPC(ctx context.Context, config *Config) error {
csr, err := cryptoutil.CreateCSR(pkix.Name{
CommonName: template.Metadata.Description,
Country: []string{"USA"},
Organization: []string{"Rafay Systems Inc"},
Organization: []string{"Paralus"},
OrganizationalUnit: []string{template.Metadata.Description},
Province: []string{"California"},
Locality: []string{"Sunnyvale"},

View File

@@ -4,10 +4,10 @@ import (
"context"
"encoding/json"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/uptrace/bun"
"google.golang.org/protobuf/types/known/timestamppb"
)
@@ -104,7 +104,7 @@ func (a *accountPermissionService) GetAccountGroups(ctx context.Context, account
}
/*TODO: to revisit if we end up using sso with crewjam
func (a *accountPermissionService) GetSSOAccount(ctx context.Context, accountID, orgID ctypesv2.RafayID) (*typesv2.SSOAccountData, error) {
func (a *accountPermissionService) GetSSOAccount(ctx context.Context, accountID, orgID ctypesv2.ParalusID) (*typesv2.SSOAccountData, error) {
var sso ssoAccountData
err := a.db.WithContext(ctx).Model(&sso).

View File

@@ -5,11 +5,11 @@ import (
"database/sql"
"time"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/pkg/crypto"
rpcv3 "github.com/RafayLabs/rcloud-base/proto/rpc/user"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/pkg/crypto"
rpcv3 "github.com/paralus/paralus/proto/rpc/user"
"github.com/uptrace/bun"
"go.uber.org/zap"
"google.golang.org/protobuf/types/known/timestamppb"

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"strings"
v1 "github.com/RafayLabs/rcloud-base/proto/rpc/audit"
v1 "github.com/paralus/paralus/proto/rpc/audit"
"google.golang.org/protobuf/types/known/structpb"
)

View File

@@ -5,12 +5,12 @@ import (
"fmt"
"strings"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/pkg/audit"
"github.com/RafayLabs/rcloud-base/pkg/utils"
systemv3 "github.com/RafayLabs/rcloud-base/proto/types/systempb/v3"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/pkg/audit"
"github.com/paralus/paralus/pkg/utils"
systemv3 "github.com/paralus/paralus/proto/types/systempb/v3"
"github.com/uptrace/bun"
"go.uber.org/zap"
)
@@ -55,7 +55,7 @@ func CreateUserAuditEvent(ctx context.Context, al *zap.Logger, db bun.IDB, actio
"roles_name": r, // TODO: add info like namespace and project
},
}
// user.role.created is user.project.created in rcloud
// user.role.created is user.project.created in paralus
if err := audit.CreateV1Event(al, sd, detail, "user.role.created", ""); err != nil {
_log.Warn("unable to create audit event", err)
}
@@ -91,7 +91,7 @@ func CreateUserAuditEvent(ctx context.Context, al *zap.Logger, db bun.IDB, actio
"group_name": g,
},
}
// user.role.created is user.project.created in rcloud
// user.role.created is user.project.created in paralus
if err := audit.CreateV1Event(al, sd, detail, "user.group.created", ""); err != nil {
_log.Warn("unable to create audit event", err)
}
@@ -182,7 +182,7 @@ func CreateGroupAuditEvent(ctx context.Context, al *zap.Logger, db bun.IDB, acti
"roles_name": r, // TODO: add info like namespace and project
},
}
// group.role.created is group.project.created in rcloud
// group.role.created is group.project.created in paralus
if err := audit.CreateV1Event(al, sd, detail, "group.role.created", ""); err != nil {
_log.Warn("unable to create audit event", err)
}
@@ -346,7 +346,7 @@ func CreateIdpAuditEvent(ctx context.Context, al *zap.Logger, action string, nam
"idp_name": name,
},
}
// idp.create.success is idp.config.created in rcloud
// idp.create.success is idp.config.created in paralus
if err := audit.CreateV1Event(al, sd, detail, fmt.Sprintf("idp.%s.success", action), ""); err != nil {
_log.Warn("unable to create audit event", err)
}

View File

@@ -4,10 +4,10 @@ import (
"context"
"fmt"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
authzpbv1 "github.com/RafayLabs/rcloud-base/proto/types/authz"
"github.com/casbin/casbin/v2"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
authzpbv1 "github.com/paralus/paralus/proto/types/authz"
"github.com/uptrace/bun"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

View File

@@ -7,14 +7,14 @@ import (
"fmt"
"time"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/pkg/converter"
"github.com/RafayLabs/rcloud-base/pkg/query"
"github.com/RafayLabs/rcloud-base/pkg/sentry/cryptoutil"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/pkg/converter"
"github.com/paralus/paralus/pkg/query"
"github.com/paralus/paralus/pkg/sentry/cryptoutil"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/uptrace/bun"
"google.golang.org/protobuf/types/known/timestamppb"
)

View File

@@ -11,22 +11,22 @@ import (
"sync"
"time"
clstrutil "github.com/RafayLabs/rcloud-base/internal/cluster"
"github.com/RafayLabs/rcloud-base/internal/cluster/constants"
cdao "github.com/RafayLabs/rcloud-base/internal/cluster/dao"
"github.com/RafayLabs/rcloud-base/internal/cluster/util"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/pkg/common"
"github.com/RafayLabs/rcloud-base/pkg/event"
"github.com/RafayLabs/rcloud-base/pkg/log"
"github.com/RafayLabs/rcloud-base/pkg/patch"
"github.com/RafayLabs/rcloud-base/pkg/query"
sentryutil "github.com/RafayLabs/rcloud-base/pkg/sentry/util"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
clstrutil "github.com/paralus/paralus/internal/cluster"
"github.com/paralus/paralus/internal/cluster/constants"
cdao "github.com/paralus/paralus/internal/cluster/dao"
"github.com/paralus/paralus/internal/cluster/util"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/pkg/common"
"github.com/paralus/paralus/pkg/event"
"github.com/paralus/paralus/pkg/log"
"github.com/paralus/paralus/pkg/patch"
"github.com/paralus/paralus/pkg/query"
sentryutil "github.com/paralus/paralus/pkg/sentry/util"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/pkg/errors"
"github.com/rs/xid"
"github.com/spf13/viper"
@@ -214,7 +214,7 @@ func (s *clusterService) Create(ctx context.Context, cluster *infrav3.Cluster) (
Conditions: clstrutil.DefaultClusterConditions,
},
}
clstrutil.SetClusterCondition(cluster, clstrutil.NewClusterBootstrapAgent(commonv3.RafayConditionStatus_Pending, "created"))
clstrutil.SetClusterCondition(cluster, clstrutil.NewClusterBootstrapAgent(commonv3.ParalusConditionStatus_Pending, "created"))
cnds, _ := json.Marshal(clstrutil.DefaultClusterConditions)
edb.Conditions = json.RawMessage(cnds)
@@ -864,7 +864,7 @@ func (s *clusterService) deleteBootstrapAgentForCluster(ctx context.Context, clu
resp, err := s.bs.SelectBootstrapAgentTemplates(ctx, query.WithOptions(&commonv3.QueryOptions{
GlobalScope: true,
Selector: "rafay.dev/defaultRelay=true",
Selector: "paralus.dev/defaultRelay=true",
}))
if err != nil {
return err
@@ -905,7 +905,7 @@ func (s *clusterService) CreateBootstrapAgentForCluster(ctx context.Context, clu
resp, err := s.bs.SelectBootstrapAgentTemplates(ctx, query.WithOptions(&commonv3.QueryOptions{
GlobalScope: true,
Selector: "rafay.dev/defaultRelay=true",
Selector: "paralus.dev/defaultRelay=true",
}))
if err != nil {
err = errors.Wrap(err, "unable to get bootstrap agent template")
@@ -935,7 +935,7 @@ func (s *clusterService) CreateBootstrapAgentForCluster(ctx context.Context, clu
DisplayName: cluster.Metadata.Name,
Description: cluster.Metadata.Name,
Labels: map[string]string{
"rafay.dev/clusterName": cluster.Metadata.Name,
"paralus.dev/clusterName": cluster.Metadata.Name,
},
Partner: cluster.Metadata.Partner,
Organization: cluster.Metadata.Organization,
@@ -993,7 +993,7 @@ func (s *clusterService) GetRelaysConfigForCluster(ctx context.Context, cluster
resp, err := s.bs.SelectBootstrapAgentTemplates(ctx, query.WithOptions(&commonv3.QueryOptions{
GlobalScope: true,
Selector: "rafay.dev/defaultRelay=true",
Selector: "paralus.dev/defaultRelay=true",
}))
if err != nil {
err = errors.Wrap(err, "unable to get bootstrap agent template")
@@ -1041,7 +1041,7 @@ func (s *clusterService) UpdateProjectsForBootstrapAgentForCluster(ctx context.C
resp, err := s.bs.SelectBootstrapAgentTemplates(ctx, query.WithOptions(&commonv3.QueryOptions{
GlobalScope: true,
Selector: "rafay.dev/defaultRelay=true",
Selector: "paralus.dev/defaultRelay=true",
}))
if err != nil {
return err
@@ -1058,7 +1058,7 @@ func (s *clusterService) UpdateProjectsForBootstrapAgentForCluster(ctx context.C
Organization: cluster.Metadata.Organization,
Project: cluster.Metadata.Project,
Labels: map[string]string{
"rafay.dev/clusterName": cluster.Metadata.Name,
"paralus.dev/clusterName": cluster.Metadata.Name,
},
},
Spec: &sentry.BootstrapAgentSpec{

View File

@@ -6,12 +6,12 @@ import (
"testing"
"github.com/DATA-DOG/go-sqlmock"
"github.com/RafayLabs/rcloud-base/pkg/common"
"github.com/RafayLabs/rcloud-base/pkg/query"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
v3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
"github.com/google/uuid"
"github.com/paralus/paralus/pkg/common"
"github.com/paralus/paralus/pkg/query"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
v3 "github.com/paralus/paralus/proto/types/commonpb/v3"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
)
func performClusterBasicChecks(t *testing.T, cluster *infrav3.Cluster, puuid string) {
@@ -27,7 +27,7 @@ func TestCreateCluster(t *testing.T) {
downloadData := &common.DownloadData{
ControlAddr: "localhost:5002",
APIAddr: "localhost:8000",
RelayAgentImage: "rafaysystems/relay:latest",
RelayAgentImage: "paralus/relay:latest",
}
ps := NewClusterService(db, downloadData, NewBootstrapService(db), getLogger())
@@ -71,7 +71,7 @@ func TestUpdateCluster(t *testing.T) {
downloadData := &common.DownloadData{
ControlAddr: "localhost:5002",
APIAddr: "localhost:8000",
RelayAgentImage: "rafaysystems/relay:latest",
RelayAgentImage: "paralus/relay:latest",
}
ps := NewClusterService(db, downloadData, NewBootstrapService(db), getLogger())
@@ -105,7 +105,7 @@ func TestSelectCluster(t *testing.T) {
downloadData := &common.DownloadData{
ControlAddr: "localhost:5002",
APIAddr: "localhost:8000",
RelayAgentImage: "rafaysystems/relay:latest",
RelayAgentImage: "paralus/relay:latest",
}
ps := NewClusterService(db, downloadData, NewBootstrapService(db), getLogger())
@@ -139,7 +139,7 @@ func TestGetCluster(t *testing.T) {
downloadData := &common.DownloadData{
ControlAddr: "localhost:5002",
APIAddr: "localhost:8000",
RelayAgentImage: "rafaysystems/relay:latest",
RelayAgentImage: "paralus/relay:latest",
}
ps := NewClusterService(db, downloadData, NewBootstrapService(db), getLogger())
@@ -172,7 +172,7 @@ func TestListCluster(t *testing.T) {
downloadData := &common.DownloadData{
ControlAddr: "localhost:5002",
APIAddr: "localhost:8000",
RelayAgentImage: "rafaysystems/relay:latest",
RelayAgentImage: "paralus/relay:latest",
}
ps := NewClusterService(db, downloadData, NewBootstrapService(db), getLogger())

View File

@@ -7,15 +7,15 @@ import (
"strings"
"time"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/pkg/query"
"github.com/RafayLabs/rcloud-base/pkg/utils"
authzv1 "github.com/RafayLabs/rcloud-base/proto/types/authz"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
v3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
userv3 "github.com/RafayLabs/rcloud-base/proto/types/userpb/v3"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/pkg/query"
"github.com/paralus/paralus/pkg/utils"
authzv1 "github.com/paralus/paralus/proto/types/authz"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
v3 "github.com/paralus/paralus/proto/types/commonpb/v3"
userv3 "github.com/paralus/paralus/proto/types/userpb/v3"
bun "github.com/uptrace/bun"
"go.uber.org/zap"
"google.golang.org/protobuf/types/known/timestamppb"

View File

@@ -4,10 +4,10 @@ import (
"context"
"encoding/json"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/uptrace/bun"
)

View File

@@ -6,11 +6,11 @@ import (
"testing"
"github.com/DATA-DOG/go-sqlmock"
"github.com/RafayLabs/rcloud-base/pkg/query"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
v3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
userv3 "github.com/RafayLabs/rcloud-base/proto/types/userpb/v3"
"github.com/google/uuid"
"github.com/paralus/paralus/pkg/query"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
v3 "github.com/paralus/paralus/proto/types/commonpb/v3"
userv3 "github.com/paralus/paralus/proto/types/userpb/v3"
)
func performGroupBasicChecks(t *testing.T, group *userv3.Group, guuid string) {

View File

@@ -14,11 +14,11 @@ import (
"net/url"
"time"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
systemv3 "github.com/RafayLabs/rcloud-base/proto/types/systempb/v3"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
systemv3 "github.com/paralus/paralus/proto/types/systempb/v3"
"github.com/uptrace/bun"
"go.uber.org/zap"
"google.golang.org/grpc/codes"
@@ -73,7 +73,7 @@ func generateSpCert(host string) (string, string, error) {
template := &x509.Certificate{
SerialNumber: big.NewInt(1000),
Subject: pkix.Name{
Organization: []string{"Rafay"},
Organization: []string{"Paralus"},
Country: []string{"US"},
},
NotBefore: time.Now(),

View File

@@ -6,11 +6,11 @@ import (
"fmt"
"time"
"github.com/RafayLabs/rcloud-base/internal/constants"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/constants"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/uptrace/bun"
"go.uber.org/zap"
"google.golang.org/protobuf/types/known/timestamppb"

View File

@@ -5,11 +5,11 @@ import (
"database/sql"
"time"
"github.com/RafayLabs/rcloud-base/internal/constants"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/constants"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/uptrace/bun"
"google.golang.org/protobuf/types/known/timestamppb"
)

View File

@@ -5,11 +5,11 @@ import (
"database/sql"
"time"
"github.com/RafayLabs/rcloud-base/internal/constants"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
"github.com/RafayLabs/rcloud-base/proto/types/sentry"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/constants"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
"github.com/paralus/paralus/proto/types/sentry"
"github.com/uptrace/bun"
"google.golang.org/protobuf/types/known/timestamppb"
)

View File

@@ -4,11 +4,11 @@ import (
"context"
"time"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/internal/models"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/internal/models"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
bun "github.com/uptrace/bun"
"google.golang.org/protobuf/types/known/timestamppb"
)

View File

@@ -6,9 +6,9 @@ import (
"testing"
"github.com/DATA-DOG/go-sqlmock"
commonv3 "github.com/RafayLabs/rcloud-base/proto/types/commonpb/v3"
infrav3 "github.com/RafayLabs/rcloud-base/proto/types/infrapb/v3"
"github.com/google/uuid"
commonv3 "github.com/paralus/paralus/proto/types/commonpb/v3"
infrav3 "github.com/paralus/paralus/proto/types/infrapb/v3"
)
func performBasicChecks(t *testing.T, metro *infrav3.Location, puuid string) {

View File

@@ -4,7 +4,7 @@ import (
"context"
"strings"
types "github.com/RafayLabs/rcloud-base/proto/types/authz"
types "github.com/paralus/paralus/proto/types/authz"
)
type ApUpdate struct {

View File

@@ -3,9 +3,9 @@ package service
import (
"context"
"github.com/RafayLabs/rcloud-base/internal/dao"
"github.com/RafayLabs/rcloud-base/pkg/utils"
"github.com/google/uuid"
"github.com/paralus/paralus/internal/dao"
"github.com/paralus/paralus/pkg/utils"
"github.com/uptrace/bun"
)

Some files were not shown because too many files have changed in this diff Show More