#argocd (2023-05)

2023-05-19

João avatar

Hello folks, argo question.

I want to have an applicationset similar to this, the problem is that https://github.com/argoproj/argo-cd/tree/master/applicationset/examples/git-generator-files-discovery/apps/guestbook I dont want to store my helm chart here since I am using an helm chart repo.

Is there a way of using git generators with helm charts stored on a rempo rather than on a templates/ folder locally?

Hao Wang avatar
Hao Wang

may need to refactor codes to use AppSet?

Hao Wang avatar
Hao Wang

and AppSet will be able to use git generator

Hao Wang avatar
Hao Wang

oh missed the helm chart, I guess I’ll need more contexts around that

2023-05-20

2023-05-22

Frank avatar

Hi! I’m troubleshooting a weird issue with ArgoCD while deploying the Grafana Helm chart on a Minikube test env. For some reason the secret the chart generates is constantly being updated (specifically the admin-password key), resulting in the deployment to create a new replicaset and pod.

One would say this is an issue with their chart, but somehow I am seeing similar behavior with a different chart as well.

Any pointers on how to resolve this?

venkata.mutyala avatar
venkata.mutyala

Did you select “replace” as an option in your grafana argoCD application settings?

2023-05-26

Lolu Ade avatar
Lolu Ade

I am trying to use ArgoCD notification to my Teams channel, but it isn’t sending notification. So, I followed documentation here I created an Incoming Webhook in teams and get URL I set it to argocd-notification secrets: Then I set up config map: Then I subscribe it from application:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: dreambook-argo-application
  namespace: argocd
  annotations:
    notifications.argoproj.io/subscribe.on-sync-running.teams: ArgoCD
    notifications.argoproj.io/subscribe.on-deployed.teams: ArgoCD
    notifications.argoproj.io/subscribe.on-health-degraded: ArgoCD
spec:
  project: default
  source:
    repoURL: myrepo url
    targetRevision: HEAD
    path: dev/deployment
  destination:
    server: <https://kubernetes.default.svc>
    namespace: myns
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - Validate=false
      - Prune=true
      - SelfHeal=true
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
data:
  context: |
    argocdUrl: <https://20.204.207.96>
  trigger.on-health-degraded: |
    when: app.status.health.status == 'Degraded'
    send: [app-on-health-degraded]
  trigger.on-deployed: |
    when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
    oncePer: app.status.sync.revision
    send: [app-sync-succeeded]
  service.teams: |
    recipientUrls: 
      ArgoCD: $channel-teams-url
  template.app-on-health-degraded: |
    email:
      subject: Application {{.app.metadata.name}} has degraded.
    message: |
      Application {{.app.metadata.name}} has degraded.
      Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
    teams:
      facts: |
        [{
          "name": "Sync Status",
          "value": "{{.app.status.sync.status}}"
        },
        {
          "name": "Repository",
          "value": "{{.app.spec.source.repoURL}}"
        }
        {{range $index, $c := .app.status.conditions}}
          {{if not $index}},{{end}}
          {{if $index}},{{end}}
          {
            "name": "{{$c.type}}",
            "value": "{{$c.message}}",
          }
        {{end}}
        ]
      potentialAction: |
        [{
          "@type":"OpenUri",
          "name":"Open Application",
          "targets":[{
            "os":"default",
            "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
          }]
        },
        {
          "@type":"OpenUri",
          "name":"Open Repository",
          "targets":[{
            "os":"default",
            "uri":"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}"
          }]
        }]
      title: Application {{.app.metadata.name}} has degraded.

  template.app-sync-succeeded: |
    teams:
      facts: |
        [{
          "name": "Sync Status",
          "value": "{{.app.status.sync.status}}"
        },
        {
          "name": "Repository",
          "value": "{{.app.spec.source.repoURL}}"
        },
        {
          "name": "Revision",
          "value": "{{.app.status.sync.revision}}"
        }
        {{range $index, $c := .app.status.conditions}}
          {{if not $index}},{{end}}
          {{if $index}},{{end}}
          {
            "name": "{{$c.type}}",
            "value": "{{$c.message}}",
          }
        {{end}}
        ]
      potentialAction: |-
        [{
          "@type":"OpenUri",
          "name":"Operation Application",
          "targets":[{
            "os":"default",
            "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
          }]
        },
        {
          "@type":"OpenUri",
          "name":"Open Repository",
          "targets":[{
            "os":"default",
            "uri":"{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}"
          }]
        }]
      title: New version of an application {{.app.metadata.name}} is up and running.
 
apiVersion: v1  
kind: Secret
metadata:   
  name: argocd-notifications-secret
stringData:
  channel-teams-url: mywebhookurl
type: Opaque
 

when i check the logs of argocd-notifications controller time=”2023-05-26T0134Z” level=info msg=”Notification about condition ‘on-created.[0].X_5TO4MPCKAyY0ipFgr6_IraRNs’ already sent to ‘{teams

Hao Wang avatar
Hao Wang

Teams’s credential issue?

Igor M avatar

Not sure what version you’re on, but the annotation I use is:

on-health-degraded.recipients.argocd-notifications.argoproj.io

https://argocd-notifications.readthedocs.io/en/stable/subscriptions/ shows your pattern though

Igor M avatar

Nothing in the logs?

Lolu Ade avatar
Lolu Ade

time=”2023-05-31T1816Z” level=error msg=”failed to execute when condition: cannot fetch phase from <nil> (1:27)\n | app.status.operationState.phase in [‘Running’]\n | ……………………..^” time=”2023-05-31T1816Z” level=info msg=”Trigger on-sync-running result: [{[0].xGlbhcF_taGYrI3UsrQsINn2hl0 [app-sync-running] false}]” resource=argocd/tasks time=”2023-05-31T1816Z” level=info msg=”Trigger on-created result: [{[0].X_5TO4MPCKAyY0ipFgr6_IraRNs tasks [app-created] true}]” resource=argocd/tasks time=”2023-05-31T1816Z” level=info msg=”Notification about condition ‘on-created.[0].X_5TO4MPCKAyY0ipFgr6_IraRNs’ already sent to ‘{teams k8s-deploy}’” resource=argocd/tasks time=”2023-05-31T1816Z” level=info msg=”Trigger on-health-degraded result: [{[0].zoG5zUjYGjimkwCGgIQGjx1hO5s [app-health-degraded] false}]” resource=argocd/tasks time=”2023-05-31T1816Z” level=info msg=”Processing completed” resource=argocd/tasks time=”2023-05-31T1816Z” level=info msg=”Start processing” resource=argocd/hazelcast time=”2023-05-31T1816Z” level=info msg=”Processing completed” resource=argocd/hazelcast time=”2023-05-31T1816Z” level=info msg=”Start processing” resource=argocd/prime time=”2023-05-31T1816Z” level=info msg=”Processing completed” resource=argocd/prime time=”2023-05-31T1816Z” level=info msg=”Start processing” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-health-degraded result: [{[0].zoG5zUjYGjimkwCGgIQGjx1hO5s [app-health-degraded] true}]” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Notification about condition ‘on-health-degraded.[0].zoG5zUjYGjimkwCGgIQGjx1hO5s’ already sent to ‘{teams k8s-deploy}’” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-sync-failed result: [{[0].H9WjsqG1dKYm6njOZ7yUQYOA1Wk [app-sync-failed] true}]” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Notification about condition ‘on-sync-failed.[0].H9WjsqG1dKYm6njOZ7yUQYOA1Wk’ already sent to ‘{teams k8s-deploy}’” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-sync-status result: []” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-sync-running result: [{[0].xGlbhcF_taGYrI3UsrQsINn2hl0 [app-sync-running] false}]” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-sync-status-unknown result: [{[0].6SzWb05EK-0v90hwjyytTbN7S6A [app-sync-status-unknown] false}]” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-created result: [{[0].X_5TO4MPCKAyY0ipFgr6_IraRNs admin-ui [app-created] true}]” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Notification about condition ‘on-created.[0].X_5TO4MPCKAyY0ipFgr6_IraRNs’ already sent to ‘{teams k8s-deploy}’” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-sync-succeeded result: [{[0].zxM90Et6k4Elb1-fHdjtDJq0xR0 [app-sync-succeeded] false}]” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-deployed result: [{[0].y7b5sbwa2Q329JYH755peeq-fBs d48a9470ff2d6a0453a420f9cd6274c1ef62aa6c [app-deployed] false}]” resource=argocd/admin-ui time=”2023-05-31T1816Z” level=info msg=”Trigger on-deleted result: [{[0].BmlU8P6R19BGtNv5gj8udVypmxQ admin-ui [app-deleted] false}]” resource=argocd/admin-ui

2023-05-27

2023-05-30

2023-05-31

    keyboard_arrow_up