Skip to content

Instantly share code, notes, and snippets.

@pmorch
Last active Jan 20, 2022
Embed
What would you like to do?
ArgoCD bug: "Configure plugin via sidecar" => child resources not pruned on deletion
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: test-cmd-plugin
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: default
server: https://kubernetes.default.svc
source:
repoURL: https://github.com/pmorch/monitorfiles.git
path: .
targetRevision: HEAD
plugin:
name: cmp-plugin
env:
- name: FOO
value: myfoo
project: default
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- PruneLast=true
- CreateNamespace=true
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Refreshing app status (spec.source differs), level (3)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=290 unmarshal_ms=289 version_ms=0
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:56:30Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:cmp-plugin,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:56:30Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:57:30Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:56:30Z" grpc.time_ms=286.199 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Initiated automated sync to '4a887945d7a3b96fdf4b7fa882adb15f8e77619c'" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=OperationStarted type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Initiated automated sync to '4a887945d7a3b96fdf4b7fa882adb15f8e77619c'" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Updated sync status: -> OutOfSync" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Updated health status: -> Healthy" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="updated 'test-cmd-plugin' operation (phase: Running)"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Initialized new operation: {&SyncOperation{Revision:4a887945d7a3b96fdf4b7fa882adb15f8e77619c,Prune:true,DryRun:false,SyncStrategy:nil,Resources:[]SyncOperationResource{},Source:nil,Manifests:[],SyncOptions:[PruneLast=true CreateNamespace=true],} { true} [] {5 nil}}" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:56:30Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:cmp-plugin,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=5 unmarshal_ms=5 version_ms=0
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:56:30Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:57:30Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:56:30Z" grpc.time_ms=0.758 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Update successful" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg="Reconciliation completed" application=test-cmd-plugin dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=0 fields.level=3 git_ms=290 health_ms=0 live_ms=0 settings_ms=0 sync_ms=0 time_ms=321
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:30Z" level=info msg=Syncing application=test-cmd-plugin skipHooks=false started=false syncId=00003-OtKoE
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="sync/terminate complete" application=test-cmd-plugin duration=428.6002ms syncId=00003-OtKoE
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Refreshing app status (controller refresh requested), level (1)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:56:31Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:cmp-plugin,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=5 unmarshal_ms=5 version_ms=0
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:56:31Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:57:31Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:56:31Z" grpc.time_ms=0.52 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Skipping auto-sync: another operation is in progress" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Updated sync status: OutOfSync -> Synced" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="updated 'test-cmd-plugin' operation (phase: Succeeded)"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Sync operation to 4a887945d7a3b96fdf4b7fa882adb15f8e77619c succeeded" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=OperationCompleted type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Update successful" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Reconciliation completed" application=test-cmd-plugin dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=4 fields.level=1 git_ms=5 health_ms=0 live_ms=0 settings_ms=0 sync_ms=0 time_ms=24
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Refreshing app status (controller refresh requested), level (2)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:56:31Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:cmp-plugin,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:56:31Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:57:31Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:56:31Z" grpc.time_ms=0.603 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=4 unmarshal_ms=3 version_ms=0
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Skipping auto-sync: application status is Synced" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Updated sync status: OutOfSync -> Synced" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Update successful" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:56:31Z" level=info msg="Reconciliation completed" application=test-cmd-plugin dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=0 fields.level=2 git_ms=4 health_ms=0 live_ms=0 settings_ms=0 sync_ms=0 time_ms=14
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:54Z" level=info msg="Refreshing app status (spec.source differs), level (3)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:54Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:54Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:54Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:55Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=262 unmarshal_ms=262 version_ms=0
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:55Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:58:54Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:57:54Z" grpc.time_ms=258.75 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Initiated automated sync to '4a887945d7a3b96fdf4b7fa882adb15f8e77619c'" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=OperationStarted type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Initiated automated sync to '4a887945d7a3b96fdf4b7fa882adb15f8e77619c'" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Updated sync status: -> OutOfSync" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Updated health status: -> Healthy" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="updated 'test-cmd-plugin' operation (phase: Running)"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Initialized new operation: {&SyncOperation{Revision:4a887945d7a3b96fdf4b7fa882adb15f8e77619c,Prune:true,DryRun:false,SyncStrategy:nil,Resources:[]SyncOperationResource{},Source:nil,Manifests:[],SyncOptions:[PruneLast=true CreateNamespace=true],} { true} [] {5 nil}}" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:55Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=5 unmarshal_ms=5 version_ms=0
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:55Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:58:55Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:57:55Z" grpc.time_ms=0.428 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg=Syncing application=test-cmd-plugin skipHooks=false started=false syncId=00004-TIyHV
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Update successful" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Reconciliation completed" application=test-cmd-plugin dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=0 fields.level=3 git_ms=263 health_ms=0 live_ms=0 settings_ms=0 sync_ms=0 time_ms=295
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Refreshing app status (spec.source differs), level (3)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="sync/terminate complete" application=test-cmd-plugin duration=95.4867ms syncId=00004-TIyHV
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="updated 'test-cmd-plugin' operation (phase: Succeeded)"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Sync operation to 4a887945d7a3b96fdf4b7fa882adb15f8e77619c succeeded" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=OperationCompleted type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=226 unmarshal_ms=225 version_ms=0
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:55Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:55Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:58:55Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:57:55Z" grpc.time_ms=221.049 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Skipping auto-sync: another operation is in progress" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Updated sync status: -> Synced" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Updated health status: -> Healthy" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Update successful" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Reconciliation completed" application=test-cmd-plugin dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=1 fields.level=3 git_ms=226 health_ms=0 live_ms=3 settings_ms=0 sync_ms=0 time_ms=244
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Refreshing app status (controller refresh requested), level (2)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:55Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:55Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:58:55Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:57:55Z" grpc.time_ms=0.591 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=4 unmarshal_ms=4 version_ms=0
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Skipping auto-sync: application status is Synced" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="No status changes. Skipping patch" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:55Z" level=info msg="Reconciliation completed" application=test-cmd-plugin dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=0 fields.level=2 git_ms=4 health_ms=0 live_ms=3 settings_ms=0 sync_ms=0 time_ms=9
apiVersion: v1
kind: ConfigMap
metadata:
name: cmp-plugin
data:
plugin.yaml: |
apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: cmp-plugin
spec:
version: v1.0
generate:
command: [sh, -c, 'echo "{\"kind\": \"ConfigMap\", \"apiVersion\": \"v1\", \"metadata\": { \"name\": \"$ARGOCD_APP_NAME\", \"namespace\": \"$ARGOCD_APP_NAMESPACE\", \"annotations\": {\"in-sidecar\": \"true\", \"Foo\": \"$FOO\", \"KubeVersion\": \"$KUBE_VERSION\", \"KubeApiVersion\": \"$KUBE_API_VERSIONS\",\"Bar\": \"baz\"}}}"']
discover:
fileName: monitorfiles
allowConcurrency: true
lockRepo: false
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Deleting resources" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Deleting application's resources with Foreground propagation policy" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="1 objects remaining for deletion" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Deleting resources" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Refreshing app status (controller refresh requested), level (1)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:15Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:cmp-plugin,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="1 objects remaining for deletion" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:15Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:58:15Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:57:15Z" grpc.time_ms=1.699 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=6 unmarshal_ms=6 version_ms=0
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Skipping auto-sync: deletion in progress" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Updated health status: Healthy -> Progressing" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Update successful" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Reconciliation completed" application=test-cmd-plugin dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=2 fields.level=1 git_ms=6 health_ms=0 live_ms=0 settings_ms=0 sync_ms=0 time_ms=19
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="Deleting resources" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:15Z" level=info msg="1 objects remaining for deletion" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Deleting resources" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Refreshing app status (controller refresh requested), level (1)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Ignore status for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Deleting application's resources with Foreground propagation policy" application=test-cmd-plugin
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:16Z" level=info msg="manifest cache hit: &ApplicationSource{RepoURL:https://github.com/pmorch/monitorfiles.git,Path:.,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Ksonnet:nil,Directory:nil,Plugin:&ApplicationSourcePlugin{Name:cmp-plugin,Env:[]*EnvEntry{&EnvEntry{Name:FOO,Value:myfoo,},},},Chart:,}/4a887945d7a3b96fdf4b7fa882adb15f8e77619c"
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="getRepoObjs stats" application=test-cmd-plugin build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=5 unmarshal_ms=4 version_ms=0
[argocd-repo-server-6fdf5f494b-fkqwp repo-server] time="2022-01-20T21:57:16Z" level=info msg="finished unary call with code OK" grpc.code=OK grpc.method=GenerateManifest grpc.request.deadline="2022-01-20T21:58:16Z" grpc.service=repository.RepoServerService grpc.start_time="2022-01-20T21:57:16Z" grpc.time_ms=0.514 span.kind=server system=grpc
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Skipping auto-sync: deletion in progress" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Updated sync status: Synced -> OutOfSync" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Updated health status: Progressing -> Healthy" application=test-cmd-plugin dest-namespace=default dest-server="https://kubernetes.default.svc" reason=ResourceUpdated type=Normal
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Update successful" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Reconciliation completed" application=test-cmd-plugin dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=0 fields.level=1 git_ms=5 health_ms=0 live_ms=0 settings_ms=0 sync_ms=0 time_ms=21
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Successfully deleted 0 resources" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:57:16Z" level=info msg="Deleting resources" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:58:10Z" level=info msg="Deleting resources" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:58:10Z" level=info msg="Deleting application's resources with Foreground propagation policy" application=test-cmd-plugin
[argocd-application-controller-84cdb9878f-c8kwm] time="2022-01-20T21:58:10Z" level=info msg="Successfully deleted 0 resources" application=test-cmd-plugin
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: test-cmd-plugin
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: default
server: https://kubernetes.default.svc
source:
repoURL: https://github.com/pmorch/monitorfiles.git
path: .
targetRevision: HEAD
plugin:
env:
- name: FOO
value: myfoo
project: default
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- PruneLast=true
- CreateNamespace=true
global:
image:
imagePullPolicy: Always
server:
# without --insecure, accessing https://argocd.local.example.com redirects to itself...
extraArgs:
- --insecure
ingress:
enabled: true
hosts:
- argocd.local.example.com
config:
configManagementPlugins: |
- name: cmp-plugin
generate:
command: [sh, -c, 'echo "{\"kind\": \"ConfigMap\", \"apiVersion\": \"v1\", \"metadata\": { \"name\": \"$ARGOCD_APP_NAME\", \"namespace\": \"$ARGOCD_APP_NAMESPACE\", \"annotations\": {\"in-process\": \"true\", \"Foo\": \"$FOO\", \"KubeVersion\": \"$KUBE_VERSION\", \"KubeApiVersion\": \"$KUBE_API_VERSIONS\",\"Bar\": \"baz\"}}}"']
repoServer:
extraContainers:
- name: cmp
command: [/var/run/argocd/argocd-cmp-server]
image: busybox:latest
imagePullPolicy: Always
securityContext:
runAsNonRoot: true
runAsUser: 999
volumeMounts:
- mountPath: /var/run/argocd
name: var-files
- mountPath: /home/argocd/cmp-server/plugins
name: plugins
- mountPath: /tmp
name: tmp-dir
- mountPath: /home/argocd/cmp-server/config/plugin.yaml
subPath: plugin.yaml
name: cmp-plugin
volumes:
- configMap:
name: cmp-plugin
name: cmp-plugin
configs:
secret:
# htpasswd is in "apt install apache2-utils", but lets not
# require installation of apache2-utils to create the non-secret
# "admin" password
# htpasswd -bnBC 10 "" admin | tr -d ':\n' && echo
# $2y$10$MtWvAKK4na9lNmQWSEHmo.7Zy7B26mZ2af0LhJ8scEcuw3PSzBokK
argocdServerAdminPassword: "$2y$10$MtWvAKK4na9lNmQWSEHmo.7Zy7B26mZ2af0LhJ8scEcuw3PSzBokK"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment