Bootstrap FreeKB - ArgoCD - Log Level
ArgoCD - Log Level

Updated:   |  ArgoCD articles

This assume you have ArgoCD running on Kubernetes or OpenShift. In the namespace ArgoCD was installed in, which is typcically "argocd" or "openshift-gitops", the kubectl (Kubernetes) or oc (OpenShift) command can be used to list the argocd resource.

~]$ oc get argocd --namespace openshift-gitops
NAME               AGE
openshift-gitops   51d

 

The YAML can be used which should show that by default there is no logLevel key.

~]$ oc get argocd openshift-gitops --namespace openshift-gitops --output yaml
spec:
  controller:
    processors: {}
    resources:
      limits:
        cpu: "2"
        memory: 2Gi
      requests:
        cpu: 250m
        memory: 1Gi
    sharding: {}
  repo:
    resources:
      limits:
        cpu: "1"
        memory: 1Gi
      requests:
        cpu: 250m
        memory: 256Mi
  resourceExclusions: |
    - apiGroups:
      - tekton.dev
      clusters:
      - '*'
      kinds:
      - TaskRun
      - PipelineRun
  server:
    autoscale:
      enabled: false
    grpc:
      ingress:
        enabled: false
    ingress:
      enabled: false
    resources:
      limits:
        cpu: 500m
        memory: 256Mi
      requests:
        cpu: 125m
        memory: 128Mi
    route:
      enabled: true
    service:
      type: ""    

 

You can configure the log level for these resources.

  • applicationSet
  • controller
  • notifications
  • repo
  • server

 

For example, to update "repo" to log level debug.

oc patch argocd openshift-gitops --namespace openshift-gitops --patch '{"spec":{"repo":{"logLevel":"debug"}}}' --type=merge

 

Once patched, the YAML should then contain the logLevel key.

~]$ oc get argocd openshift-gitops --namespace openshift-gitops --output yaml
spec:
  repo:
    logLevel: debug
    resources:
      limits:
        cpu: "1"
        memory: 1Gi
      requests:
        cpu: 250m
        memory: 256Mi

 

Or you can create a config map named argocd-cmd-params-cm that contains the following YAML.

apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/managed-by: openshift-gitops
    app.kubernetes.io/name: argocd-cmd-params-cm
    app.kubernetes.io/part-of: argocd
  name: argocd-cmd-params-cm
  namespace: openshift-gitops
data:
  applicationsetcontroller.log.level: "info"
  commitserver.log.level: "info"
  controller.log.level: "info"
  dexserver.log.level: "info"
  notificationscontroller.log.level: "info"
  reposerver.log.level: "info"
  server.log.level: "info"

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 17dc40 in the box below so that we can be sure you are a human.