Conversation
- storing k3s server api and node token in a secret
- added new clusterrole and clusterrole binding for controller
- added dependencies - added script
works: deployment on worker node wip: metrics collection from worker node
works: metrics collection from worker node wip: automation
- added status in nodes crd
| @@ -0,0 +1,69 @@ | |||
| {{- if .Values.postgresql.enabled -}} | |||
There was a problem hiding this comment.
We could consider switching to CloudNativePG one day. Not this time.
charts/simpipe/Chart.lock
Outdated
There was a problem hiding this comment.
I don't know if we should remove the .lock to be honest.
| resources: | ||
| requests: | ||
| memory: 512Mi | ||
| cpu: 250m | ||
| limits: | ||
| memory: 1Gi | ||
| cpu: 1000m |
There was a problem hiding this comment.
I'm usually not a fan of having this set by default because it's more annoying than useful in my opinion.
| requests: | ||
| memory: 256Mi | ||
| cpu: 250m | ||
| limits: | ||
| memory: 1Gi | ||
| cpu: 1000m |
There was a problem hiding this comment.
Also defaults that could be left unset.
charts/simpipe/values.yaml
Outdated
| simpipeRefreshInterval: 3s | ||
| simpipeScrapeTimeout: 2s | ||
| simpipeRefreshInterval: 7s | ||
| simpipeScrapeTimeout: 7s |
There was a problem hiding this comment.
Are those the new values that are HP compatible ?
There was a problem hiding this comment.
Yes actually these values can be changed back since we are doing virtualization (must faster) instead of emulation.
| if (osInfo.ID === 'debian') { | ||
| return 'debian13'; | ||
| } |
There was a problem hiding this comment.
I'm not convinced about this code snippet long term.
controller/src/argo/test
Outdated
| - iptables -A INPUT -p udp --dport 8472 -j ACCEPT | ||
|
|
||
| # Start K3s agent only after Docker is ready | ||
| - curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.33.4+k3s1 INSTALL_K3S_EXEC="agent --docker" K3S_URL=${K3S_SERVER_URL} K3S_TOKEN=${K3S_TOKEN} sh - |
There was a problem hiding this comment.
Here we are hardcoding k3s version and also installing it without ansible. I guess it's fine but we may have some mismatches long term.
There was a problem hiding this comment.
Moving the version number to a config variable for now.
| - bash -c 'ip route del default via 172.30.0.1 dev lo || true' | ||
|
|
||
| # Start K3s agent (let k3s/flannel pick the interface/IP based on the | ||
| - curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.33.4+k3s1 INSTALL_K3S_EXEC="agent --docker" K3S_URL=${K3S_SERVER_URL} K3S_TOKEN=${K3S_TOKEN} sh - |
| DNS1=$(awk '/^nameserver/{print $2; exit}' /etc/resolv.conf) | ||
| fi | ||
| if [ -z "$DNS1" ]; then | ||
| DNS1="10.43.0.10" |
There was a problem hiding this comment.
The last time we were using Google DNS, and this time a local DNS resolver. Is this specific to WSL ?
controller/src/k8s/api-tokens.ts
Outdated
| function maskSecret(value: string): string | undefined { | ||
| const trimmed = value.trim(); | ||
| if (!trimmed) return undefined; | ||
| if (trimmed.length <= 4) return '*'.repeat(trimmed.length); | ||
|
|
||
| const prefix = trimmed.slice(0, 2); | ||
| const suffix = trimmed.slice(-2); | ||
| const maskLength = Math.min(Math.max(trimmed.length - 4, 4), 12); | ||
| return `${prefix}${'*'.repeat(maskLength)}${suffix}`; | ||
| } |
There was a problem hiding this comment.
Yep, this isn't safe.
| function maskSecret(value: string): string | undefined { | |
| const trimmed = value.trim(); | |
| if (!trimmed) return undefined; | |
| if (trimmed.length <= 4) return '*'.repeat(trimmed.length); | |
| const prefix = trimmed.slice(0, 2); | |
| const suffix = trimmed.slice(-2); | |
| const maskLength = Math.min(Math.max(trimmed.length - 4, 4), 12); | |
| return `${prefix}${'*'.repeat(maskLength)}${suffix}`; | |
| } | |
| function maskSecret(value: string): string { | |
| return "************"; | |
| } |
controller/src/k8s/api-tokens.ts
Outdated
|
|
||
| return { | ||
| hasValue: true, | ||
| maskedPreview: maskSecret(trimmed), |
There was a problem hiding this comment.
Or even better:
| maskedPreview: maskSecret(trimmed), | |
| maskedPreview: "************" |
| const processTable = await getProcessTable(); | ||
| if (!processTable) return false; |
There was a problem hiding this comment.
So now we assume that simpipe's controller run on the qemu host, which is a significant thing in the architecture.
controller/Dockerfile
Outdated
| wget -O /app/images/ubuntu-18.qcow2 https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img && \ | ||
| wget -O /app/images/ubuntu-20.qcow2 https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img && \ | ||
| wget -O /app/images/ubuntu-22.qcow2 https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img && \ | ||
| wget -O /app/images/ubuntu-24.qcow2 https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img |
There was a problem hiding this comment.
That creates a huge container. Shouldn't we download that at runtime in a volume.
cloud.iso
Outdated
install.py
Outdated
| except subprocess.CalledProcessError as e: | ||
| print(f"❌ Error while installing helm-diff plugin: {e}") | ||
| sys.exit(1) | ||
| print("ℹ️ Skipping helm-diff plugin (not required for SIM-PIPE).") |
There was a problem hiding this comment.
We could probably just remove all mention to helm diff.
meta-data
Outdated
network-config
Outdated
There was a problem hiding this comment.
this one may have to go as well?
user-data
Outdated
|
Alright, I made some comments. Overall I think it's mostly the secret thing that should be fixed. We shouldn't disclose the size of the secret nor the beginning and the end in my opinion. I'm not a svelte developer so I couldn't asses the frontend code very well but it did sound fair. Overall, for the record, I'm not sure where this is going long term. We have moose now, not sure why, I have said it in person already, but this sounds like out of scope. The project is now very much about virtualisation with qemu, which is fine. Perhaps one could have used kubevirt instead of making qemu from scratch in kubernetes, but i don't know the pros and cons. I think someone didn't like helm diff :D We are overall running quite old dependencies at this point, but for a low TRL demo this is fine. |
Main features added