From bc2c38f8fc49771f99b8285541517dba8d5fe663 Mon Sep 17 00:00:00 2001 From: Juan Veras Date: Mon, 20 Jun 2022 15:28:10 -0400 Subject: [PATCH 1/4] Bookinfo namespace onboarding --- ec2/terraform/main.tf | 6 +++--- kind/slice.template.yaml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ec2/terraform/main.tf b/ec2/terraform/main.tf index 328a073..037abcf 100644 --- a/ec2/terraform/main.tf +++ b/ec2/terraform/main.tf @@ -55,7 +55,7 @@ resource "aws_instance" "ubuntu-ec2" { provisioner "remote-exec" { inline = [ "cd /tmp/examples", - "git checkout ec2", + "git checkout bookinfo", "chmod +x /tmp/examples/ec2/install_dependencies.sh", "cd /tmp/examples/ec2; ./install_dependencies.sh", "sudo usermod -aG docker $USER", @@ -67,7 +67,7 @@ resource "aws_instance" "ubuntu-ec2" { provisioner "remote-exec" { inline = [ "cd /tmp/examples", - "git checkout ec2", + "git checkout bookinfo", "chmod +x /tmp/examples/kind/kind.sh", "cd /tmp/examples/kind; ./kind.sh", ] @@ -76,7 +76,7 @@ resource "aws_instance" "ubuntu-ec2" { provisioner "remote-exec" { inline = [ "cd /tmp/examples", - "git checkout ec2", + "git checkout bookinfo", "chmod +x /tmp/examples/kind/bookinfo/bookinfo.sh", "cd /tmp/examples/kind/bookinfo; ./bookinfo.sh", ] diff --git a/kind/slice.template.yaml b/kind/slice.template.yaml index d19ec58..b437f76 100644 --- a/kind/slice.template.yaml +++ b/kind/slice.template.yaml @@ -23,6 +23,9 @@ spec: - namespace: iperf clusters: - '*' + - namespace: bookinfo + clusters: + - '*' isolationEnabled: false #make this true in case you want to enable isolation allowedNamespaces: - namespace: kube-system From de2367784a53e7b438443c0d9cb8638377b9d704 Mon Sep 17 00:00:00 2001 From: Juan Veras Date: Mon, 20 Jun 2022 15:34:52 -0400 Subject: [PATCH 2/4] Bookinfo namespace onboarding --- kind/kind.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/kind/kind.sh b/kind/kind.sh index f6cf3d2..89adf47 100755 --- a/kind/kind.sh +++ b/kind/kind.sh @@ -267,6 +267,7 @@ for WORKER in ${WORKERS[@]}; do sleep 60 kubectl get pods -n kubeslice-system kubectl create ns iperf + kubectl create ns bookinfo done sleep 60 From 5c4e5760c70e471216bf193f64b4ca646bb3ab7b Mon Sep 17 00:00:00 2001 From: Juan Veras Date: Mon, 20 Jun 2022 16:53:03 -0400 Subject: [PATCH 3/4] Removing slice name from config files --- kind/bookinfo/config_files/details.yaml | 2 -- kind/bookinfo/config_files/productpage.yaml | 2 -- kind/bookinfo/config_files/ratings.yaml | 2 -- kind/bookinfo/config_files/reviews.yaml | 2 -- kind/bookinfo/config_files/serviceexports.yaml | 8 ++++---- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/kind/bookinfo/config_files/details.yaml b/kind/bookinfo/config_files/details.yaml index 3433aa0..6c6175b 100644 --- a/kind/bookinfo/config_files/details.yaml +++ b/kind/bookinfo/config_files/details.yaml @@ -26,8 +26,6 @@ apiVersion: apps/v1 kind: Deployment metadata: name: details-v1 - annotations: - avesha.io/slice: convoy labels: app: details version: v1 diff --git a/kind/bookinfo/config_files/productpage.yaml b/kind/bookinfo/config_files/productpage.yaml index a84cfa8..53ea7bf 100644 --- a/kind/bookinfo/config_files/productpage.yaml +++ b/kind/bookinfo/config_files/productpage.yaml @@ -27,8 +27,6 @@ apiVersion: apps/v1 kind: Deployment metadata: name: productpage-v1 - annotations: - avesha.io/slice: convoy labels: app: productpage version: v1 diff --git a/kind/bookinfo/config_files/ratings.yaml b/kind/bookinfo/config_files/ratings.yaml index eb1783b..11137a1 100644 --- a/kind/bookinfo/config_files/ratings.yaml +++ b/kind/bookinfo/config_files/ratings.yaml @@ -26,8 +26,6 @@ apiVersion: apps/v1 kind: Deployment metadata: name: ratings-v1 - annotations: - avesha.io/slice: convoy labels: app: ratings version: v1 diff --git a/kind/bookinfo/config_files/reviews.yaml b/kind/bookinfo/config_files/reviews.yaml index 08c55ae..1e71dbc 100644 --- a/kind/bookinfo/config_files/reviews.yaml +++ b/kind/bookinfo/config_files/reviews.yaml @@ -26,8 +26,6 @@ apiVersion: apps/v1 kind: Deployment metadata: name: reviews-v3 - annotations: - avesha.io/slice: convoy labels: app: reviews version: v3 diff --git a/kind/bookinfo/config_files/serviceexports.yaml b/kind/bookinfo/config_files/serviceexports.yaml index 9b37d65..b495716 100644 --- a/kind/bookinfo/config_files/serviceexports.yaml +++ b/kind/bookinfo/config_files/serviceexports.yaml @@ -1,7 +1,7 @@ ################################################################################## # Details ServiceExport ################################################################################## -apiVersion: networking.kubeslice.io/v1beta1 +apiVersion: mesh.avesha.io/v1beta1 kind: ServiceExport metadata: name: details @@ -10,7 +10,7 @@ spec: selector: matchLabels: app: details - ingressEnabled: false + ingressEnabled: false ports: - name: http containerPort: 9080 @@ -19,7 +19,7 @@ spec: ################################################################################## # Reviews ServiceExport ################################################################################## -apiVersion: networking.kubeslice.io/v1beta1 +apiVersion: mesh.avesha.io/v1beta1 kind: ServiceExport metadata: name: reviews @@ -28,7 +28,7 @@ spec: selector: matchLabels: app: reviews - ingressEnabled: false + ingressEnabled: false ports: - name: http containerPort: 9080 From ef1a7262a38e6b683eac1964741558fdb2cf256d Mon Sep 17 00:00:00 2001 From: Juan Veras Date: Tue, 21 Jun 2022 10:27:30 -0400 Subject: [PATCH 4/4] Changed apiVersion to opensource schema --- kind/bookinfo/config_files/serviceexports.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kind/bookinfo/config_files/serviceexports.yaml b/kind/bookinfo/config_files/serviceexports.yaml index b495716..219d447 100644 --- a/kind/bookinfo/config_files/serviceexports.yaml +++ b/kind/bookinfo/config_files/serviceexports.yaml @@ -1,7 +1,7 @@ ################################################################################## # Details ServiceExport ################################################################################## -apiVersion: mesh.avesha.io/v1beta1 +apiVersion: networking.kubeslice.io/v1beta1 kind: ServiceExport metadata: name: details @@ -19,7 +19,7 @@ spec: ################################################################################## # Reviews ServiceExport ################################################################################## -apiVersion: mesh.avesha.io/v1beta1 +apiVersion: networking.kubeslice.io/v1beta1 kind: ServiceExport metadata: name: reviews