small-hack / smol-k8s-lab

☁️ CLI & TUI with a smol friendly vibe to get started with Kubernetes on metal, then bootstrap apps using Argo CD 🧸 Great for testing webapps and benchmarking.
https://small-hack.github.io/smol-k8s-lab/
GNU Affero General Public License v3.0
12 stars 1 forks source link

Feature Request: Allow specification of ArgoCD App destination server in smol-k8s-lab config.yaml #211

Closed cloudymax closed 4 months ago

cloudymax commented 5 months ago

Describe the feature you'd like, and why

Id like to be able to specify the name of the server/cluster to deploy the argo app to instead of always going to 'in-cluster'

Examples:

Describe alternatives you've considered, if any

Currently using separate branches in argocd-apps repo which change the destination field of the given app

Additional context

Example, add a 'name' field to destination:

  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:
        admin_user: smoladmin
    argo:
      # secrets keys to make available to Argo CD ApplicationSets
      secret_keys:
        hostname: netmaker.buildstars.online
        admin_hostname: admin.netmaker.buildstars.online
        api_hostname: api.netmaker.buildstars.online
        broker_hostname: 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: 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/small-hack/netmaker-helm
        - https://small-hack.github.io/netmaker-helm
        destination:
          # automatically includes the app's namespace and argocd's namespace
          namespaces: []
          # name of kubernetes cluster to target
          name: my-other-cluster
        name: netmaker
jessebot commented 5 months ago

This seems like a good feature :) Feel free to submit a PR. It would be cool to have a drop down similar to the web GUI. Probably would also make sense to have a dropdown for branch too 🤔

jessebot commented 4 months ago

This will go out in v5.0.0.