From 4022f8a43ea7dd25b5862d2c9ad46f20834c4c75 Mon Sep 17 00:00:00 2001 From: Mikhail Avramenko Date: Thu, 11 Nov 2021 10:15:03 +0700 Subject: [PATCH] added annotations for kernel clients Signed-off-by: Mikhail Avramenko --- .../admission-webhook.yaml | 2 + examples/basic/README.md | 7 +++ examples/features/dns/README.md | 6 --- .../features/ipv6/Kernel2Kernel/README.md | 42 +++++++++--------- .../ipv6/Kernel2Wireguard2Kernel/README.md | 43 +++++++++--------- .../ipv6/Kernel2Wireguard2Memif/README.md | 43 +++++++++--------- examples/features/nse-composition/README.md | 39 ++++++++-------- examples/features/webhook/README.md | 7 --- examples/memory/README.md | 11 ++++- examples/memory/kustomization.yaml | 1 + examples/use-cases/Kernel2Kernel/README.md | 41 +++++++++-------- examples/use-cases/Kernel2Memif/README.md | 41 +++++++++-------- .../use-cases/Kernel2Vxlan2Kernel/README.md | 44 ++++++++++--------- .../use-cases/Kernel2Vxlan2Memif/README.md | 44 ++++++++++--------- .../Kernel2Wireguard2Kernel/README.md | 44 ++++++++++--------- .../Kernel2Wireguard2Memif/README.md | 44 ++++++++++--------- 16 files changed, 243 insertions(+), 216 deletions(-) diff --git a/apps/admission-webhook-k8s/admission-webhook.yaml b/apps/admission-webhook-k8s/admission-webhook.yaml index a2f6218f9e68..2885115a7706 100644 --- a/apps/admission-webhook-k8s/admission-webhook.yaml +++ b/apps/admission-webhook-k8s/admission-webhook.yaml @@ -43,3 +43,5 @@ spec: value: ghcr.io/networkservicemesh/ci/cmd-nsc:ec2b945 - name: NSM_INIT_CONTAINER_IMAGES value: ghcr.io/networkservicemesh/ci/cmd-nsc-init:4d13f25 + - name: NSM_LABELS + value: spiffe.io/spiffe-id:true diff --git a/examples/basic/README.md b/examples/basic/README.md index 8163222efd47..4c4b19305e75 100644 --- a/examples/basic/README.md +++ b/examples/basic/README.md @@ -34,6 +34,13 @@ kubectl create ns nsm-system kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/basic?ref=1089cd64cd1c7e415ae7f92013a55bbfdfd8ea55 ``` +3. Wait for admission-webhook-k8s: + +```bash +WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') +kubectl wait --for=condition=ready --timeout=1m pod ${WH} -n nsm-system +``` + ## Cleanup To free resouces follow the next command: diff --git a/examples/features/dns/README.md b/examples/features/dns/README.md index 492a9ad74196..669b242019e3 100644 --- a/examples/features/dns/README.md +++ b/examples/features/dns/README.md @@ -9,12 +9,6 @@ Make sure that you have completed steps from [features](../) ## Run -Note: Admission webhook is required and should be started at this moment. -```bash -WH=$(kubectl get pods -l app=admission-webhook-k8s -n nsm-system --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') -kubectl wait --for=condition=ready --timeout=1m pod ${WH} -n nsm-system -``` - 1. Create test namespace: ```bash NAMESPACE=($(kubectl create -f https://raw.githubusercontent.com/networkservicemesh/deployments-k8s/1089cd64cd1c7e415ae7f92013a55bbfdfd8ea55/examples/features/namespace.yaml)[0]) diff --git a/examples/features/ipv6/Kernel2Kernel/README.md b/examples/features/ipv6/Kernel2Kernel/README.md index 0026cda0d608..dc35d4876071 100644 --- a/examples/features/ipv6/Kernel2Kernel/README.md +++ b/examples/features/ipv6/Kernel2Kernel/README.md @@ -27,37 +27,39 @@ kind: Kustomization namespace: ${NAMESPACE} +resources: +- client.yaml bases: -- https://github.com/networkservicemesh/deployments-k8s/apps/nsc-kernel?ref=1089cd64cd1c7e415ae7f92013a55bbfdfd8ea55 - https://github.com/networkservicemesh/deployments-k8s/apps/nse-kernel?ref=1089cd64cd1c7e415ae7f92013a55bbfdfd8ea55 patchesStrategicMerge: -- patch-nsc.yaml - patch-nse.yaml EOF ``` -Create NSC patch: +Create Client: ```bash -cat > patch-nsc.yaml < client.yaml < patch-nse.yaml < patch-nsc.yaml < client.yaml < patch-nsc.yaml < client.yaml < patch-nse.yaml < patch-nsc.yaml < client.yaml < patch-nse.yaml < patch-nsc.yaml < client.yaml < patch-nsc.yaml < client.yaml < patch-nsc.yaml < client.yaml < patch-nse.yaml < patch-nsc.yaml < client.yaml < patch-nse.yaml < patch-nsc.yaml < client.yaml < patch-nse.yaml < patch-nsc.yaml < client.yaml < patch-nse.yaml <