🐛 Netmaker fails to refresh BW secrets on subsequent runs if already installed #190

Closed
opened 2024-03-25 06:43:17 +00:00 by cloudymax · 0 comments
cloudymax commented 2024-03-25 06:43:17 +00:00 (Migrated from github.com)

Describe the Bug

Netmaker installs cleanly on the first pass, however if you run smol-k8s-lab again netmaker can cause a crash in the following ways:

  1. Netmaker gets confused by the existing Zitadel apps and cannot return properly when checking roles/grants

  2. Netmake will fail to update the BW secrets if the smol-k8s config has been edited between runs

The current workaround is to uninstall the netmaker appset, clear the PVCs, then delete the zitadel app and role.

Steps to Reproduce Bug

  1. Run smol-k8s-lab with netmaker enabled on a system where netmaker is not yet installed

  2. Run smol-k8s-lab again

Expected behavior

The BW secrets should be updated if needed, and zitadel whould be gracefully skipped if it already exists

User info (please complete the following information):

  • OS release: Debian
  • Kubernetes distro: k3s
  • Version of smol-k8s-lab (You can get this with smol-k8s-lab --version): v3.4.0
  • Config file contents
 netmaker:
   enabled: true
   description: |
     [link=https://www.netmaker.io/]NetMaker[/link]®️  makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
   init:
     enabled: true
     values:
       user: admin
   argo:
     # secrets keys to make available to Argo CD ApplicationSets
     secret_keys:
       hostname: netmaker.buildstars.online
       admin_pannel_url: admin.netmaker.buildstars.online
       api_endpoint_url: netmaker-helm-chart-mqtt.netmaker.svc.cluster.local
       broker_endpoint_url: netmaker-helm-chart-mqtt.netmaker.svc.cluster.local
       auth_provider: oidc
     # git repo to install the Argo CD app from
     repo: https://github.com/small-hack/argocd-apps
     # path in the argo repo to point to. Trailing slash very important!
     path: demo/netmaker/app_of_apps/
     # either the branch or tag to point at in the argo repo above
     revision: main
     # namespace to install the k8s app in
     namespace: netmaker
     # recurse directories in the provided git repo
     directory_recursion: false
     # source repos for Argo CD App Project (in addition to argo.repo)
     project:
       source_repos:
       - https://github.com/jessebot/netmaker-helm
       - https://small-hack.github.io/netmaker-helm
       - https://github.com/small-hack/netmaker-helm
       - https://small-hack.github.io/netmaker-helm
       destination:
         # automatically includes the app's namespace and argocd's namespace
         namespaces: []
       name: netmaker

## Describe the Bug Netmaker installs cleanly on the first pass, however if you run smol-k8s-lab again netmaker can cause a crash in the following ways: 1. Netmaker gets confused by the existing Zitadel apps and cannot return properly when checking roles/grants 2. Netmake will fail to update the BW secrets if the smol-k8s config has been edited between runs The current workaround is to uninstall the netmaker appset, clear the PVCs, then delete the zitadel app and role. ### Steps to Reproduce Bug 1. Run smol-k8s-lab with netmaker enabled on a system where netmaker is not yet installed 2. Run smol-k8s-lab again #### Expected behavior The BW secrets should be updated if needed, and zitadel whould be gracefully skipped if it already exists ## User info (please complete the following information): - OS release: Debian - Kubernetes distro: `k3s` - Version of `smol-k8s-lab` (You can get this with `smol-k8s-lab --version`): v3.4.0 - Config file contents ```yaml netmaker: enabled: true description: | [link=https://www.netmaker.io/]NetMaker[/link]®️ makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks. init: enabled: true values: user: admin argo: # secrets keys to make available to Argo CD ApplicationSets secret_keys: hostname: netmaker.buildstars.online admin_pannel_url: admin.netmaker.buildstars.online api_endpoint_url: netmaker-helm-chart-mqtt.netmaker.svc.cluster.local broker_endpoint_url: netmaker-helm-chart-mqtt.netmaker.svc.cluster.local auth_provider: oidc # git repo to install the Argo CD app from repo: https://github.com/small-hack/argocd-apps # path in the argo repo to point to. Trailing slash very important! path: demo/netmaker/app_of_apps/ # either the branch or tag to point at in the argo repo above revision: main # namespace to install the k8s app in namespace: netmaker # recurse directories in the provided git repo directory_recursion: false # source repos for Argo CD App Project (in addition to argo.repo) project: source_repos: - https://github.com/jessebot/netmaker-helm - https://small-hack.github.io/netmaker-helm - https://github.com/small-hack/netmaker-helm - https://small-hack.github.io/netmaker-helm destination: # automatically includes the app's namespace and argocd's namespace namespaces: [] name: netmaker ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
small-hack/smol-k8s-lab#190
No description provided.