kapp-controller icon indicating copy to clipboard operation
kapp-controller copied to clipboard

Show target cluster in the list of apps.

Open wolfedale opened this issue 2 years ago • 2 comments

Describe the problem/challenge you have The list of apps are not showing any info about target clusters.

Describe the solution you'd like I would like to execute kubect get Apps and get output something like:

➜  kubectl get Apps
NAME           DESCRIPTION           SINCE-DEPLOY   AGE    CLUSTER
nginx-app      Reconcile succeeded   22s            48m    myClusterFoo   
simple-app     Reconcile succeeded   31s            72m    local
new-app        Reconcile succeeded   21s            32m    local

where local means my management cluster, the one on which I'm executing kubectl or kapp. And myClusterFoo is a string from: app.spec.cluster.kubeconfigSecretRef, with CAPI it's one of my workload cluster.

Example of my App:

apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
  name: nginx-app
  namespace: default
spec:
  cluster:
    kubeconfigSecretRef:
      name: myClusterFoo-cluster-kubeconfig
    namespace: default

  fetch:
    - http:
        url: https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/application/deployment.yaml
  template:
  - ytt: {}
  deploy:
  - kapp: {}

Anything else you would like to add: I'm happy to prepare PR for it :-)


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

wolfedale avatar Feb 22 '23 10:02 wolfedale

This is awesome, we use similar capabilities and never thought about making this more readable -- we just follow a naming convention on the apps that includes the cluster names (${CLUSTER_NAME}-nginx or similar), this would make this cleaner and more clear for newer folks though.

voor avatar Feb 22 '23 15:02 voor

hey @wolfedale , I see you indicated a desire to make a PR 👍 Let me know if you need any support or run into any issues, you can find me on the kubernetes slack in the carvel channel. Or here if that's easier. 🎉 !

neil-hickey avatar Feb 22 '23 22:02 neil-hickey