Reloader icon indicating copy to clipboard operation
Reloader copied to clipboard

Improve Reloader controller logs

Open SachithKasthuriarachchi opened this issue 1 year ago • 5 comments

In my AKS cluster with kubernetes version v1.25.6 the reloader seems to be stuck in the starting controller state.

time="2023-07-31T15:18:54Z" level=info msg="Environment: Kubernetes"
time="2023-07-31T15:18:54Z" level=info msg="Starting Reloader"
time="2023-07-31T15:18:54Z" level=warning msg="KUBERNETES_NAMESPACE is unset, will detect changes in all namespaces."
time="2023-07-31T15:18:54Z" level=info msg="created controller for: configMaps"
time="2023-07-31T15:18:54Z" level=info msg="Starting Controller to watch resource type: configMaps"
time="2023-07-31T15:18:54Z" level=info msg="created controller for: secrets"
time="2023-07-31T15:18:54Z" level=info msg="Starting Controller to watch resource type: secrets"

However, the version v0.0.58 works fine

Helm Values

fullnameOverride: reloader
reloader:
  deployment:
    annotations:
      checkov.io/skip2: CKV_K8S_38=Managed by reloader
    replicas: 1
    securityContext:
      runAsNonRoot: true
      runAsUser: 65534
      seccompProfile:
        type: RuntimeDefault
    image:
      name: ghcr.io/stakater/reloader
      tag: v1.0.32
      pullPolicy: Always
    containerSecurityContext:
      capabilities:
        drop:
          - ALL
      allowPrivilegeEscalation: false
      readOnlyRootFilesystem: true
    resources:
      limits:
        cpu: "100m"
        memory: "512Mi"
      requests:
        cpu: "10m"
        memory: "128Mi"
  readOnlyRootFileSystem: true

SachithKasthuriarachchi avatar Jul 31 '23 15:07 SachithKasthuriarachchi

https://github.com/stakater/Reloader/issues/63

SachithKasthuriarachchi avatar Jul 31 '23 15:07 SachithKasthuriarachchi

it seems reloader does not work at all in kubernetes v1.24.9

SachithKasthuriarachchi avatar Aug 01 '23 05:08 SachithKasthuriarachchi

@stakater-user do you have an idea about this? the latest 1.0.34 also does not work

SachithKasthuriarachchi avatar Aug 02 '23 09:08 SachithKasthuriarachchi

Apologies for this issue. The reloader works fine. I was confused since the log was stopped at the above.

time="2023-07-31T15:18:54Z" level=info msg="Starting Controller to watch resource type: secrets"

Can we improve this log message to say that the controller is started and it is watching the resources?

SachithKasthuriarachchi avatar Aug 03 '23 04:08 SachithKasthuriarachchi

@SachithKasthuriarachchi We try to follow standard logging that is generally used across k8s products. But feel free to raise a PR to add another log line after the one we already have:

time="2023-07-31T15:18:54Z" level=info msg="Starting Controller to watch resource type: secrets"
time="2023-07-31T15:18:54Z" level=info msg="Started Controller to watch resource type: secrets"

bnallapeta avatar Aug 09 '23 08:08 bnallapeta