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

ArgoCD prunes resource that is part of helm chart (kubescape) #15472

Closed
3 tasks done
WiktorS opened this issue Sep 12, 2023 · 3 comments
Closed
3 tasks done

ArgoCD prunes resource that is part of helm chart (kubescape) #15472

WiktorS opened this issue Sep 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@WiktorS
Copy link

WiktorS commented Sep 12, 2023

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

Trying to deploy kubescape helm chart with ArgoCD and came across an issue.
ArgoCD prunes a configmap that is part of helm chart deployment.

To Reproduce

Running on k3s v1.27.5+k3s1 (AlpineLinux)

ArgoCD deployment

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: argocd
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
    repoURL: https://argoproj.github.io/argo-helm
    targetRevision: 5.46.0
    chart: argo-cd
    helm:
      values: |
        nameOverride: argocd
        server:
          containerPorts:
            metrics: 8082
          ingress:
            enabled: true
            hosts:
            - argocd.<cut>
        configs:
          params:
            server.insecure: true
        dex:
          enabled: false
        redis:
          image:
            tag: 7.0.13-alpine
  destination:
    server: {{ .Values.spec.destination.server }}
    namespace: argocd
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
    - CreateNamespace=true

kubescape deployment

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: kubescape
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  source:
    repoURL: https://kubescape.github.io/helm-charts/
    targetRevision: 1.15.3
    chart: kubescape-operator
    helm:
      values: |
        clusterName: <cut>
        account: <cut>
        server: api.armosec.io
  destination:
    server: {{ .Values.spec.destination.server }}
    namespace: kubescape
  syncPolicy:
    automated:
      prune: false #changed from true for debug
      selfHeal: false #changed from true for debug
    syncOptions:
      - CreateNamespace=true

Expected behavior

kubescape installed with helm command works flawlessly

helm upgrade --install kubescape kubescape/kubescape-operator -n kubescape --create-namespace --set clusterName=<cut> --set account=<cut> --set server=api.armosec.io

kubescape installed with ArgoCD and same parameters is missing "ks-cloud-config" configmap (https://github.com/kubescape/helm-charts/blob/kubescape-operator-1.15.3/charts/kubescape-operator/templates/configs/cloudapi-configmap.yaml)

Chart source: https://github.com/kubescape/helm-charts/tree/kubescape-operator-1.15.3/charts/kubescape-operator

Screenshots

(ks-cloud-config recreated manually from helm --dry-run --debug)
image
image

Version

argocd: v2.8.3+77556d9
  BuildDate: 2023-09-07T16:05:43Z
  GitCommit: 77556d9e64304c27c718bb0794676713628e435e
  GitTreeState: clean
  GoVersion: go1.20.6
  Compiler: gc
  Platform: linux/arm64
helm version
version.BuildInfo{Version:"v3.12.1", GitCommit:"f32a527a060157990e2aa86bf45010dfb3cc8b8d", GitTreeState:"clean", GoVersion:"go1.20.4"}

Logs

Not sure if this is the "interesting" part of log

time="2023-09-12T21:14:21Z" level=info msg="received streaming call /application.ApplicationService/WatchResourceTree" grpc.method=WatchResourceTree grpc.request.content="applicationName:\"argocd\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:14:21Z" span.kind=server system=grpc
time="2023-09-12T21:14:21Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="name:\"argocd\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:14:21Z" span.kind=server system=grpc
time="2023-09-12T21:14:22Z" level=info msg="received unary call /application.ApplicationService/GetApplicationSyncWindows" grpc.method=GetApplicationSyncWindows grpc.request.content="name:\"argocd\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:14:22Z" span.kind=server system=grpc
time="2023-09-12T21:14:22Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetApplicationSyncWindows grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:14:22Z" grpc.time_ms=28.334 span.kind=server system=grpc
time="2023-09-12T21:15:37Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:14:21Z" grpc.time_ms=75531.695 span.kind=server system=grpc
time="2023-09-12T21:15:37Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:14:21Z" grpc.time_ms=75535.93 span.kind=server system=grpc
time="2023-09-12T21:16:37Z" level=info msg="received streaming call /application.ApplicationService/WatchResourceTree" grpc.method=WatchResourceTree grpc.request.content="applicationName:\"argocd\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:37Z" span.kind=server system=grpc
time="2023-09-12T21:16:37Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="name:\"argocd\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:37Z" span.kind=server system=grpc
time="2023-09-12T21:16:37Z" level=info msg="received unary call /application.ApplicationService/GetApplicationSyncWindows" grpc.method=GetApplicationSyncWindows grpc.request.content="name:\"argocd\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:37Z" span.kind=server system=grpc
time="2023-09-12T21:16:37Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetApplicationSyncWindows grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:37Z" grpc.time_ms=30.4 span.kind=server system=grpc
time="2023-09-12T21:16:44Z" level=info msg="received unary call /cluster.ClusterService/List" grpc.method=List grpc.request.content= grpc.service=cluster.ClusterService grpc.start_time="2023-09-12T21:16:44Z" span.kind=server system=grpc
time="2023-09-12T21:16:44Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=List grpc.service=cluster.ClusterService grpc.start_time="2023-09-12T21:16:44Z" grpc.time_ms=3.065 span.kind=server system=grpc
time="2023-09-12T21:16:44Z" level=info msg="received unary call /application.ApplicationService/List" grpc.method=List grpc.request.content="selector:\"\" appNamespace:\"\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:44Z" span.kind=server system=grpc
time="2023-09-12T21:16:44Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=List grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:44Z" grpc.time_ms=1.909 span.kind=server system=grpc
time="2023-09-12T21:16:44Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:37Z" grpc.time_ms=7622.384 span.kind=server system=grpc
time="2023-09-12T21:16:44Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:37Z" grpc.time_ms=7624.201 span.kind=server system=grpc
time="2023-09-12T21:16:44Z" level=info msg="received unary call /session.SessionService/GetUserInfo" grpc.method=GetUserInfo grpc.request.content= grpc.service=session.SessionService grpc.start_time="2023-09-12T21:16:44Z" span.kind=server system=grpc
time="2023-09-12T21:16:44Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetUserInfo grpc.service=session.SessionService grpc.start_time="2023-09-12T21:16:44Z" grpc.time_ms=0.876 span.kind=server system=grpc
time="2023-09-12T21:16:45Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="resourceVersion:\"11867322\" selector:\"\" appNamespace:\"\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:45Z" span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:45Z" grpc.time_ms=1979.011 span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="received unary call /application.ApplicationService/Get" grpc.method=Get grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="received unary call /session.SessionService/GetUserInfo" grpc.method=GetUserInfo grpc.request.content= grpc.service=session.SessionService grpc.start_time="2023-09-12T21:16:47Z" span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetUserInfo grpc.service=session.SessionService grpc.start_time="2023-09-12T21:16:47Z" grpc.time_ms=1.947 span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=Get grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" grpc.time_ms=20.461 span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="received unary call /application.ApplicationService/ResourceTree" grpc.method=ResourceTree grpc.request.content="applicationName:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=ResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" grpc.time_ms=5.447 span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="received unary call /application.ApplicationService/GetApplicationSyncWindows" grpc.method=GetApplicationSyncWindows grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="received unary call /session.SessionService/GetUserInfo" grpc.method=GetUserInfo grpc.request.content= grpc.service=session.SessionService grpc.start_time="2023-09-12T21:16:47Z" span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetUserInfo grpc.service=session.SessionService grpc.start_time="2023-09-12T21:16:47Z" grpc.time_ms=0.822 span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetApplicationSyncWindows grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" grpc.time_ms=25.887 span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" span.kind=server system=grpc
time="2023-09-12T21:16:47Z" level=info msg="received streaming call /application.ApplicationService/WatchResourceTree" grpc.method=WatchResourceTree grpc.request.content="applicationName:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="received unary call /application.ApplicationService/ManagedResources" grpc.method=ManagedResources grpc.request.content="applicationName:\"kubescape\" namespace:\"kubescape\" name:\"ks-cloud-config\" kind:\"ConfigMap\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:50Z" span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=ManagedResources grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:50Z" grpc.time_ms=45.349 span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="received unary call /application.ApplicationService/GetResource" grpc.method=GetResource grpc.request.content="name:\"kubescape\" namespace:\"kubescape\" resourceName:\"ks-cloud-config\" version:\"v1\" group:\"\" kind:\"ConfigMap\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:50Z" span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetResource grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:50Z" grpc.time_ms=36.126 span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="received unary call /application.ApplicationService/ListResourceEvents" grpc.method=ListResourceEvents grpc.request.content="name:\"kubescape\" resourceNamespace:\"kubescape\" resourceName:\"ks-cloud-config\" resourceUID:\"8c6cec56-e7ec-496d-9e15-4fdec065d895\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:50Z" span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="Querying for resource events with field selector: involvedObject.name=ks-cloud-config,involvedObject.uid=8c6cec56-e7ec-496d-9e15-4fdec065d895,involvedObject.namespace=kubescape"
time="2023-09-12T21:16:50Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=ListResourceEvents grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:50Z" grpc.time_ms=31.948 span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="received unary call /cluster.SettingsService/Get" grpc.method=Get grpc.request.content= grpc.service=cluster.SettingsService grpc.start_time="2023-09-12T21:16:50Z" span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=Get grpc.service=cluster.SettingsService grpc.start_time="2023-09-12T21:16:50Z" grpc.time_ms=1.534 span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="received unary call /account.AccountService/CanI" grpc.method=CanI grpc.request.content="resource:\"logs\" action:\"get\" subresource:\"default/kubescape\" " grpc.service=account.AccountService grpc.start_time="2023-09-12T21:16:50Z" span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=CanI grpc.service=account.AccountService grpc.start_time="2023-09-12T21:16:50Z" grpc.time_ms=0.826 span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="received unary call /account.AccountService/CanI" grpc.method=CanI grpc.request.content="resource:\"exec\" action:\"create\" subresource:\"default/kubescape\" " grpc.service=account.AccountService grpc.start_time="2023-09-12T21:16:50Z" span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=CanI grpc.service=account.AccountService grpc.start_time="2023-09-12T21:16:50Z" grpc.time_ms=0.718 span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="received unary call /application.ApplicationService/ListResourceLinks" grpc.method=ListResourceLinks grpc.request.content="name:\"kubescape\" namespace:\"kubescape\" resourceName:\"ks-cloud-config\" version:\"v1\" group:\"\" kind:\"ConfigMap\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:50Z" span.kind=server system=grpc
time="2023-09-12T21:16:50Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=ListResourceLinks grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:50Z" grpc.time_ms=41.726 span.kind=server system=grpc
time="2023-09-12T21:16:52Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" grpc.time_ms=5097.073 span.kind=server system=grpc
time="2023-09-12T21:16:52Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:16:47Z" grpc.time_ms=4765.531 span.kind=server system=grpc
time="2023-09-12T21:18:43Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:18:43Z" span.kind=server system=grpc
time="2023-09-12T21:18:43Z" level=info msg="received streaming call /application.ApplicationService/WatchResourceTree" grpc.method=WatchResourceTree grpc.request.content="applicationName:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:18:43Z" span.kind=server system=grpc
time="2023-09-12T21:18:49Z" level=info msg="received unary call /application.ApplicationService/GetApplicationSyncWindows" grpc.method=GetApplicationSyncWindows grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:18:49Z" span.kind=server system=grpc
time="2023-09-12T21:18:49Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetApplicationSyncWindows grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:18:49Z" grpc.time_ms=23.175 span.kind=server system=grpc
time="2023-09-12T21:19:06Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:18:43Z" grpc.time_ms=23348.908 span.kind=server system=grpc
time="2023-09-12T21:19:06Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:18:43Z" grpc.time_ms=23351.785 span.kind=server system=grpc
time="2023-09-12T21:20:24Z" level=info msg="received streaming call /application.ApplicationService/WatchResourceTree" grpc.method=WatchResourceTree grpc.request.content="applicationName:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:24Z" span.kind=server system=grpc
time="2023-09-12T21:20:24Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:24Z" span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="received unary call /application.ApplicationService/ManagedResources" grpc.method=ManagedResources grpc.request.content="applicationName:\"kubescape\" namespace:\"kubescape\" name:\"ks-cloud-config\" kind:\"ConfigMap\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:28Z" span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=ManagedResources grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:28Z" grpc.time_ms=35.681 span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="received unary call /application.ApplicationService/GetResource" grpc.method=GetResource grpc.request.content="name:\"kubescape\" namespace:\"kubescape\" resourceName:\"ks-cloud-config\" version:\"v1\" group:\"\" kind:\"ConfigMap\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:28Z" span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GetResource grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:28Z" grpc.time_ms=33.231 span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="received unary call /application.ApplicationService/ListResourceEvents" grpc.method=ListResourceEvents grpc.request.content="name:\"kubescape\" resourceNamespace:\"kubescape\" resourceName:\"ks-cloud-config\" resourceUID:\"8c6cec56-e7ec-496d-9e15-4fdec065d895\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:28Z" span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="Querying for resource events with field selector: involvedObject.name=ks-cloud-config,involvedObject.uid=8c6cec56-e7ec-496d-9e15-4fdec065d895,involvedObject.namespace=kubescape"
time="2023-09-12T21:20:28Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=ListResourceEvents grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:28Z" grpc.time_ms=25.705 span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="received unary call /cluster.SettingsService/Get" grpc.method=Get grpc.request.content= grpc.service=cluster.SettingsService grpc.start_time="2023-09-12T21:20:28Z" span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=Get grpc.service=cluster.SettingsService grpc.start_time="2023-09-12T21:20:28Z" grpc.time_ms=1.232 span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="received unary call /account.AccountService/CanI" grpc.method=CanI grpc.request.content="resource:\"logs\" action:\"get\" subresource:\"default/kubescape\" " grpc.service=account.AccountService grpc.start_time="2023-09-12T21:20:28Z" span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=CanI grpc.service=account.AccountService grpc.start_time="2023-09-12T21:20:28Z" grpc.time_ms=1.059 span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="received unary call /account.AccountService/CanI" grpc.method=CanI grpc.request.content="resource:\"exec\" action:\"create\" subresource:\"default/kubescape\" " grpc.service=account.AccountService grpc.start_time="2023-09-12T21:20:28Z" span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=CanI grpc.service=account.AccountService grpc.start_time="2023-09-12T21:20:28Z" grpc.time_ms=1.89 span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="received unary call /application.ApplicationService/ListResourceLinks" grpc.method=ListResourceLinks grpc.request.content="name:\"kubescape\" namespace:\"kubescape\" resourceName:\"ks-cloud-config\" version:\"v1\" group:\"\" kind:\"ConfigMap\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:28Z" span.kind=server system=grpc
time="2023-09-12T21:20:28Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=ListResourceLinks grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:28Z" grpc.time_ms=34.696 span.kind=server system=grpc
time="2023-09-12T21:20:52Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:24Z" grpc.time_ms=28103.32 span.kind=server system=grpc
time="2023-09-12T21:20:52Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:24Z" grpc.time_ms=28105.016 span.kind=server system=grpc
time="2023-09-12T21:20:54Z" level=info msg="received streaming call /application.ApplicationService/WatchResourceTree" grpc.method=WatchResourceTree grpc.request.content="applicationName:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:54Z" span.kind=server system=grpc
time="2023-09-12T21:20:54Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:54Z" span.kind=server system=grpc
time="2023-09-12T21:20:56Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:54Z" grpc.time_ms=1576.091 span.kind=server system=grpc
time="2023-09-12T21:20:56Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:20:54Z" grpc.time_ms=1578.647 span.kind=server system=grpc
time="2023-09-12T21:21:25Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:21:25Z" span.kind=server system=grpc
time="2023-09-12T21:21:25Z" level=info msg="received streaming call /application.ApplicationService/WatchResourceTree" grpc.method=WatchResourceTree grpc.request.content="applicationName:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:21:25Z" span.kind=server system=grpc
time="2023-09-12T21:21:28Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:21:25Z" grpc.time_ms=2801.327 span.kind=server system=grpc
time="2023-09-12T21:21:28Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:21:25Z" grpc.time_ms=2803.001 span.kind=server system=grpc
time="2023-09-12T21:21:34Z" level=info msg="received streaming call /application.ApplicationService/Watch" grpc.method=Watch grpc.request.content="name:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:21:34Z" span.kind=server system=grpc
time="2023-09-12T21:21:34Z" level=info msg="received streaming call /application.ApplicationService/WatchResourceTree" grpc.method=WatchResourceTree grpc.request.content="applicationName:\"kubescape\" appNamespace:\"argocd\" " grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:21:34Z" span.kind=server system=grpc
time="2023-09-12T21:21:36Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=Watch grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:21:34Z" grpc.time_ms=2120.632 span.kind=server system=grpc
time="2023-09-12T21:21:36Z" level=info msg="finished streaming call with code OK" grpc.code=OK grpc.method=WatchResourceTree grpc.service=application.ApplicationService grpc.start_time="2023-09-12T21:21:34Z" grpc.time_ms=2126.625 span.kind=server system=grpc
time="2023-09-12T21:22:42Z" level=info msg="Alloc=16884 TotalAlloc=668482 Sys=61037 NumGC=56 Goroutines=100"
@WiktorS WiktorS added the bug Something isn't working label Sep 12, 2023
@jannfis
Copy link
Member

jannfis commented Sep 13, 2023

I believe that this resource marked for pruning is created by some controller, and the tracking label Argo CD uses by default is copied on that resource (also by that controller).

You could either look whether that particular controller could be configured to not copy that label on resources it creates, or you can switch to annotation based resource tracking. Using the latter will give Argo CD more context information on whether a resource is actually managed, or whether labels/annotations were merely copied from another resource.

@WiktorS
Copy link
Author

WiktorS commented Sep 13, 2023

Looks like ArgoCD does not honor helm.sh/resource-policy: keep with helm.sh/hook: pre-install or helm.sh/hook: pre-upgrade. Is this expected?

@WiktorS
Copy link
Author

WiktorS commented Oct 6, 2023

Looks like ArgoCD does not honor helm.sh/resource-policy: keep with helm.sh/hook: pre-install or helm.sh/hook: pre-upgrade. Is this expected?

Closing, antipattern as explained #3502 (comment)
Also looks like the issue was addressed in the project

@WiktorS WiktorS closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants