From cf9c1b52795bdf7b20de4508a8e33b66b895731d 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 31c4f0d95d31..af25fd8abfc4 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:15b8e5e - name: NSM_INIT_CONTAINER_IMAGES value: ghcr.io/networkservicemesh/ci/cmd-nsc-init:f28a231 + - name: NSM_LABELS + value: spiffe.io/spiffe-id:true \ No newline at end of file diff --git a/examples/basic/README.md b/examples/basic/README.md index 23d44bf30abe..09b046deb470 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=ff69adca767822ce0c9fb55aba74eb3bad3a0e37 ``` +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 39428ce16984..11594b529040 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/ff69adca767822ce0c9fb55aba74eb3bad3a0e37/examples/features/namespace.yaml)[0]) diff --git a/examples/features/ipv6/Kernel2Kernel/README.md b/examples/features/ipv6/Kernel2Kernel/README.md index caf75d47d9f9..a37217539169 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=ff69adca767822ce0c9fb55aba74eb3bad3a0e37 - https://github.com/networkservicemesh/deployments-k8s/apps/nse-kernel?ref=ff69adca767822ce0c9fb55aba74eb3bad3a0e37 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 <