SEBA-749 Initial Checkin of nem-ondemand-proxy;
Add Makefile
Add Kubernetes yaml and scripts
Change-Id: Ic76d2a68bb11a95d5d57a04f1fab373ec36c0958
diff --git a/kubernetes/nem-ondemand-proxy.yaml b/kubernetes/nem-ondemand-proxy.yaml
new file mode 100644
index 0000000..6cb4f2f
--- /dev/null
+++ b/kubernetes/nem-ondemand-proxy.yaml
@@ -0,0 +1,54 @@
+# Copyright 2018-present Open Networking Foundation
+#
+# 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.
+
+---
+
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+ name: nem-ondemand-proxy
+ labels:
+ app: nem-ondemand-proxy
+ chart: nem-ondemand-proxy
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: nem-ondemand-proxy
+ template:
+ metadata:
+ labels:
+ app: nem-ondemand-proxy
+ spec:
+ containers:
+ - name: nem-ondemand-proxy
+ image: smbaker/nem-ondemand-proxy:test
+ imagePullPolicy: Always
+ ports:
+ - containerPort: 50052
+ name: grpc
+
+---
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: nem-ondemand-proxy
+spec:
+ ports:
+ - name: grpc
+ port: 50052
+ targetPort: 50052
+ selector:
+ app: nem-ondemand-proxy
diff --git a/kubernetes/run-port-forward.sh b/kubernetes/run-port-forward.sh
new file mode 100644
index 0000000..fcd92ae
--- /dev/null
+++ b/kubernetes/run-port-forward.sh
@@ -0,0 +1,17 @@
+# Copyright 2018-present Open Networking Foundation
+#
+# 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.
+
+while [[ 1 ]]; do
+ kubectl port-forward service/nem-ondemand-proxy 50052:50052
+done
diff --git a/kubernetes/start-port-forward.sh b/kubernetes/start-port-forward.sh
new file mode 100644
index 0000000..752a00b
--- /dev/null
+++ b/kubernetes/start-port-forward.sh
@@ -0,0 +1,15 @@
+# Copyright 2018-present Open Networking Foundation
+#
+# 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.
+
+nohup bash ./run-port-forward.sh > /tmp/ondemand-port-forward.out 2> /tmp/ondemand-port-forward.err &