From efc7aa42ade4429ce5fb77cba1ca38a6d398283d Mon Sep 17 00:00:00 2001
From: Harald Mueller <h.mueller@siemens.com>
Date: Thu, 8 Feb 2024 14:40:13 +0100
Subject: [PATCH] Change namespace to codeco-swm...

---
 Documentation/quick-start-oss.md                         | 2 +-
 helm/qos-scheduler/charts/cni/templates/daemonset.yaml   | 1 +
 helm/qos-scheduler/charts/controller/values.yaml         | 2 +-
 helm/qos-scheduler/charts/network/templates/_helpers.tpl | 2 +-
 helm/qos-scheduler/charts/optimizer/values.yaml          | 2 +-
 helm/qos-scheduler/charts/solver/values.yaml             | 2 +-
 helm/qos-scheduler/values.yaml                           | 4 ++--
 start_cluster.sh                                         | 7 +++----
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Documentation/quick-start-oss.md b/Documentation/quick-start-oss.md
index 38903c0..87f3f57 100644
--- a/Documentation/quick-start-oss.md
+++ b/Documentation/quick-start-oss.md
@@ -76,7 +76,7 @@ Steps for getting a demo to run on a local Linux Helm environment and a local Ki
 
   ```bash
   make chart
-  helm install qostest --namespace=controllers-system --create-namespace tmp/helm
+  helm install qostest --namespace=codeco-swm-controllers --create-namespace tmp/helm
   ```
 
 - Show network topology/ network links (Custom Resources)
diff --git a/helm/qos-scheduler/charts/cni/templates/daemonset.yaml b/helm/qos-scheduler/charts/cni/templates/daemonset.yaml
index 94e14b7..d99a189 100644
--- a/helm/qos-scheduler/charts/cni/templates/daemonset.yaml
+++ b/helm/qos-scheduler/charts/cni/templates/daemonset.yaml
@@ -53,6 +53,7 @@ spec:
           args: ["cd /host/opt/cni/bin && wget https://github.com/containernetworking/plugins/releases/download/v1.0.1/cni-plugins-linux-amd64-v1.0.1.tgz -O cni-plugins-linux-amd64-v1.0.1.tgz && tar xzf cni-plugins-linux-amd64-v1.0.1.tgz"]
           securityContext:
             privileged: true
+            runAsUser: 0
           volumeMounts:
             - name: cnibin
               mountPath: /host/opt/cni/bin
diff --git a/helm/qos-scheduler/charts/controller/values.yaml b/helm/qos-scheduler/charts/controller/values.yaml
index dd385e6..5b94495 100644
--- a/helm/qos-scheduler/charts/controller/values.yaml
+++ b/helm/qos-scheduler/charts/controller/values.yaml
@@ -7,7 +7,7 @@ global:
       tag: latest
       pullSecrets: []
       credentials: {}
-   qosNamespace: controllers-system
+   qosNamespace: codeco-swm-controllers
 
 # Default values for controller.
 serviceAccount:
diff --git a/helm/qos-scheduler/charts/network/templates/_helpers.tpl b/helm/qos-scheduler/charts/network/templates/_helpers.tpl
index 11c79f0..2a76695 100644
--- a/helm/qos-scheduler/charts/network/templates/_helpers.tpl
+++ b/helm/qos-scheduler/charts/network/templates/_helpers.tpl
@@ -3,7 +3,7 @@
 
 
 {{- define "namespace" -}}
-{{ cat "network-" . "-namespace" | lower | nospace }}
+{{ cat "codeco-nw-" . "-ns" | lower | nospace }}
 {{- end }}
 
 {{- define "role" -}}
diff --git a/helm/qos-scheduler/charts/optimizer/values.yaml b/helm/qos-scheduler/charts/optimizer/values.yaml
index 29ab072..a88a1f0 100644
--- a/helm/qos-scheduler/charts/optimizer/values.yaml
+++ b/helm/qos-scheduler/charts/optimizer/values.yaml
@@ -9,7 +9,7 @@ global:
       tag: latest
       pullSecrets: []
       credentials: {}
-   qosNamespace: controllers-system
+   qosNamespace: codeco-swm-controllers
 
 serviceAccount:
    create: true
diff --git a/helm/qos-scheduler/charts/solver/values.yaml b/helm/qos-scheduler/charts/solver/values.yaml
index 456ec92..042332f 100644
--- a/helm/qos-scheduler/charts/solver/values.yaml
+++ b/helm/qos-scheduler/charts/solver/values.yaml
@@ -7,7 +7,7 @@ global:
       tag: latest
       pullSecrets: []
       credentials: {}
-   qosNamespace: controllers-system
+   qosNamespace: codeco-swm-controllers
 
 # Default values for solver.
 
diff --git a/helm/qos-scheduler/values.yaml b/helm/qos-scheduler/values.yaml
index a153157..9bfd712 100644
--- a/helm/qos-scheduler/values.yaml
+++ b/helm/qos-scheduler/values.yaml
@@ -6,7 +6,7 @@
 # Declare variables to be passed into your templates.
 
 global:
-   qosNamespace: controllers-system
+   qosNamespace: codeco-swm-controllers
    network:
    image:
       repositoryPrefix: hecodeco/swm-
@@ -56,4 +56,4 @@ solver:
 nsconfig:
    namespaces:
     - kube-system
-    - controllers-system
+    - codeco-swm-controllers
diff --git a/start_cluster.sh b/start_cluster.sh
index c18ec50..c29d582 100755
--- a/start_cluster.sh
+++ b/start_cluster.sh
@@ -11,7 +11,7 @@ set -euo pipefail
 
 # This is the path from where this is being called from to where the script lives.
 SCRIPTHOME=$(dirname $(realpath "$0"))
-SED=${SED:-"gsed"}
+# SED=${SED:-"gsed"}
 DOCKERCONFIGJSON=${DOCKERCONFIGJSON:-"$HOME/.docker/config.json"}
 
 # When you set this, make sure you've compiled the code for a compatible
@@ -22,7 +22,8 @@ NODEK8SVERSION=${NODEK8SVERSION:-v1.23.1}
 
 CONFIGDIR="demo"
 
-$SED --follow-symlinks -i "s/image: kindest\/node:v[[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+/image: kindest\/node:$NODEK8SVERSION/" $SCRIPTHOME/config/${CONFIGDIR}/cluster-config.yaml
+# $SED --follow-symlinks -i "s/image: kindest\/node:v[[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+/image: kindest\/node:$NODEK8SVERSION/" $SCRIPTHOME/config/${CONFIGDIR}/cluster-config.yaml
+sed --follow-symlinks -i "s/image: kindest\/node:v[[:digit:]]\+.[[:digit:]]\+.[[:digit:]]\+/image: kindest\/node:$NODEK8SVERSION/" $SCRIPTHOME/config/${CONFIGDIR}/cluster-config.yaml
 
 echo "creating ${CONFIGDIR} qos-scheduling cluster using Kubernetes version $NODEK8SVERSION"
 
@@ -40,5 +41,3 @@ for n in $NODES; do
   kubectl label --overwrite nodes $n $NODE_LABEL_PREFIX.$n=
 done
 
-kubectl label --overwrite node c1 $NODE_LABEL_PREFIX.restapidb=
-
-- 
GitLab