Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show container version for each argocd Application #21662

Open
perpective2410 opened this issue Jan 24, 2025 · 8 comments
Open

Show container version for each argocd Application #21662

perpective2410 opened this issue Jan 24, 2025 · 8 comments
Labels
enhancement New feature or request

Comments

@perpective2410
Copy link

Hello,

We would like to be able to display in the ArgoCD UI the image.tag located in values-app.yaml
We are deploying our stack with an applicationSet based on a git generator and a folder structure.
We could maybe display this image tag as a label? Any idea how we could achieve this? I know we could use the CLI, but its an information that we want for non-tech people in our company.

values-app.yaml

  image:
    tag: "0.1.27"

ApplicationSet

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: nonprod-uks-xxx
  namespace: argocd
spec:
  generators:
  - git:
      directories:
      - path: environments/pol-sandpit/nonprod-uks/*/*/*
      repoURL: [email protected]:v3/xxx
      revision: main
      template:
        metadata: {}
        spec:
          destination: {}
          project: ""
  goTemplate: true
  template:
    metadata:
      labels:
        application: '{{ .path.basename }}'
        environment: '{{ index .path.segments 2 }}'
        type: '{{ index .path.segments 4 }}'
      name: '{{ .path.basename }}-{{ index .path.segments 3 }}-{{ index .path.segments 2 }}'
    spec:
      destination:
        name: '{{ index .path.segments 2 }}'
        namespace: '{{ index .path.segments 3 }}'
      project: xxx
      revisionHistoryLimit: 10
      source:
        helm:
          ignoreMissingValueFiles: true
          releaseName: '{{ .path.basename }}-{{ index .path.segments 3 }}-{{ index.path.segments 2 }}'
          valueFiles:
          - values-app.yaml
        path: environments/pol-sandpit/nonprod-uks/{{ index .path.segments 3 }}/{{index .path.segments 4 }}/{{ .path.basename }}
        repoURL: [email protected]:v3/xxx
        targetRevision: main
@perpective2410 perpective2410 added the enhancement New feature or request label Jan 24, 2025
@V0YD23
Copy link

V0YD23 commented Jan 27, 2025

@perpective2410 can i work on this issue ?

@perpective2410
Copy link
Author

Yes please. What are your thoughts?

@V0YD23
Copy link

V0YD23 commented Jan 29, 2025

Yes please. What are your thoughts?

i guess we can proceed like this ,

Modify the Helm values.yaml or Deployment YAML to expose the image.tag as an environment variable inside the application.

Image

and then we can modify our frontend code to read IMAGE_TAG from the environment variables.
const imageTag = process.env.REACT_APP_IMAGE_TAG || "unknown"; return <div>Current Image Tag: {imageTag}</div>;

Expected Outcomes
The YAML deployment injects IMAGE_TAG into the pod.
The frontend reads the IMAGE_TAG from process.env.
The UI displays the current image tag dynamically.

Does this makes sense ? @perpective2410

@perpective2410
Copy link
Author

That could work for me, but why not taking containers.image directly instead of introducing a new env? that way it would work for existing deployment, for everyone

@V0YD23
Copy link

V0YD23 commented Jan 29, 2025

yeah we could also use what you specified {{ .values.image.tag }}

That could work for me, but why not taking containers.image directly instead of introducing a new env? that way it would work for existing deployment, for everyone

@perpective2410
Copy link
Author

Could you please advise where you are planning to display this information? Also, a pod can have multiple containers (with different image name and tag)

@V0YD23
Copy link

V0YD23 commented Jan 29, 2025

but i wanna ask that we will be changin the frontend in this ? so at the end we have to pass that thing to frontend right

@V0YD23
Copy link

V0YD23 commented Jan 29, 2025

@perpective2410 as i am total beginner in contribution and have not explored the tool much so wanna ask some questions regarding it so wanna ask does this UI has any admin dashbaord type of thing or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants