From 42b098422e096b86a6834bbe1449563a39f6230f Mon Sep 17 00:00:00 2001 From: Dejan Bosanac Date: Thu, 13 Oct 2022 13:57:47 +0200 Subject: [PATCH] Support installing gateway using OCM --- DEVELOPING.md | 9 +++++++++ deployments/gateways/README.adoc | 10 ++++++++++ .../gateways/gateway-daemonset.yaml | 0 deployments/gateways/placement.yaml | 8 ++++++++ 4 files changed, 27 insertions(+) rename infra/gateway/develop/gateway-k8s.yaml => deployments/gateways/gateway-daemonset.yaml (100%) create mode 100644 deployments/gateways/placement.yaml diff --git a/DEVELOPING.md b/DEVELOPING.md index c5f02686..4acc49e0 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -55,6 +55,15 @@ develop/init.sh # only the first time and when you want to reset gateway state docker-compose -f develop/gateway-compose.yaml up ``` +## Start gateway in Kubernetes + +If you have installed local kubernetes cluster like MicroShift, you can deploy gateway (along with the mesh) with + +``` +kubectl create namespace eclipsecon-gateway +kubectl apply -n eclipsecon-gateway -f deployments/gateways/gateway-daemonset.yaml +``` + ## Installing softdevice on microbit (only needed first time) Download the [softdevice](https://www.nordicsemi.com/Products/Development-software/S140/Download) and unpack. diff --git a/deployments/gateways/README.adoc b/deployments/gateways/README.adoc index 90d623e8..d65eec3d 100644 --- a/deployments/gateways/README.adoc +++ b/deployments/gateways/README.adoc @@ -258,6 +258,16 @@ oc delete crd klusterlets.operator.open-cluster-management.io === Rollout the gateway application +You can deploy gateway on each cluster in a set by creating a `placement` and appropriate work for it + +[source,shell] +---- +kubectl apply -n eclipsecon-2022 -f placement.yaml +clusteradm create work eclipsecon-gateway -f gateway-daemonset.yaml --placement gateway +---- + +=== Rollout the gateway application using work manifest + For each gateway, create the following resource in its (gateway) namespace: [source,yaml] diff --git a/infra/gateway/develop/gateway-k8s.yaml b/deployments/gateways/gateway-daemonset.yaml similarity index 100% rename from infra/gateway/develop/gateway-k8s.yaml rename to deployments/gateways/gateway-daemonset.yaml diff --git a/deployments/gateways/placement.yaml b/deployments/gateways/placement.yaml new file mode 100644 index 00000000..e6002e7c --- /dev/null +++ b/deployments/gateways/placement.yaml @@ -0,0 +1,8 @@ +apiVersion: cluster.open-cluster-management.io/v1beta1 +kind: Placement +metadata: + name: gateway + namespace: eclipsecon-2022 +spec: + clusterSets: + - eclipsecon