Remove Ctrl+M from repo 96/4696/2
authorLe Yao <le.yao@intel.com>
Thu, 17 Feb 2022 02:20:59 +0000 (21:20 -0500)
committerLe Yao <le.yao@intel.com>
Thu, 17 Feb 2022 02:27:32 +0000 (21:27 -0500)
Ctrl+M indents the paragraph under Windows

Signed-off-by: Le Yao <le.yao@intel.com>
Change-Id: Ibf1a1cebf94078897363af83442c542fec98e4c1

44 files changed:
central-controller/README.md
central-controller/build/Dockerfile
central-controller/build/README.md
central-controller/deployments/README.md
central-controller/deployments/kubernetes/monitor-deploy.sh
central-controller/deployments/kubernetes/monitor-undeploy.sh
central-controller/deployments/kubernetes/monitor/cluster_role.yaml
central-controller/deployments/kubernetes/monitor/clusterrole_binding.yaml
central-controller/deployments/kubernetes/monitor/crds/k8splugin_v1alpha1_resourcebundlestate_cr.yaml
central-controller/deployments/kubernetes/monitor/crds/k8splugin_v1alpha1_resourcebundlestate_crd.yaml
central-controller/deployments/kubernetes/monitor/monitor-cleanup.sh
central-controller/deployments/kubernetes/monitor/operator.yaml
central-controller/deployments/kubernetes/monitor/role.yaml
central-controller/deployments/kubernetes/monitor/role_binding.yaml
central-controller/deployments/kubernetes/monitor/service_account.yaml
central-controller/deployments/kubernetes/scc.yaml
central-controller/deployments/kubernetes/scc_db.yaml
central-controller/deployments/kubernetes/scc_rsync.yaml
central-controller/src/monitor/.gitignore
central-controller/src/monitor/LICENSE.txt
central-controller/src/monitor/Makefile
central-controller/src/monitor/tools.go
central-controller/src/reg_cluster/README.md
central-controller/src/reg_cluster/config.json
central-controller/src/rsync/Makefile
central-controller/src/rsync/scripts/Dockerfile
central-controller/src/scc/Makefile
central-controller/src/scc/config.json
central-controller/src/scc/pkg/manager/resource_objectmanager.go
central-controller/src/scc/pkg/module/resourceobject.go
central-controller/src/scc/pkg/resource/route_resource.go
central-controller/src/scc/rsync_config.json
central-controller/src/scc/test/config.json
central-controller/src/scc/tools/ewoctl/examples/ewo-cfg.yaml
central-controller/src/scc/tools/ewoctl/examples/overlay.yaml
central-controller/src/scc/tools/ewoctl/examples/values.yaml
central-controller/src/vendor/github.com/open-ness/EMCO/src/go.mod
central-controller/src/vendor/github.com/open-ness/EMCO/src/orchestrator/go.mod
central-controller/src/vendor/github.com/open-ness/EMCO/src/orchestrator/pkg/infra/auth/auth_test.go
platform/crd-ctrlr/src/config/crd/patches/cainjection_in_cnflocalservices.yaml
platform/crd-ctrlr/src/config/crd/patches/cainjection_in_cnfnats.yaml
platform/crd-ctrlr/src/config/crd/patches/webhook_in_cnflocalservices.yaml
platform/crd-ctrlr/src/config/crd/patches/webhook_in_cnfnats.yaml
platform/crd-ctrlr/src/config/samples/batch_v1alpha1_cnfnat.yaml

index f290a73..f0f53cb 100644 (file)
@@ -1,28 +1,28 @@
-# Steps to setup Overlay Controller cluster\r
-\r
-###Prerequisite\r
-**Install Kubernetes**\r
-\r
-###Install dependencies\r
-**1. Install cert-manager**\r
-\r
-`$ kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml`\r
-\r
-**2. Create namespace for SDEWAN Overlay Controller Microservices**\r
-\r
-`$ kubectl create namespace sdewan-system`\r
-\r
-###Install CNF\r
-**Please follow the README.md under ../platform/cnf folder for installation**\r
-\r
-###Install CRD Controller\r
-**Please follow the README.md under ../platform/crd-ctrlr folder for installation**\r
-\r
-###Install Overlay Controller Microservices\r
-**Please follow the README.md under deployments folder for installation**\r
-\r
-###Configurations for Overlay Controller\r
-**1. Routing rule**\r
-\r
-**2. Local cluster registration**\r
-**Please follow the README.md under reg_cluster/ to finish the registration**\r
+# Steps to setup Overlay Controller cluster
+
+###Prerequisite
+**Install Kubernetes**
+
+###Install dependencies
+**1. Install cert-manager**
+
+`$ kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml`
+
+**2. Create namespace for SDEWAN Overlay Controller Microservices**
+
+`$ kubectl create namespace sdewan-system`
+
+###Install CNF
+**Please follow the README.md under ../platform/cnf folder for installation**
+
+###Install CRD Controller
+**Please follow the README.md under ../platform/crd-ctrlr folder for installation**
+
+###Install Overlay Controller Microservices
+**Please follow the README.md under deployments folder for installation**
+
+###Configurations for Overlay Controller
+**1. Routing rule**
+
+**2. Local cluster registration**
+**Please follow the README.md under reg_cluster/ to finish the registration**
index e438ddc..81173f6 100644 (file)
@@ -1,35 +1,35 @@
-# SPDX-license-identifier: Apache-2.0\r
-##############################################################################\r
-# Copyright (c) 2021 Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are made available under the terms of the Apache License, Version 2.0\r
-# which accompanies this distribution, and is available at\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-##############################################################################\r
-\r
-FROM golang:1.17-alpine\r
-\r
-RUN apk update \\r
-    && apk add --no-cache make\r
-\r
-WORKDIR /go/src/github.com/central-controller\r
-COPY ./ ./\r
-RUN cd src/scc && make all\r
-RUN cd src/rsync && make all\r
-RUN cd src/monitor && make all\r
-\r
-FROM alpine:3.15\r
-\r
-WORKDIR /opt/scc\r
-RUN addgroup -S scc && adduser -S -G scc scc\r
-RUN chown scc:scc /opt/scc -R\r
-\r
-COPY --chown=scc --from=0 /go/src/github.com/central-controller/src/scc/scc ./\r
-COPY --chown=scc --from=0 /go/src/github.com/central-controller/src/rsync/rsync ./\r
-COPY --chown=scc --from=0 /go/src/github.com/central-controller/src/monitor/monitor ./\r
-COPY --chown=scc --from=0 /go/src/github.com/central-controller/build/entrypoint ./\r
-RUN chmod +x entrypoint\r
-\r
-USER scc\r
-\r
-ENTRYPOINT ["./entrypoint"]\r
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2021 Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+FROM golang:1.17-alpine
+
+RUN apk update \
+    && apk add --no-cache make
+
+WORKDIR /go/src/github.com/central-controller
+COPY ./ ./
+RUN cd src/scc && make all
+RUN cd src/rsync && make all
+RUN cd src/monitor && make all
+
+FROM alpine:3.15
+
+WORKDIR /opt/scc
+RUN addgroup -S scc && adduser -S -G scc scc
+RUN chown scc:scc /opt/scc -R
+
+COPY --chown=scc --from=0 /go/src/github.com/central-controller/src/scc/scc ./
+COPY --chown=scc --from=0 /go/src/github.com/central-controller/src/rsync/rsync ./
+COPY --chown=scc --from=0 /go/src/github.com/central-controller/src/monitor/monitor ./
+COPY --chown=scc --from=0 /go/src/github.com/central-controller/build/entrypoint ./
+RUN chmod +x entrypoint
+
+USER scc
+
+ENTRYPOINT ["./entrypoint"]
index dec5cd8..009881b 100644 (file)
@@ -1,5 +1,5 @@
-# Steps for building v1 API Docker Image\r
-\r
-    `$cd central-controller`\r
-\r
+# Steps for building v1 API Docker Image
+
+    `$cd central-controller`
+
     `$docker build -f build/Dockerfile . -t scc`
\ No newline at end of file
index 520321a..4a12721 100644 (file)
@@ -1,26 +1,26 @@
-# Steps for running v1 API microservices\r
-\r
-### Precondition\r
-**1. Install cert-manager**\r
-\r
-`$ kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml`\r
-\r
-### Steps to install packages from yaml\r
-**1. Create namespace for SDEWAN Central Controller v1Microservices**\r
-\r
-`$cd kubernetes`\r
-`$ kubectl create namespace sdewan-system`\r
-\r
-**2. Create Databases used by SDEWAN Central Controller v1 Microservices for Etcd and Mongo**\r
-\r
-`$ kubectl apply -f scc_db.yaml -n sdewan-system`\r
-\r
-**3. create SDEWAN Central Controller v1 Microservices**\r
-\r
-`$ kubectl apply -f scc.yaml -n sdewan-system`\r
-\r
-`$ kubectl apply -f scc_rsync.yaml -n sdewan-system`\r
-\r
-**4. install monitor resources**\r
-\r
-`$ ./monitor-deploy.sh`\r
+# Steps for running v1 API microservices
+
+### Precondition
+**1. Install cert-manager**
+
+`$ kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.6.1/cert-manager.yaml`
+
+### Steps to install packages from yaml
+**1. Create namespace for SDEWAN Central Controller v1Microservices**
+
+`$cd kubernetes`
+`$ kubectl create namespace sdewan-system`
+
+**2. Create Databases used by SDEWAN Central Controller v1 Microservices for Etcd and Mongo**
+
+`$ kubectl apply -f scc_db.yaml -n sdewan-system`
+
+**3. create SDEWAN Central Controller v1 Microservices**
+
+`$ kubectl apply -f scc.yaml -n sdewan-system`
+
+`$ kubectl apply -f scc_rsync.yaml -n sdewan-system`
+
+**4. install monitor resources**
+
+`$ ./monitor-deploy.sh`
index 8884384..77dbef6 100644 (file)
@@ -1,7 +1,7 @@
-kubectl apply -f monitor/crds/k8splugin_v1alpha1_resourcebundlestate_crd.yaml\r
-kubectl apply -f monitor/role.yaml\r
-kubectl apply -f monitor/cluster_role.yaml\r
-kubectl apply -f monitor/role_binding.yaml\r
-kubectl apply -f monitor/clusterrole_binding.yaml\r
-kubectl apply -f monitor/service_account.yaml\r
-kubectl apply -f monitor/operator.yaml\r
+kubectl apply -f monitor/crds/k8splugin_v1alpha1_resourcebundlestate_crd.yaml
+kubectl apply -f monitor/role.yaml
+kubectl apply -f monitor/cluster_role.yaml
+kubectl apply -f monitor/role_binding.yaml
+kubectl apply -f monitor/clusterrole_binding.yaml
+kubectl apply -f monitor/service_account.yaml
+kubectl apply -f monitor/operator.yaml
index 05d00f6..7d75a2e 100644 (file)
@@ -1,7 +1,7 @@
-kubectl delete -f monitor/crds/k8splugin_v1alpha1_resourcebundlestate_crd.yaml\r
-kubectl delete -f monitor/role.yaml\r
-kubectl delete -f monitor/cluster_role.yaml\r
-kubectl delete -f monitor/role_binding.yaml\r
-kubectl delete -f monitor/clusterrole_binding.yaml\r
-kubectl delete -f monitor/service_account.yaml\r
-kubectl delete -f monitor/operator.yaml\r
+kubectl delete -f monitor/crds/k8splugin_v1alpha1_resourcebundlestate_crd.yaml
+kubectl delete -f monitor/role.yaml
+kubectl delete -f monitor/cluster_role.yaml
+kubectl delete -f monitor/role_binding.yaml
+kubectl delete -f monitor/clusterrole_binding.yaml
+kubectl delete -f monitor/service_account.yaml
+kubectl delete -f monitor/operator.yaml
index f82622a..9330a68 100644 (file)
@@ -1,78 +1,78 @@
-apiVersion: rbac.authorization.k8s.io/v1\r
-kind: ClusterRole\r
-metadata:\r
-  creationTimestamp: null\r
-  name: monitor\r
-rules:\r
-- apiGroups:\r
-  - ""\r
-  resources:\r
-  - pods\r
-  - services\r
-  - endpoints\r
-  - persistentvolumeclaims\r
-  - events\r
-  - configmaps\r
-  - secrets\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - apps\r
-  resources:\r
-  - deployments\r
-  - daemonsets\r
-  - replicasets\r
-  - statefulsets\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - monitoring.coreos.com\r
-  resources:\r
-  - servicemonitors\r
-  verbs:\r
-  - get\r
-  - create\r
-- apiGroups:\r
-  - apps\r
-  resourceNames:\r
-  - monitor\r
-  resources:\r
-  - deployments/finalizers\r
-  verbs:\r
-  - update\r
-- apiGroups:\r
-  - ""\r
-  resources:\r
-  - pods\r
-  verbs:\r
-  - get\r
-- apiGroups:\r
-  - apps\r
-  resources:\r
-  - replicasets\r
-  verbs:\r
-  - get\r
-- apiGroups:\r
-  - k8splugin.io\r
-  resources:\r
-  - '*'\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - batch\r
-  resources:\r
-  - '*'\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - extensions\r
-  resources:\r
-  - '*'\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - certificates.k8s.io\r
-  resources:\r
-  - '*'\r
-  verbs:\r
-  - '*'\r
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+  creationTimestamp: null
+  name: monitor
+rules:
+- apiGroups:
+  - ""
+  resources:
+  - pods
+  - services
+  - endpoints
+  - persistentvolumeclaims
+  - events
+  - configmaps
+  - secrets
+  verbs:
+  - '*'
+- apiGroups:
+  - apps
+  resources:
+  - deployments
+  - daemonsets
+  - replicasets
+  - statefulsets
+  verbs:
+  - '*'
+- apiGroups:
+  - monitoring.coreos.com
+  resources:
+  - servicemonitors
+  verbs:
+  - get
+  - create
+- apiGroups:
+  - apps
+  resourceNames:
+  - monitor
+  resources:
+  - deployments/finalizers
+  verbs:
+  - update
+- apiGroups:
+  - ""
+  resources:
+  - pods
+  verbs:
+  - get
+- apiGroups:
+  - apps
+  resources:
+  - replicasets
+  verbs:
+  - get
+- apiGroups:
+  - k8splugin.io
+  resources:
+  - '*'
+  verbs:
+  - '*'
+- apiGroups:
+  - batch
+  resources:
+  - '*'
+  verbs:
+  - '*'
+- apiGroups:
+  - extensions
+  resources:
+  - '*'
+  verbs:
+  - '*'
+- apiGroups:
+  - certificates.k8s.io
+  resources:
+  - '*'
+  verbs:
+  - '*'
index 40187e9..73e7403 100644 (file)
@@ -1,12 +1,12 @@
-kind: ClusterRoleBinding\r
-apiVersion: rbac.authorization.k8s.io/v1\r
-metadata:\r
-  name: monitor\r
-subjects:\r
-- kind: ServiceAccount\r
-  name: monitor\r
-  namespace: default\r
-roleRef:\r
-  kind: ClusterRole\r
-  name: monitor\r
-  apiGroup: rbac.authorization.k8s.io\r
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: monitor
+subjects:
+- kind: ServiceAccount
+  name: monitor
+  namespace: default
+roleRef:
+  kind: ClusterRole
+  name: monitor
+  apiGroup: rbac.authorization.k8s.io
index cb1a163..86fe055 100644 (file)
@@ -1,12 +1,12 @@
-apiVersion: k8splugin.io/v1alpha1\r
-kind: ResourceBundleState\r
-metadata:\r
-  name: example-resourcebundlestate\r
-  labels:\r
-    "emco/deployment-id": "bionic-beaver"\r
-spec:\r
-  selector:\r
-    matchLabels:\r
-      "emco/deployment-id": "bionic-beaver"\r
-status:\r
-  ready: false\r
+apiVersion: k8splugin.io/v1alpha1
+kind: ResourceBundleState
+metadata:
+  name: example-resourcebundlestate
+  labels:
+    "emco/deployment-id": "bionic-beaver"
+spec:
+  selector:
+    matchLabels:
+      "emco/deployment-id": "bionic-beaver"
+status:
+  ready: false
index 39a3917..4ae37c9 100644 (file)
-apiVersion: apiextensions.k8s.io/v1\r
-kind: CustomResourceDefinition\r
-metadata:\r
-  name: resourcebundlestates.k8splugin.io\r
-spec:\r
-  group: k8splugin.io\r
-  names:\r
-    kind: ResourceBundleState\r
-    listKind: ResourceBundleStateList\r
-    plural: resourcebundlestates\r
-    singular: resourcebundlestate\r
-  scope: Namespaced\r
-  versions:\r
-  - name: v1alpha1\r
-    schema:\r
-      openAPIV3Schema:\r
-        properties:\r
-          apiVersion:\r
-            description: 'APIVersion defines the versioned schema of this representation\r
-            of an object. Servers should convert recognized schemas to the latest\r
-            internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'\r
-            type: string\r
-          kind:\r
-            description: 'Kind is a string value representing the REST resource this\r
-            object represents. Servers may infer this from the endpoint the client\r
-              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'\r
-            type: string\r
-          metadata:\r
-            type: object\r
-          spec:\r
-            properties:\r
-              selector:\r
-                type: object\r
-            required:\r
-            - selector\r
-            type: object\r
-          status:\r
-            properties:\r
-              podStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              ready:\r
-                type: boolean\r
-              resourceCount:\r
-                format: int32\r
-                type: integer\r
-              serviceStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              configMapStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              deploymentStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              secretStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              daemonSetStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              ingressStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              jobStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              statefulSetStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-              csrStatuses:\r
-                items:\r
-                  type: object\r
-                type: array\r
-            required:\r
-            - ready\r
-            - resourceCount\r
-            - podStatuses\r
-            - serviceStatuses\r
-            - configMapStatuses\r
-            - deploymentStatuses\r
-            - secretStatuses\r
-            - daemonSetStatuses\r
-            - ingressStatuses\r
-            - jobStatuses\r
-            - statefulSetStatuses\r
-            - csrStatuses\r
-            type: object\r
-        type: object\r
-    served: true\r
-    storage: true\r
-    subresources:\r
-      status: {}\r
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  name: resourcebundlestates.k8splugin.io
+spec:
+  group: k8splugin.io
+  names:
+    kind: ResourceBundleState
+    listKind: ResourceBundleStateList
+    plural: resourcebundlestates
+    singular: resourcebundlestate
+  scope: Namespaced
+  versions:
+  - name: v1alpha1
+    schema:
+      openAPIV3Schema:
+        properties:
+          apiVersion:
+            description: 'APIVersion defines the versioned schema of this representation
+            of an object. Servers should convert recognized schemas to the latest
+            internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
+            type: string
+          kind:
+            description: 'Kind is a string value representing the REST resource this
+            object represents. Servers may infer this from the endpoint the client
+              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
+            type: string
+          metadata:
+            type: object
+          spec:
+            properties:
+              selector:
+                type: object
+            required:
+            - selector
+            type: object
+          status:
+            properties:
+              podStatuses:
+                items:
+                  type: object
+                type: array
+              ready:
+                type: boolean
+              resourceCount:
+                format: int32
+                type: integer
+              serviceStatuses:
+                items:
+                  type: object
+                type: array
+              configMapStatuses:
+                items:
+                  type: object
+                type: array
+              deploymentStatuses:
+                items:
+                  type: object
+                type: array
+              secretStatuses:
+                items:
+                  type: object
+                type: array
+              daemonSetStatuses:
+                items:
+                  type: object
+                type: array
+              ingressStatuses:
+                items:
+                  type: object
+                type: array
+              jobStatuses:
+                items:
+                  type: object
+                type: array
+              statefulSetStatuses:
+                items:
+                  type: object
+                type: array
+              csrStatuses:
+                items:
+                  type: object
+                type: array
+            required:
+            - ready
+            - resourceCount
+            - podStatuses
+            - serviceStatuses
+            - configMapStatuses
+            - deploymentStatuses
+            - secretStatuses
+            - daemonSetStatuses
+            - ingressStatuses
+            - jobStatuses
+            - statefulSetStatuses
+            - csrStatuses
+            type: object
+        type: object
+    served: true
+    storage: true
+    subresources:
+      status: {}
index 44f241f..2172507 100644 (file)
@@ -1,6 +1,6 @@
-kubectl delete rolebinding monitor\r
-kubectl delete clusterrolebinding monitor\r
-kubectl delete role monitor\r
-kubectl delete clusterrole monitor\r
-kubectl delete serviceaccount monitor\r
-kubectl delete deploy monitor\r
+kubectl delete rolebinding monitor
+kubectl delete clusterrolebinding monitor
+kubectl delete role monitor
+kubectl delete clusterrole monitor
+kubectl delete serviceaccount monitor
+kubectl delete deploy monitor
index ce320bb..2c69345 100644 (file)
@@ -1,32 +1,32 @@
-apiVersion: apps/v1\r
-kind: Deployment\r
-metadata:\r
-  name: monitor\r
-  labels:\r
-    "emco/deployment-id": "monitor"\r
-spec:\r
-  replicas: 1\r
-  selector:\r
-    matchLabels:\r
-      "emco/deployment-id": "monitor"\r
-  template:\r
-    metadata:\r
-      labels:\r
-        "emco/deployment-id": "monitor"\r
-    spec:\r
-      serviceAccountName: monitor\r
-      containers:\r
-        - name: monitor\r
-          # Replace this with the built image name\r
-          image: scc:latest\r
-          command: ["/opt/scc/entrypoint", "monitor"]\r
-          imagePullPolicy: IfNotPresent\r
-          env:\r
-            - name: WATCH_NAMESPACE\r
-              value: ""\r
-            - name: POD_NAME\r
-              valueFrom:\r
-                fieldRef:\r
-                  fieldPath: metadata.name\r
-            - name: OPERATOR_NAME\r
-              value: "monitor"\r
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: monitor
+  labels:
+    "emco/deployment-id": "monitor"
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      "emco/deployment-id": "monitor"
+  template:
+    metadata:
+      labels:
+        "emco/deployment-id": "monitor"
+    spec:
+      serviceAccountName: monitor
+      containers:
+        - name: monitor
+          # Replace this with the built image name
+          image: scc:latest
+          command: ["/opt/scc/entrypoint", "monitor"]
+          imagePullPolicy: IfNotPresent
+          env:
+            - name: WATCH_NAMESPACE
+              value: ""
+            - name: POD_NAME
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.name
+            - name: OPERATOR_NAME
+              value: "monitor"
index 19cf957..c48141a 100644 (file)
@@ -1,72 +1,72 @@
-apiVersion: rbac.authorization.k8s.io/v1\r
-kind: Role\r
-metadata:\r
-  creationTimestamp: null\r
-  name: monitor\r
-rules:\r
-- apiGroups:\r
-  - ""\r
-  resources:\r
-  - pods\r
-  - services\r
-  - endpoints\r
-  - persistentvolumeclaims\r
-  - events\r
-  - configmaps\r
-  - secrets\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - apps\r
-  resources:\r
-  - deployments\r
-  - daemonsets\r
-  - replicasets\r
-  - statefulsets\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - monitoring.coreos.com\r
-  resources:\r
-  - servicemonitors\r
-  verbs:\r
-  - get\r
-  - create\r
-- apiGroups:\r
-  - apps\r
-  resourceNames:\r
-  - monitor\r
-  resources:\r
-  - deployments/finalizers\r
-  verbs:\r
-  - update\r
-- apiGroups:\r
-  - ""\r
-  resources:\r
-  - pods\r
-  verbs:\r
-  - get\r
-- apiGroups:\r
-  - apps\r
-  resources:\r
-  - replicasets\r
-  verbs:\r
-  - get\r
-- apiGroups:\r
-  - k8splugin.io\r
-  resources:\r
-  - '*'\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - batch\r
-  resources:\r
-  - '*'\r
-  verbs:\r
-  - '*'\r
-- apiGroups:\r
-  - extensions\r
-  resources:\r
-  - '*'\r
-  verbs:\r
-  - '*'\r
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+  creationTimestamp: null
+  name: monitor
+rules:
+- apiGroups:
+  - ""
+  resources:
+  - pods
+  - services
+  - endpoints
+  - persistentvolumeclaims
+  - events
+  - configmaps
+  - secrets
+  verbs:
+  - '*'
+- apiGroups:
+  - apps
+  resources:
+  - deployments
+  - daemonsets
+  - replicasets
+  - statefulsets
+  verbs:
+  - '*'
+- apiGroups:
+  - monitoring.coreos.com
+  resources:
+  - servicemonitors
+  verbs:
+  - get
+  - create
+- apiGroups:
+  - apps
+  resourceNames:
+  - monitor
+  resources:
+  - deployments/finalizers
+  verbs:
+  - update
+- apiGroups:
+  - ""
+  resources:
+  - pods
+  verbs:
+  - get
+- apiGroups:
+  - apps
+  resources:
+  - replicasets
+  verbs:
+  - get
+- apiGroups:
+  - k8splugin.io
+  resources:
+  - '*'
+  verbs:
+  - '*'
+- apiGroups:
+  - batch
+  resources:
+  - '*'
+  verbs:
+  - '*'
+- apiGroups:
+  - extensions
+  resources:
+  - '*'
+  verbs:
+  - '*'
index b3ec755..69cd293 100644 (file)
@@ -1,11 +1,11 @@
-kind: RoleBinding\r
-apiVersion: rbac.authorization.k8s.io/v1\r
-metadata:\r
-  name: monitor\r
-subjects:\r
-- kind: ServiceAccount\r
-  name: monitor\r
-roleRef:\r
-  kind: Role\r
-  name: monitor\r
-  apiGroup: rbac.authorization.k8s.io\r
+kind: RoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: monitor
+subjects:
+- kind: ServiceAccount
+  name: monitor
+roleRef:
+  kind: Role
+  name: monitor
+  apiGroup: rbac.authorization.k8s.io
index f0101eb..ba9b61c 100644 (file)
@@ -1,4 +1,4 @@
-apiVersion: v1\r
-kind: ServiceAccount\r
-metadata:\r
-  name: monitor\r
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: monitor
index 2db15e7..421f783 100644 (file)
-# Resources to create SDEWAN Central Controller v1 Microservices\r
-# SCC Config Map\r
-apiVersion: rbac.authorization.k8s.io/v1\r
-kind: ClusterRoleBinding\r
-metadata:\r
-  name: scc-rbac\r
-subjects:\r
-  - kind: ServiceAccount\r
-    name: default\r
-    namespace: sdewan-system\r
-roleRef:\r
-  kind: ClusterRole\r
-  name: cluster-admin\r
-  apiGroup: rbac.authorization.k8s.io\r
-\r
----\r
-# SCC Config Map\r
-kind: ConfigMap\r
-apiVersion: v1\r
-metadata:\r
-  name: scc\r
-  labels:\r
-    app: scc\r
-data:\r
-  config.json: |\r
-          {\r
-          "database-type": "mongo",\r
-          "database-ip": "mongo",\r
-          "etcd-ip": "etcd",\r
-          "service-port": "9015"\r
-          }\r
-  rsync_config.json: |\r
-          {\r
-          "rsync-ip": "rsync",\r
-          "rsync-port": "9041"\r
-          }\r
-\r
----\r
-# SCC Service\r
-apiVersion: v1\r
-kind: Service\r
-metadata:\r
-  name: scc\r
-  labels:\r
-    app: scc\r
-spec:\r
-  selector:\r
-    app: scc\r
-  type: NodePort\r
-  ports:\r
-  - name: http\r
-    port: 9015\r
-    nodePort: 31298\r
-    protocol: TCP\r
-    targetPort: 9015\r
-\r
----\r
-# SCC Deployment\r
-apiVersion: apps/v1\r
-kind: Deployment\r
-metadata:\r
-  name: scc\r
-spec:\r
-  replicas: 1\r
-  selector:\r
-    matchLabels:\r
-      app: scc\r
-  template:\r
-    metadata:\r
-      labels:\r
-        app: scc\r
-    spec:\r
-      containers:\r
-        - name: scc\r
-          image: scc:latest\r
-          imagePullPolicy: IfNotPresent\r
-          command: ["/opt/scc/entrypoint", "scc"]\r
-          workingDir: /opt/scc\r
-          ports:\r
-          - containerPort: 9015\r
-          volumeMounts:\r
-          - name: config\r
-            mountPath: /opt/scc/config.json\r
-            subPath: config.json\r
-          - name: rsync-config\r
-            mountPath: /opt/scc/rsync_config.json\r
-            subPath: rsync_config.json\r
-      volumes:\r
-        - name: config\r
-          configMap:\r
-            name: scc\r
-            items:\r
-            - key: config.json\r
-              path: config.json\r
-        - name: rsync-config\r
-          configMap:\r
-            name: scc\r
-            items:\r
-            - key: rsync_config.json\r
-              path: rsync_config.json\r
+# Resources to create SDEWAN Central Controller v1 Microservices
+# SCC Config Map
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: scc-rbac
+subjects:
+  - kind: ServiceAccount
+    name: default
+    namespace: sdewan-system
+roleRef:
+  kind: ClusterRole
+  name: cluster-admin
+  apiGroup: rbac.authorization.k8s.io
+
+---
+# SCC Config Map
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: scc
+  labels:
+    app: scc
+data:
+  config.json: |
+          {
+          "database-type": "mongo",
+          "database-ip": "mongo",
+          "etcd-ip": "etcd",
+          "service-port": "9015"
+          }
+  rsync_config.json: |
+          {
+          "rsync-ip": "rsync",
+          "rsync-port": "9041"
+          }
+
+---
+# SCC Service
+apiVersion: v1
+kind: Service
+metadata:
+  name: scc
+  labels:
+    app: scc
+spec:
+  selector:
+    app: scc
+  type: NodePort
+  ports:
+  - name: http
+    port: 9015
+    nodePort: 31298
+    protocol: TCP
+    targetPort: 9015
+
+---
+# SCC Deployment
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: scc
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: scc
+  template:
+    metadata:
+      labels:
+        app: scc
+    spec:
+      containers:
+        - name: scc
+          image: scc:latest
+          imagePullPolicy: IfNotPresent
+          command: ["/opt/scc/entrypoint", "scc"]
+          workingDir: /opt/scc
+          ports:
+          - containerPort: 9015
+          volumeMounts:
+          - name: config
+            mountPath: /opt/scc/config.json
+            subPath: config.json
+          - name: rsync-config
+            mountPath: /opt/scc/rsync_config.json
+            subPath: rsync_config.json
+      volumes:
+        - name: config
+          configMap:
+            name: scc
+            items:
+            - key: config.json
+              path: config.json
+        - name: rsync-config
+          configMap:
+            name: scc
+            items:
+            - key: rsync_config.json
+              path: rsync_config.json
index f40aaa0..cb212b3 100644 (file)
@@ -1,87 +1,87 @@
-# Resources to create Databases used by SDEWAN Central Controller v1 Microservices\r
----\r
-#Etcd Service\r
-apiVersion: v1\r
-kind: Service\r
-metadata:\r
-  labels:\r
-    app: etcd\r
-  name: etcd\r
-spec:\r
-  ports:\r
-  - name: "2379"\r
-    port: 2379\r
-    targetPort: 2379\r
-  - name: "2380"\r
-    port: 2380\r
-    targetPort: 2380\r
-  selector:\r
-    app: etcd\r
-\r
----\r
-#Mongo Service\r
-apiVersion: v1\r
-kind: Service\r
-metadata:\r
-  labels:\r
-    app: mongo\r
-  name: mongo\r
-spec:\r
-  ports:\r
-  - name: "27017"\r
-    port: 27017\r
-    targetPort: 27017\r
-  selector:\r
-    app: mongo\r
-\r
----\r
-#Etcd Deployment\r
-apiVersion: apps/v1\r
-kind: Deployment\r
-metadata:\r
-  name: etcd\r
-spec:\r
-  replicas: 1\r
-  selector:\r
-    matchLabels:\r
-      app: etcd\r
-  template:\r
-    metadata:\r
-      labels:\r
-        app: etcd\r
-    spec:\r
-      containers:\r
-      - image: bitnami/etcd:3\r
-        imagePullPolicy: IfNotPresent\r
-        name: etcd\r
-        env:\r
-          - name: "ALLOW_NONE_AUTHENTICATION"\r
-            value: "yes"\r
-        ports:\r
-        - containerPort: 2379\r
-        - containerPort: 2380\r
-\r
----\r
-#Mongo Deployment\r
-apiVersion: apps/v1\r
-kind: Deployment\r
-metadata:\r
-  labels:\r
-    app: mongo\r
-  name: mongo\r
-spec:\r
-  replicas: 1\r
-  selector:\r
-    matchLabels:\r
-      app: mongo\r
-  template:\r
-    metadata:\r
-      labels:\r
-        app: mongo\r
-    spec:\r
-      containers:\r
-      - image: mongo\r
-        imagePullPolicy: IfNotPresent\r
-        name: mongo\r
-        ports:\r
-        - containerPort: 27017\r
+# Resources to create Databases used by SDEWAN Central Controller v1 Microservices
+---
+#Etcd Service
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app: etcd
+  name: etcd
+spec:
+  ports:
+  - name: "2379"
+    port: 2379
+    targetPort: 2379
+  - name: "2380"
+    port: 2380
+    targetPort: 2380
+  selector:
+    app: etcd
+
+---
+#Mongo Service
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app: mongo
+  name: mongo
+spec:
+  ports:
+  - name: "27017"
+    port: 27017
+    targetPort: 27017
+  selector:
+    app: mongo
+
+---
+#Etcd Deployment
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: etcd
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: etcd
+  template:
+    metadata:
+      labels:
+        app: etcd
+    spec:
+      containers:
+      - image: bitnami/etcd:3
+        imagePullPolicy: IfNotPresent
+        name: etcd
+        env:
+          - name: "ALLOW_NONE_AUTHENTICATION"
+            value: "yes"
+        ports:
+        - containerPort: 2379
+        - containerPort: 2380
+
+---
+#Mongo Deployment
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  labels:
+    app: mongo
+  name: mongo
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: mongo
+  template:
+    metadata:
+      labels:
+        app: mongo
+    spec:
+      containers:
+      - image: mongo
+        imagePullPolicy: IfNotPresent
+        name: mongo
+        ports:
+        - containerPort: 27017
index ad80d55..9106982 100644 (file)
@@ -1,71 +1,71 @@
-# Resources to create Rsync used by SDEWAN Central Controller v1 Microservices\r
----\r
-# RSYNC ConfigMap\r
-kind: ConfigMap\r
-apiVersion: v1\r
-metadata:\r
-  name: rsync\r
-  labels:\r
-    app: rsync\r
-data:\r
-  config.json: |\r
-          {\r
-          "database-type": "mongo",\r
-          "database-ip": "mongo",\r
-          "etcd-ip": "etcd"\r
-          }\r
-\r
----\r
-# RSYNC Service\r
-apiVersion: v1\r
-kind: Service\r
-metadata:\r
-  name: rsync\r
-  labels:\r
-    app: rsync\r
-spec:\r
-  selector:\r
-    app: rsync\r
-  type: NodePort\r
-  ports:\r
-  - name: internal\r
-    port: 9041\r
-    protocol: TCP\r
-    targetPort: 9041\r
-    nodePort: 31297\r
-\r
----\r
-# RSYNC Deployment\r
-apiVersion: apps/v1\r
-kind: Deployment\r
-metadata:\r
-  name: rsync\r
-spec:\r
-  replicas: 1\r
-  selector:\r
-    matchLabels:\r
-      app: rsync\r
-  template:\r
-    metadata:\r
-      labels:\r
-        app: rsync\r
-    spec:\r
-      containers:\r
-        - name: rsync\r
-          image: scc:latest\r
-          imagePullPolicy: IfNotPresent\r
-          command: ["/opt/scc/entrypoint", "rsync"]\r
-          workingDir: /opt/scc\r
-          ports:\r
-          - containerPort: 9041\r
-          volumeMounts:\r
-          - name: config\r
-            mountPath: /opt/scc/config.json\r
-            subPath: config.json\r
-      volumes:\r
-        - name: config\r
-          configMap:\r
-            name: rsync\r
-            items:\r
-            - key: config.json\r
+# Resources to create Rsync used by SDEWAN Central Controller v1 Microservices
+---
+# RSYNC ConfigMap
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: rsync
+  labels:
+    app: rsync
+data:
+  config.json: |
+          {
+          "database-type": "mongo",
+          "database-ip": "mongo",
+          "etcd-ip": "etcd"
+          }
+
+---
+# RSYNC Service
+apiVersion: v1
+kind: Service
+metadata:
+  name: rsync
+  labels:
+    app: rsync
+spec:
+  selector:
+    app: rsync
+  type: NodePort
+  ports:
+  - name: internal
+    port: 9041
+    protocol: TCP
+    targetPort: 9041
+    nodePort: 31297
+
+---
+# RSYNC Deployment
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: rsync
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: rsync
+  template:
+    metadata:
+      labels:
+        app: rsync
+    spec:
+      containers:
+        - name: rsync
+          image: scc:latest
+          imagePullPolicy: IfNotPresent
+          command: ["/opt/scc/entrypoint", "rsync"]
+          workingDir: /opt/scc
+          ports:
+          - containerPort: 9041
+          volumeMounts:
+          - name: config
+            mountPath: /opt/scc/config.json
+            subPath: config.json
+      volumes:
+        - name: config
+          configMap:
+            name: rsync
+            items:
+            - key: config.json
               path: config.json
\ No newline at end of file
index 712a731..571ef64 100644 (file)
@@ -1,7 +1,7 @@
-# Temporary Build Files\r
-build/_output\r
-build/_test\r
-/output\r
-### VisualStudioCode ###\r
-.vscode/*\r
-.history\r
+# Temporary Build Files
+build/_output
+build/_test
+/output
+### VisualStudioCode ###
+.vscode/*
+.history
index 557afc3..6b088b1 100644 (file)
@@ -1,2 +1,2 @@
-// SPDX-License-Identifier: Apache-2.0\r
+// SPDX-License-Identifier: Apache-2.0
 // Copyright (c) 2020 Intel Corporation
\ No newline at end of file
index 12c62ec..5822bba 100644 (file)
@@ -1,27 +1,27 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2020 Intel Corporation\r
-\r
-export GO111MODULE=on\r
-\r
-all: clean\r
-       CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \\r
-       go build -a -ldflags '-extldflags "-static"' \\r
-       -o ./monitor ./cmd/manager/main.go\r
-\r
-build: clean test cover\r
-deploy: build\r
-\r
-.PHONY: test\r
-test: clean\r
-       @go test -v ./...\r
-\r
-format:\r
-       @go fmt ./...\r
-\r
-clean:\r
-       @rm -f monitor\r
-\r
-.PHONY: cover\r
-cover:\r
-       @go test -p 2 ./... -coverprofile=coverage.out\r
-       @go tool cover -html=coverage.out -o coverage.html\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+export GO111MODULE=on
+
+all: clean
+       CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
+       go build -a -ldflags '-extldflags "-static"' \
+       -o ./monitor ./cmd/manager/main.go
+
+build: clean test cover
+deploy: build
+
+.PHONY: test
+test: clean
+       @go test -v ./...
+
+format:
+       @go fmt ./...
+
+clean:
+       @rm -f monitor
+
+.PHONY: cover
+cover:
+       @go test -p 2 ./... -coverprofile=coverage.out
+       @go tool cover -html=coverage.out -o coverage.html
index eba4587..6e6e18b 100644 (file)
@@ -1,7 +1,7 @@
-// +build tools\r
-\r
-package tools\r
-\r
-import (\r
-       _ "sigs.k8s.io/controller-tools/pkg/crd"\r
-)\r
+// +build tools
+
+package tools
+
+import (
+       _ "sigs.k8s.io/controller-tools/pkg/crd"
+)
index 9ec79e9..4db24a9 100644 (file)
@@ -1,9 +1,9 @@
-# Steps to register local cluster\r
-\r
-**1. Copy Kubeconfig as admin.conf in this folder**\r
-**2. Compiled as:**\r
-   `$ go build -o reg_cluster ./reg_cluster.go`\r
-**3. Edit config.json with mongo db and etcd ip**\r
-**4. Run command to register cluster**\r
-   `$ ./reg_cluster`\r
-\r
+# Steps to register local cluster
+
+**1. Copy Kubeconfig as admin.conf in this folder**
+**2. Compiled as:**
+   `$ go build -o reg_cluster ./reg_cluster.go`
+**3. Edit config.json with mongo db and etcd ip**
+**4. Run command to register cluster**
+   `$ ./reg_cluster`
+
index bc00c04..cc2890c 100644 (file)
@@ -1,4 +1,4 @@
-{\r
-"etcd-ip": "",\r
-"database-ip": ""\r
-}\r
+{
+"etcd-ip": "",
+"database-ip": ""
+}
index d019e9d..d92289c 100644 (file)
@@ -1,30 +1,30 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2020 Intel Corporation\r
-\r
-export GO111MODULE=on\r
-\r
-all: clean\r
-       CGO_ENABLED=1 GOOS=linux GOARCH=amd64 \\r
-       go build -tags rsync -o ./rsync ./cmd/main.go\r
-\r
-# The following is done this way as each patch on CI runs build and each merge runs deploy. So for build we don't need to build binary and hence\r
-# no need to create a static binary with additional flags. However, for generating binary, additional build flags are necessary. This if used with\r
-# mock plugin errors out for unit tests. So the seperation avoids the error.\r
-\r
-build: clean test cover\r
-deploy: build\r
-\r
-.PHONY: test\r
-test: clean\r
-       @go test -race ./...\r
-\r
-format:\r
-       @go fmt ./...\r
-\r
-clean:\r
-       @rm -f rsync coverage.html coverage.out\r
-\r
-.PHONY: cover\r
-cover:\r
-       @go test -race ./... -coverprofile=coverage.out\r
-       @go tool cover -html=coverage.out -o coverage.html\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+export GO111MODULE=on
+
+all: clean
+       CGO_ENABLED=1 GOOS=linux GOARCH=amd64 \
+       go build -tags rsync -o ./rsync ./cmd/main.go
+
+# The following is done this way as each patch on CI runs build and each merge runs deploy. So for build we don't need to build binary and hence
+# no need to create a static binary with additional flags. However, for generating binary, additional build flags are necessary. This if used with
+# mock plugin errors out for unit tests. So the seperation avoids the error.
+
+build: clean test cover
+deploy: build
+
+.PHONY: test
+test: clean
+       @go test -race ./...
+
+format:
+       @go fmt ./...
+
+clean:
+       @rm -f rsync coverage.html coverage.out
+
+.PHONY: cover
+cover:
+       @go test -race ./... -coverprofile=coverage.out
+       @go tool cover -html=coverage.out -o coverage.html
index 4a3bc17..a4f4696 100644 (file)
@@ -1,24 +1,24 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2020 Intel Corporation\r
-\r
-FROM ubuntu:18.04\r
-\r
-ARG HTTP_PROXY=${HTTP_PROXY}\r
-ARG HTTPS_PROXY=${HTTPS_PROXY}\r
-\r
-ENV http_proxy $HTTP_PROXY\r
-ENV https_proxy $HTTPS_PROXY\r
-ENV no_proxy $NO_PROXY\r
-\r
-EXPOSE 9016\r
-\r
-RUN groupadd -r onap && useradd -r -g onap onap\r
-\r
-WORKDIR /opt/multicloud/k8s/rsync\r
-RUN chown onap:onap /opt/multicloud/k8s/rsync -R\r
-\r
-ADD --chown=onap ./rsync ./\r
-\r
-USER onap\r
-\r
-CMD ["./rsync"]\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+FROM ubuntu:18.04
+
+ARG HTTP_PROXY=${HTTP_PROXY}
+ARG HTTPS_PROXY=${HTTPS_PROXY}
+
+ENV http_proxy $HTTP_PROXY
+ENV https_proxy $HTTPS_PROXY
+ENV no_proxy $NO_PROXY
+
+EXPOSE 9016
+
+RUN groupadd -r onap && useradd -r -g onap onap
+
+WORKDIR /opt/multicloud/k8s/rsync
+RUN chown onap:onap /opt/multicloud/k8s/rsync -R
+
+ADD --chown=onap ./rsync ./
+
+USER onap
+
+CMD ["./rsync"]
index b0d2754..22c0dfb 100644 (file)
@@ -1,37 +1,37 @@
-# SPDX-license-identifier: Apache-2.0\r
-##############################################################################\r
-# Copyright (c) 2021 Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are made available under the terms of the Apache License, Version 2.0\r
-# which accompanies this distribution, and is available at\r
-# http://www.apache.org/licenses/LICENSE-2.0\r
-##############################################################################\r
-\r
-export GO111MODULE=on\r
-\r
-all: clean\r
-       CGO_ENABLED=1 GOOS=linux GOARCH=amd64\r
-       @go build -tags netgo -o ./scc ./cmd/main.go\r
-\r
-# The following is done this way as each patch on CI runs build and each merge runs deploy. So for build we don't need to build binary and hence\r
-# no need to create a static binary with additional flags. However, for generating binary, additional build flags are necessary. This if used with\r
-# mock plugin errors out for unit tests. So the seperation avoids the error.\r
-\r
-build: clean test cover\r
-deploy: build\r
-\r
-.PHONY: test\r
-test: clean\r
-       @go test -race ./...\r
-\r
-format:\r
-       @go fmt ./...\r
-\r
-clean:\r
-       @find . -name "*so" -delete\r
-       @rm -f scc coverage.html coverage.out\r
-\r
-.PHONY: cover\r
-cover:\r
-       @go test -race ./... -coverprofile=coverage.out\r
-       @go tool cover -html=coverage.out -o coverage.html\r
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2021 Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+export GO111MODULE=on
+
+all: clean
+       CGO_ENABLED=1 GOOS=linux GOARCH=amd64
+       @go build -tags netgo -o ./scc ./cmd/main.go
+
+# The following is done this way as each patch on CI runs build and each merge runs deploy. So for build we don't need to build binary and hence
+# no need to create a static binary with additional flags. However, for generating binary, additional build flags are necessary. This if used with
+# mock plugin errors out for unit tests. So the seperation avoids the error.
+
+build: clean test cover
+deploy: build
+
+.PHONY: test
+test: clean
+       @go test -race ./...
+
+format:
+       @go fmt ./...
+
+clean:
+       @find . -name "*so" -delete
+       @rm -f scc coverage.html coverage.out
+
+.PHONY: cover
+cover:
+       @go test -race ./... -coverprofile=coverage.out
+       @go tool cover -html=coverage.out -o coverage.html
index bc00c04..cc2890c 100644 (file)
@@ -1,4 +1,4 @@
-{\r
-"etcd-ip": "",\r
-"database-ip": ""\r
-}\r
+{
+"etcd-ip": "",
+"database-ip": ""
+}
index ae4c4ea..2debe0a 100644 (file)
-/*\r
- * Copyright 2020 Intel Corporation, Inc\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package manager\r
-\r
-import (\r
-       "encoding/json"\r
-       "io"\r
-\r
-       "github.com/akraino-edge-stack/icn-sdwan/central-controller/src/scc/pkg/module"\r
-       "github.com/open-ness/EMCO/src/orchestrator/pkg/infra/db"\r
-       pkgerrors "github.com/pkg/errors"\r
-)\r
-\r
-type ResourceObjectKey struct {\r
-       Cluster string `json:"cluster-info"`\r
-       Type    string `json:"type"`\r
-       Name    string `json:"name"`\r
-}\r
-\r
-// ResourceObjectManager implements the ControllerObjectManager\r
-type ResourceObjectManager struct {\r
-       BaseObjectManager\r
-}\r
-\r
-func NewResourceObjectManager() *ResourceObjectManager {\r
-       return &ResourceObjectManager{\r
-               BaseObjectManager{\r
-                       storeName:      StoreName,\r
-                       tagMeta:        "resource",\r
-                       depResManagers: []ControllerObjectManager{},\r
-                       ownResManagers: []ControllerObjectManager{},\r
-               },\r
-       }\r
-}\r
-\r
-func (c *ResourceObjectManager) GetResourceName() string {\r
-       return Resource\r
-}\r
-\r
-func (c *ResourceObjectManager) IsOperationSupported(oper string) bool {\r
-       return false\r
-}\r
-\r
-func (c *ResourceObjectManager) CreateEmptyObject() module.ControllerObject {\r
-       return &module.ResourceObject{}\r
-}\r
-\r
-func (c *ResourceObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error) {\r
-       // Currently no collections fetching supported\r
-       return ResourceObjectKey{\r
-               Cluster: m[OverlayResource] + "-" + m[DeviceResource],\r
-               Type:  m["Type"],\r
-               Name:  m["Name"],\r
-       }, nil\r
-}\r
-\r
-func (c *ResourceObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error) {\r
-       var v module.ResourceObject\r
-       err := json.NewDecoder(r).Decode(&v)\r
-       return &v, err\r
-}\r
-\r
-func (c *ResourceObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error) {\r
-       // DB Operation\r
-       t, err := GetDBUtils().CreateObject(c, m, t)\r
-       return t, err\r
-}\r
-\r
-func (c *ResourceObjectManager) GetObject(m map[string]string) (module.ControllerObject, error) {\r
-       // DB Operation\r
-       t, err := GetDBUtils().GetObject(c, m)\r
-       return t, err\r
-}\r
-\r
-func (c *ResourceObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error) {\r
-       return []module.ControllerObject{}, pkgerrors.New("Not implemented")\r
-}\r
-\r
-func (c *ResourceObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error) {\r
-       // DB Operation\r
-       t, err := GetDBUtils().UpdateObject(c, m, t)\r
-       return t, err\r
-}\r
-\r
-func (c *ResourceObjectManager) DeleteObject(m map[string]string) error {\r
-       // DB Operation\r
-       err := GetDBUtils().DeleteObject(c, m)\r
-       return err\r
-}\r
+/*
+ * Copyright 2020 Intel Corporation, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package manager
+
+import (
+       "encoding/json"
+       "io"
+
+       "github.com/akraino-edge-stack/icn-sdwan/central-controller/src/scc/pkg/module"
+       "github.com/open-ness/EMCO/src/orchestrator/pkg/infra/db"
+       pkgerrors "github.com/pkg/errors"
+)
+
+type ResourceObjectKey struct {
+       Cluster string `json:"cluster-info"`
+       Type    string `json:"type"`
+       Name    string `json:"name"`
+}
+
+// ResourceObjectManager implements the ControllerObjectManager
+type ResourceObjectManager struct {
+       BaseObjectManager
+}
+
+func NewResourceObjectManager() *ResourceObjectManager {
+       return &ResourceObjectManager{
+               BaseObjectManager{
+                       storeName:      StoreName,
+                       tagMeta:        "resource",
+                       depResManagers: []ControllerObjectManager{},
+                       ownResManagers: []ControllerObjectManager{},
+               },
+       }
+}
+
+func (c *ResourceObjectManager) GetResourceName() string {
+       return Resource
+}
+
+func (c *ResourceObjectManager) IsOperationSupported(oper string) bool {
+       return false
+}
+
+func (c *ResourceObjectManager) CreateEmptyObject() module.ControllerObject {
+       return &module.ResourceObject{}
+}
+
+func (c *ResourceObjectManager) GetStoreKey(m map[string]string, t module.ControllerObject, isCollection bool) (db.Key, error) {
+       // Currently no collections fetching supported
+       return ResourceObjectKey{
+               Cluster: m[OverlayResource] + "-" + m[DeviceResource],
+               Type:  m["Type"],
+               Name:  m["Name"],
+       }, nil
+}
+
+func (c *ResourceObjectManager) ParseObject(r io.Reader) (module.ControllerObject, error) {
+       var v module.ResourceObject
+       err := json.NewDecoder(r).Decode(&v)
+       return &v, err
+}
+
+func (c *ResourceObjectManager) CreateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error) {
+       // DB Operation
+       t, err := GetDBUtils().CreateObject(c, m, t)
+       return t, err
+}
+
+func (c *ResourceObjectManager) GetObject(m map[string]string) (module.ControllerObject, error) {
+       // DB Operation
+       t, err := GetDBUtils().GetObject(c, m)
+       return t, err
+}
+
+func (c *ResourceObjectManager) GetObjects(m map[string]string) ([]module.ControllerObject, error) {
+       return []module.ControllerObject{}, pkgerrors.New("Not implemented")
+}
+
+func (c *ResourceObjectManager) UpdateObject(m map[string]string, t module.ControllerObject) (module.ControllerObject, error) {
+       // DB Operation
+       t, err := GetDBUtils().UpdateObject(c, m, t)
+       return t, err
+}
+
+func (c *ResourceObjectManager) DeleteObject(m map[string]string) error {
+       // DB Operation
+       err := GetDBUtils().DeleteObject(c, m)
+       return err
+}
index 9b7587d..0cfce7e 100644 (file)
@@ -1,39 +1,39 @@
-/*\r
- * Copyright 2020 Intel Corporation, Inc\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package module\r
-\r
-// App contains metadata for Apps\r
-type ResourceObject struct {\r
-       Metadata      ObjectMetaData    `json:"metadata"`\r
-       Specification ResourceObjectSpec `json:"spec"`\r
-}\r
-\r
-//ResourceObjectSpec contains the parameters\r
-type ResourceObjectSpec struct {\r
-       Hash             string   `json:"hash"`\r
-       Ref                      int      `json:"ref"`\r
-       ContextId                string      `json:"cid"`\r
-       Status                   string      `json:"status"`\r
-}\r
-\r
-func (c *ResourceObject) GetMetadata() ObjectMetaData {\r
-       return c.Metadata\r
-}\r
-\r
-func (c *ResourceObject) GetType() string {\r
-       return "Resource"\r
+/*
+ * Copyright 2020 Intel Corporation, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package module
+
+// App contains metadata for Apps
+type ResourceObject struct {
+       Metadata      ObjectMetaData    `json:"metadata"`
+       Specification ResourceObjectSpec `json:"spec"`
+}
+
+//ResourceObjectSpec contains the parameters
+type ResourceObjectSpec struct {
+       Hash             string   `json:"hash"`
+       Ref                      int      `json:"ref"`
+       ContextId                string      `json:"cid"`
+       Status                   string      `json:"status"`
+}
+
+func (c *ResourceObject) GetMetadata() ObjectMetaData {
+       return c.Metadata
+}
+
+func (c *ResourceObject) GetType() string {
+       return "Resource"
 }
\ No newline at end of file
index cf2794f..1ed8382 100644 (file)
@@ -1,58 +1,58 @@
-/*\r
- * Copyright 2020 Intel Corporation, Inc\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package resource\r
-\r
-type RouteResource struct {\r
-       Name    string\r
-       Destination       string\r
-       Gateway string\r
-       Device       string\r
-       Table    string\r
-}\r
-\r
-func (c *RouteResource) GetName() string {\r
-       return c.Name\r
-}\r
-\r
-func (c *RouteResource) GetType() string {\r
-       return "Route"\r
-}\r
-\r
-func (c *RouteResource) ToYaml(target string) string {\r
-       basic := `apiVersion: ` + SdewanApiVersion + `\r
-kind: CNFRoute\r
-metadata:\r
-  name: ` + c.Name + `\r
-  namespace: default\r
-  labels:\r
-    sdewanPurpose: ` + SdewanPurpose + `\r
-    targetCluster: ` + target + `\r
-spec:\r
-  dst: ` + c.Destination + `\r
-  dev: "` + c.Device + `"\r
-  table: ` + c.Table\r
-\r
-       if c.Gateway != "" {\r
-              basic += `\r
-  gw: ` + c.Gateway\r
-  }\r
-       return basic\r
-}\r
-\r
-func init() {\r
-       GetResourceBuilder().Register("Route", &RouteResource{})\r
-}\r
+/*
+ * Copyright 2020 Intel Corporation, Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package resource
+
+type RouteResource struct {
+       Name    string
+       Destination       string
+       Gateway string
+       Device       string
+       Table    string
+}
+
+func (c *RouteResource) GetName() string {
+       return c.Name
+}
+
+func (c *RouteResource) GetType() string {
+       return "Route"
+}
+
+func (c *RouteResource) ToYaml(target string) string {
+       basic := `apiVersion: ` + SdewanApiVersion + `
+kind: CNFRoute
+metadata:
+  name: ` + c.Name + `
+  namespace: default
+  labels:
+    sdewanPurpose: ` + SdewanPurpose + `
+    targetCluster: ` + target + `
+spec:
+  dst: ` + c.Destination + `
+  dev: "` + c.Device + `"
+  table: ` + c.Table
+
+       if c.Gateway != "" {
+              basic += `
+  gw: ` + c.Gateway
+  }
+       return basic
+}
+
+func init() {
+       GetResourceBuilder().Register("Route", &RouteResource{})
+}
index 34eec6d..4e3ae8b 100644 (file)
@@ -1,4 +1,4 @@
-{\r
-"rsync-ip": "",\r
-"rsync-port": "9041"\r
-}\r
+{
+"rsync-ip": "",
+"rsync-port": "9041"
+}
index bc00c04..cc2890c 100644 (file)
@@ -1,4 +1,4 @@
-{\r
-"etcd-ip": "",\r
-"database-ip": ""\r
-}\r
+{
+"etcd-ip": "",
+"database-ip": ""
+}
index 6362204..20fb99e 100644 (file)
@@ -1,6 +1,6 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2020 Intel Corporation\r
-\r
-  ewo:\r
-    host: localhost\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+  ewo:
+    host: localhost
     port: 9015
\ No newline at end of file
index cb8e7b6..8f72394 100644 (file)
@@ -1,23 +1,23 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2020 Intel Corporation\r
-\r
-# creating overlay1\r
-version: ewo/v1\r
-resourceContext:\r
-  anchor: overlays\r
-metadata:\r
-  name: overlay1\r
-  description: \r
-  userData1: \r
-  userData2: \r
-\r
----\r
-# creating overlay2\r
-version: ewo/v1\r
-resourceContext:\r
-  anchor: overlays\r
-metadata:\r
-  name: overlay2\r
-  description: \r
-  userData1: \r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+# creating overlay1
+version: ewo/v1
+resourceContext:
+  anchor: overlays
+metadata:
+  name: overlay1
+  description: 
+  userData1: 
+  userData2: 
+
+---
+# creating overlay2
+version: ewo/v1
+resourceContext:
+  anchor: overlays
+metadata:
+  name: overlay2
+  description: 
+  userData1: 
   userData2: 
\ No newline at end of file
index 4439e61..ae26ecd 100644 (file)
@@ -1,7 +1,7 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2020 Intel Corporation\r
-\r
-OverlayName: overlay1\r
-ProposalName: proposal1\r
-IPRangelName: iprange1\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2020 Intel Corporation
+
+OverlayName: overlay1
+ProposalName: proposal1
+IPRangelName: iprange1
 DeviceName: device1
\ No newline at end of file
index 8e37b5c..4674501 100644 (file)
@@ -1,11 +1,11 @@
-module github.com/open-ness/EMCO/src/orchestrator\r
-\r
-require (\r
-        github.com/open-ness/EMCO/src/rsync v0.0.0-00010101000000-000000000000\r
-)\r
-\r
-replace (\r
-        github.com/open-ness/EMCO/src/rsync => ../../../../../rsync\r
-)\r
-\r
-go 1.17\r
+module github.com/open-ness/EMCO/src/orchestrator
+
+require (
+        github.com/open-ness/EMCO/src/rsync v0.0.0-00010101000000-000000000000
+)
+
+replace (
+        github.com/open-ness/EMCO/src/rsync => ../../../../../rsync
+)
+
+go 1.17
index 9aee0ee..0b99236 100644 (file)
@@ -1,11 +1,11 @@
-module github.com/open-ness/EMCO/src/orchestrator\r
-\r
-require (\r
-        github.com/open-ness/EMCO/src/rsync v0.0.0-00010101000000-000000000000\r
-)\r
-\r
-replace (\r
-        github.com/open-ness/EMCO/src/rsync => ../../../../../../rsync\r
-)\r
-\r
-go 1.17\r
+module github.com/open-ness/EMCO/src/orchestrator
+
+require (
+        github.com/open-ness/EMCO/src/rsync v0.0.0-00010101000000-000000000000
+)
+
+replace (
+        github.com/open-ness/EMCO/src/rsync => ../../../../../../rsync
+)
+
+go 1.17
index 3f7fe64..fdf81e6 100644 (file)
@@ -1,47 +1,47 @@
-/*\r
-* Copyright 2018 TechMahindra\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the "License");\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-*     http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an "AS IS" BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
- */\r
-\r
-package auth\r
-\r
-import (\r
-       "crypto/tls"\r
-       "testing"\r
-)\r
-\r
-//Unit test to varify GetTLSconfig func and varify the tls config min version to be 771\r
-//Assuming cert file name as auth_test.cert\r
-func TestGetTLSConfig(t *testing.T) {\r
-       _, err := GetTLSConfig("filedoesnotexist.cert", "filedoesnotexist.cert", "filedoesnotexist.cert")\r
-       if err == nil {\r
-               t.Errorf("Test failed, expected error but got none")\r
-       }\r
-       tlsConfig, err := GetTLSConfig("../../../tests/certs/auth_test_certificate.pem",\r
-               "../../../tests/certs/auth_test_certificate.pem",\r
-               "../../../tests/certs/auth_test_key.pem")\r
-       if err != nil {\r
-               t.Fatal("Test Failed as GetTLSConfig returned error: " + err.Error())\r
-       }\r
-       expected := tls.VersionTLS12\r
-       actual := tlsConfig.MinVersion\r
-       if tlsConfig != nil {\r
-               if int(actual) != expected {\r
-                       t.Errorf("Test Failed due to version mismatch")\r
-               }\r
-               if tlsConfig == nil {\r
-                       t.Errorf("Test Failed due to GetTLSConfig returned nil")\r
-               }\r
-       }\r
-}\r
+/*
+* Copyright 2018 TechMahindra
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+ */
+
+package auth
+
+import (
+       "crypto/tls"
+       "testing"
+)
+
+//Unit test to varify GetTLSconfig func and varify the tls config min version to be 771
+//Assuming cert file name as auth_test.cert
+func TestGetTLSConfig(t *testing.T) {
+       _, err := GetTLSConfig("filedoesnotexist.cert", "filedoesnotexist.cert", "filedoesnotexist.cert")
+       if err == nil {
+               t.Errorf("Test failed, expected error but got none")
+       }
+       tlsConfig, err := GetTLSConfig("../../../tests/certs/auth_test_certificate.pem",
+               "../../../tests/certs/auth_test_certificate.pem",
+               "../../../tests/certs/auth_test_key.pem")
+       if err != nil {
+               t.Fatal("Test Failed as GetTLSConfig returned error: " + err.Error())
+       }
+       expected := tls.VersionTLS12
+       actual := tlsConfig.MinVersion
+       if tlsConfig != nil {
+               if int(actual) != expected {
+                       t.Errorf("Test Failed due to version mismatch")
+               }
+               if tlsConfig == nil {
+                       t.Errorf("Test Failed due to GetTLSConfig returned nil")
+               }
+       }
+}
index ef000c3..defc814 100644 (file)
@@ -1,10 +1,10 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2021 Intel Corporation\r
-# The following patch adds a directive for certmanager to inject CA into the CRD\r
-# CRD conversion requires k8s 1.13 or later.\r
-apiVersion: apiextensions.k8s.io/v1\r
-kind: CustomResourceDefinition\r
-metadata:\r
-  annotations:\r
-    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)\r
-  name: cnflocalservices.batch.sdewan.akraino.org\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2021 Intel Corporation
+# The following patch adds a directive for certmanager to inject CA into the CRD
+# CRD conversion requires k8s 1.13 or later.
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  annotations:
+    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
+  name: cnflocalservices.batch.sdewan.akraino.org
index 814fd7b..b35df34 100644 (file)
@@ -1,10 +1,10 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2021 Intel Corporation\r
-# The following patch adds a directive for certmanager to inject CA into the CRD\r
-# CRD conversion requires k8s 1.13 or later.\r
-apiVersion: apiextensions.k8s.io/v1\r
-kind: CustomResourceDefinition\r
-metadata:\r
-  annotations:\r
-    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)\r
-  name: cnfnats.batch.sdewan.akraino.org\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2021 Intel Corporation
+# The following patch adds a directive for certmanager to inject CA into the CRD
+# CRD conversion requires k8s 1.13 or later.
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  annotations:
+    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
+  name: cnfnats.batch.sdewan.akraino.org
index 051c611..a18ea0f 100644 (file)
@@ -1,19 +1,19 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2021 Intel Corporation\r
-# The following patch enables conversion webhook for CRD\r
-# CRD conversion requires k8s 1.13 or later.\r
-apiVersion: apiextensions.k8s.io/v1\r
-kind: CustomResourceDefinition\r
-metadata:\r
-  name: cnflocalservices.batch.sdewan.akraino.org\r
-spec:\r
-  conversion:\r
-    strategy: Webhook\r
-    webhookClientConfig:\r
-      # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,\r
-      # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)\r
-      caBundle: Cg==\r
-      service:\r
-        namespace: system\r
-        name: webhook-service\r
-        path: /convert\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2021 Intel Corporation
+# The following patch enables conversion webhook for CRD
+# CRD conversion requires k8s 1.13 or later.
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  name: cnflocalservices.batch.sdewan.akraino.org
+spec:
+  conversion:
+    strategy: Webhook
+    webhookClientConfig:
+      # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
+      # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
+      caBundle: Cg==
+      service:
+        namespace: system
+        name: webhook-service
+        path: /convert
index 2b870e5..d86db7c 100644 (file)
@@ -1,19 +1,19 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2021 Intel Corporation\r
-# The following patch enables conversion webhook for CRD\r
-# CRD conversion requires k8s 1.13 or later.\r
-apiVersion: apiextensions.k8s.io/v1\r
-kind: CustomResourceDefinition\r
-metadata:\r
-  name: cnfnats.batch.sdewan.akraino.org\r
-spec:\r
-  conversion:\r
-    strategy: Webhook\r
-    webhookClientConfig:\r
-      # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,\r
-      # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)\r
-      caBundle: Cg==\r
-      service:\r
-        namespace: system\r
-        name: webhook-service\r
-        path: /convert\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2021 Intel Corporation
+# The following patch enables conversion webhook for CRD
+# CRD conversion requires k8s 1.13 or later.
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  name: cnfnats.batch.sdewan.akraino.org
+spec:
+  conversion:
+    strategy: Webhook
+    webhookClientConfig:
+      # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank,
+      # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager)
+      caBundle: Cg==
+      service:
+        namespace: system
+        name: webhook-service
+        path: /convert
index 08e1244..38c6877 100644 (file)
@@ -1,18 +1,18 @@
-# SPDX-License-Identifier: Apache-2.0\r
-# Copyright (c) 2021 Intel Corporation\r
----\r
-apiVersion: batch.sdewan.akraino.org/v1alpha1\r
-kind: CNFNAT\r
-metadata:\r
-  name: nat-sample\r
-  namespace: default\r
-  labels:\r
-    sdewanPurpose: cnf1\r
-spec:\r
-  src: iface1\r
-  src_ip: 192.168.1.2\r
-  src_dip: 1.2.3.4\r
-  dest: iface2\r
-  proto: tcp\r
-  target: DNAT\r
+# SPDX-License-Identifier: Apache-2.0
+# Copyright (c) 2021 Intel Corporation
+---
+apiVersion: batch.sdewan.akraino.org/v1alpha1
+kind: CNFNAT
+metadata:
+  name: nat-sample
+  namespace: default
+  labels:
+    sdewanPurpose: cnf1
+spec:
+  src: iface1
+  src_ip: 192.168.1.2
+  src_dip: 1.2.3.4
+  dest: iface2
+  proto: tcp
+  target: DNAT
 ...