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

feat(appset): reduce cluster secret logging #21109

Merged
merged 5 commits into from
Dec 9, 2024

Conversation

rumstead
Copy link
Member

@rumstead rumstead commented Dec 9, 2024

Currently, the cluster secret matching logs a line every time a cluster generator matches a cluster secret. When the reconciles were happening synchronously the logs had more meaning. Now that reconciles can occur asynchronously, you cannot tie the log line to which applicationset generator caused it.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
@rumstead rumstead requested a review from a team as a code owner December 9, 2024 17:32
Copy link

bunnyshell bot commented Dec 9, 2024

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.20%. Comparing base (8f0d3d0) to head (e9fbab1).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21109      +/-   ##
==========================================
+ Coverage   55.17%   55.20%   +0.02%     
==========================================
  Files         324      324              
  Lines       55581    55584       +3     
==========================================
+ Hits        30669    30687      +18     
+ Misses      22284    22268      -16     
- Partials     2628     2629       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
@rumstead
Copy link
Member Author

rumstead commented Dec 9, 2024

time="2024-12-09T13:32:08-05:00" level=info msg="listed ApplicationSets" count=1 type=createSecretEventHandler
time="2024-12-09T13:32:11-05:00" level=debug msg="clusters matching labels: 2" applicationset=cluster
time="2024-12-09T13:32:11-05:00" level=debug msg="Using flat mode = false for cluster generator" applicationset=cluster
time="2024-12-09T13:32:11-05:00" level=debug msg="matched cluster secret" applicationset=cluster cluster=cluster-k3d-admin-serverlb-2295321533
time="2024-12-09T13:32:11-05:00" level=debug msg="matched cluster secret" applicationset=cluster cluster=cluster-k3d-dev-serverlb-422902893
time="2024-12-09T13:32:11-05:00" level=info msg="generated 2 applications" applicationset=argocd/cluster generator="{nil &ClusterGenerator{Selector:{map[kubernetes.cnp.io/cluster.segment:multitenant] []},Template:ApplicationSetTemplate{ApplicationSetTemplateMeta:ApplicationSetTemplateMeta{Name:,Namespace:,Labels:map[string]string{},Annotations:map[string]string{},Finalizers:[],},Spec:ApplicationSpec{Source:nil,Destination:ApplicationDestination{Server:,Namespace:,Name:,},Project:,SyncPolicy:nil,IgnoreDifferences:[]ResourceIgnoreDifferences{},Info:[]Info{},RevisionHistoryLimit:nil,Sources:[]ApplicationSource{},},},Values:map[string]string{},FlatList:false,} nil nil nil nil nil nil nil nil}"
time="2024-12-09T13:32:11-05:00" level=debug msg="apps from generator: [{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:cluster-generator-admin GenerateName: Namespace:argocd SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[app-type:cluster] Annotations:map[] OwnerReferences:[] Finalizers:[resources-finalizer.argocd.argoproj.io] ManagedFields:[]} Spec:{Source:&ApplicationSource{RepoURL:https://github.com/rumstead/argocd-playground.git,Path:manifests/kustomize/,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Directory:nil,Plugin:nil,Chart:,Ref:,Name:,} Destination:{Server: Namespace:cluster-generator Name:in-cluster isServerInferred:false} Project:default SyncPolicy:&SyncPolicy{Automated:&SyncPolicyAutomated{Prune:true,SelfHeal:false,AllowEmpty:false,},SyncOptions:[CreateNamespace=true],Retry:nil,ManagedNamespaceMetadata:nil,} IgnoreDifferences:[] Info:[] RevisionHistoryLimit:<nil> Sources:[]} Status:{Resources:[] Sync:{Status: ComparedTo:{Source:{RepoURL: Path: TargetRevision: Helm:nil Kustomize:nil Directory:nil Plugin:nil Chart: Ref: Name:} Destination:{Server: Namespace: Name: isServerInferred:false} Sources:[] IgnoreDifferences:[]} Revision: Revisions:[]} Health:{Status: Message: LastTransitionTime:<nil>} History:[] Conditions:[] ReconciledAt:<nil> OperationState:nil ObservedAt:<nil> SourceType: Summary:{ExternalURLs:[] Images:[]} ResourceHealthSource: SourceTypes:[] ControllerNamespace:} Operation:nil} {TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:cluster-generator-dev GenerateName: Namespace:argocd SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[app-type:cluster] Annotations:map[] OwnerReferences:[] Finalizers:[resources-finalizer.argocd.argoproj.io] ManagedFields:[]} Spec:{Source:&ApplicationSource{RepoURL:https://github.com/rumstead/argocd-playground.git,Path:manifests/kustomize/,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Directory:nil,Plugin:nil,Chart:,Ref:,Name:,} Destination:{Server: Namespace:cluster-generator Name:in-cluster isServerInferred:false} Project:default SyncPolicy:&SyncPolicy{Automated:&SyncPolicyAutomated{Prune:true,SelfHeal:false,AllowEmpty:false,},SyncOptions:[CreateNamespace=true],Retry:nil,ManagedNamespaceMetadata:nil,} IgnoreDifferences:[] Info:[] RevisionHistoryLimit:<nil> Sources:[]} Status:{Resources:[] Sync:{Status: ComparedTo:{Source:{RepoURL: Path: TargetRevision: Helm:nil Kustomize:nil Directory:nil Plugin:nil Chart: Ref: Name:} Destination:{Server: Namespace: Name: isServerInferred:false} Sources:[] IgnoreDifferences:[]} Revision: Revisions:[]} Health:{Status: Message: LastTransitionTime:<nil>} History:[] Conditions:[] ReconciledAt:<nil> OperationState:nil ObservedAt:<nil> SourceType: Summary:{ExternalURLs:[] Images:[]} ResourceHealthSource: SourceTypes:[] ControllerNamespace:} Operation:nil}]" applicationset=argocd/cluster generator="{nil &ClusterGenerator{Selector:{map[kubernetes.cnp.io/cluster.segment:multitenant] []},Template:ApplicationSetTemplate{ApplicationSetTemplateMeta:ApplicationSetTemplateMeta{Name:,Namespace:,Labels:map[string]string{},Annotations:map[string]string{},Finalizers:[],},Spec:ApplicationSpec{Source:nil,Destination:ApplicationDestination{Server:,Namespace:,Name:,},Project:,SyncPolicy:nil,IgnoreDifferences:[]ResourceIgnoreDifferences{},Info:[]Info{},RevisionHistoryLimit:nil,Sources:[]ApplicationSource{},},},Values:map[string]string{},FlatList:false,} nil nil nil nil nil nil nil nil}"
time="2024-12-09T13:32:11-05:00" level=debug msg="unchanged Application" app=argocd/cluster-generator-admin applicationset=argocd/cluster
time="2024-12-09T13:32:11-05:00" level=debug msg="unchanged Application" app=argocd/cluster-generator-dev applicationset=argocd/cluster
time="2024-12-09T13:32:11-05:00" level=info msg="end reconcile in 2.973307334s" applicationset=argocd/cluster requeueAfter=0s
time="2024-12-09T13:32:12-05:00" level=debug msg="clusters matching labels: 2" applicationset=cluster
time="2024-12-09T13:32:12-05:00" level=debug msg="Using flat mode = false for cluster generator" applicationset=cluster
time="2024-12-09T13:32:12-05:00" level=debug msg="matched cluster secret" applicationset=cluster cluster=cluster-k3d-admin-serverlb-2295321533
time="2024-12-09T13:32:12-05:00" level=debug msg="matched cluster secret" applicationset=cluster cluster=cluster-k3d-dev-serverlb-422902893
time="2024-12-09T13:32:12-05:00" level=info msg="generated 2 applications" applicationset=argocd/cluster generator="{nil &ClusterGenerator{Selector:{map[kubernetes.cnp.io/cluster.segment:multitenant] []},Template:ApplicationSetTemplate{ApplicationSetTemplateMeta:ApplicationSetTemplateMeta{Name:,Namespace:,Labels:map[string]string{},Annotations:map[string]string{},Finalizers:[],},Spec:ApplicationSpec{Source:nil,Destination:ApplicationDestination{Server:,Namespace:,Name:,},Project:,SyncPolicy:nil,IgnoreDifferences:[]ResourceIgnoreDifferences{},Info:[]Info{},RevisionHistoryLimit:nil,Sources:[]ApplicationSource{},},},Values:map[string]string{},FlatList:false,} nil nil nil nil nil nil nil nil}"
time="2024-12-09T13:32:12-05:00" level=debug msg="apps from generator: [{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:cluster-generator-admin GenerateName: Namespace:argocd SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[app-type:cluster] Annotations:map[] OwnerReferences:[] Finalizers:[resources-finalizer.argocd.argoproj.io] ManagedFields:[]} Spec:{Source:&ApplicationSource{RepoURL:https://github.com/rumstead/argocd-playground.git,Path:manifests/kustomize/,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Directory:nil,Plugin:nil,Chart:,Ref:,Name:,} Destination:{Server: Namespace:cluster-generator Name:in-cluster isServerInferred:false} Project:default SyncPolicy:&SyncPolicy{Automated:&SyncPolicyAutomated{Prune:true,SelfHeal:false,AllowEmpty:false,},SyncOptions:[CreateNamespace=true],Retry:nil,ManagedNamespaceMetadata:nil,} IgnoreDifferences:[] Info:[] RevisionHistoryLimit:<nil> Sources:[]} Status:{Resources:[] Sync:{Status: ComparedTo:{Source:{RepoURL: Path: TargetRevision: Helm:nil Kustomize:nil Directory:nil Plugin:nil Chart: Ref: Name:} Destination:{Server: Namespace: Name: isServerInferred:false} Sources:[] IgnoreDifferences:[]} Revision: Revisions:[]} Health:{Status: Message: LastTransitionTime:<nil>} History:[] Conditions:[] ReconciledAt:<nil> OperationState:nil ObservedAt:<nil> SourceType: Summary:{ExternalURLs:[] Images:[]} ResourceHealthSource: SourceTypes:[] ControllerNamespace:} Operation:nil} {TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:cluster-generator-dev GenerateName: Namespace:argocd SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[app-type:cluster] Annotations:map[] OwnerReferences:[] Finalizers:[resources-finalizer.argocd.argoproj.io] ManagedFields:[]} Spec:{Source:&ApplicationSource{RepoURL:https://github.com/rumstead/argocd-playground.git,Path:manifests/kustomize/,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Directory:nil,Plugin:nil,Chart:,Ref:,Name:,} Destination:{Server: Namespace:cluster-generator Name:in-cluster isServerInferred:false} Project:default SyncPolicy:&SyncPolicy{Automated:&SyncPolicyAutomated{Prune:true,SelfHeal:false,AllowEmpty:false,},SyncOptions:[CreateNamespace=true],Retry:nil,ManagedNamespaceMetadata:nil,} IgnoreDifferences:[] Info:[] RevisionHistoryLimit:<nil> Sources:[]} Status:{Resources:[] Sync:{Status: ComparedTo:{Source:{RepoURL: Path: TargetRevision: Helm:nil Kustomize:nil Directory:nil Plugin:nil Chart: Ref: Name:} Destination:{Server: Namespace: Name: isServerInferred:false} Sources:[] IgnoreDifferences:[]} Revision: Revisions:[]} Health:{Status: Message: LastTransitionTime:<nil>} History:[] Conditions:[] ReconciledAt:<nil> OperationState:nil ObservedAt:<nil> SourceType: Summary:{ExternalURLs:[] Images:[]} ResourceHealthSource: SourceTypes:[] ControllerNamespace:} Operation:nil}]" applicationset=argocd/cluster generator="{nil &ClusterGenerator{Selector:{map[kubernetes.cnp.io/cluster.segment:multitenant] []},Template:ApplicationSetTemplate{ApplicationSetTemplateMeta:ApplicationSetTemplateMeta{Name:,Namespace:,Labels:map[string]string{},Annotations:map[string]string{},Finalizers:[],},Spec:ApplicationSpec{Source:nil,Destination:ApplicationDestination{Server:,Namespace:,Name:,},Project:,SyncPolicy:nil,IgnoreDifferences:[]ResourceIgnoreDifferences{},Info:[]Info{},RevisionHistoryLimit:nil,Sources:[]ApplicationSource{},},},Values:map[string]string{},FlatList:false,} nil nil nil nil nil nil nil nil}"
time="2024-12-09T13:32:12-05:00" level=debug msg="unchanged Application" app=argocd/cluster-generator-admin applicationset=argocd/cluster
time="2024-12-09T13:32:12-05:00" level=debug msg="unchanged Application" app=argocd/cluster-generator-dev applicationset=argocd/cluster
time="2024-12-09T13:32:12-05:00" level=info msg="end reconcile in 693.567125ms" applicationset=argocd/cluster requeueAfter=0s

@rumstead
Copy link
Member Author

rumstead commented Dec 9, 2024

I would really like to also remove the generator dump from this Info line as well.

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
@rumstead
Copy link
Member Author

rumstead commented Dec 9, 2024

Debug enabled

time="2024-12-09T14:29:33-05:00" level=info msg="listed ApplicationSets" count=1 type=createSecretEventHandler
time="2024-12-09T14:29:33-05:00" level=info msg="processing event for cluster secret" name=cluster-k3d-dev-serverlb-422902893 namespace=argocd type=createSecretEventHandler
time="2024-12-09T14:29:33-05:00" level=info msg="listed ApplicationSets" count=1 type=createSecretEventHandler
time="2024-12-09T14:29:33-05:00" level=debug msg="clusters matching labels: 2" applicationset=cluster namespace=argocd
time="2024-12-09T14:29:33-05:00" level=debug msg="Using flat mode = false for cluster generator" applicationset=cluster namespace=argocd
time="2024-12-09T14:29:33-05:00" level=debug msg="matched cluster secret" applicationset=cluster cluster=cluster-k3d-admin-serverlb-2295321533 namespace=argocd
time="2024-12-09T14:29:33-05:00" level=debug msg="matched cluster secret" applicationset=cluster cluster=cluster-k3d-dev-serverlb-422902893 namespace=argocd
time="2024-12-09T14:29:33-05:00" level=debug msg="apps from generator: [{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:cluster-generator-admin GenerateName: Namespace:argocd SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[app-type:cluster] Annotations:map[] OwnerReferences:[] Finalizers:[resources-finalizer.argocd.argoproj.io] ManagedFields:[]} Spec:{Source:&ApplicationSource{RepoURL:https://github.com/rumstead/argocd-playground.git,Path:manifests/kustomize/,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Directory:nil,Plugin:nil,Chart:,Ref:,Name:,} Destination:{Server: Namespace:cluster-generator Name:in-cluster isServerInferred:false} Project:default SyncPolicy:&SyncPolicy{Automated:&SyncPolicyAutomated{Prune:true,SelfHeal:false,AllowEmpty:false,},SyncOptions:[CreateNamespace=true],Retry:nil,ManagedNamespaceMetadata:nil,} IgnoreDifferences:[] Info:[] RevisionHistoryLimit:<nil> Sources:[]} Status:{Resources:[] Sync:{Status: ComparedTo:{Source:{RepoURL: Path: TargetRevision: Helm:nil Kustomize:nil Directory:nil Plugin:nil Chart: Ref: Name:} Destination:{Server: Namespace: Name: isServerInferred:false} Sources:[] IgnoreDifferences:[]} Revision: Revisions:[]} Health:{Status: Message: LastTransitionTime:<nil>} History:[] Conditions:[] ReconciledAt:<nil> OperationState:nil ObservedAt:<nil> SourceType: Summary:{ExternalURLs:[] Images:[]} ResourceHealthSource: SourceTypes:[] ControllerNamespace:} Operation:nil} {TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:cluster-generator-dev GenerateName: Namespace:argocd SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[app-type:cluster] Annotations:map[] OwnerReferences:[] Finalizers:[resources-finalizer.argocd.argoproj.io] ManagedFields:[]} Spec:{Source:&ApplicationSource{RepoURL:https://github.com/rumstead/argocd-playground.git,Path:manifests/kustomize/,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Directory:nil,Plugin:nil,Chart:,Ref:,Name:,} Destination:{Server: Namespace:cluster-generator Name:in-cluster isServerInferred:false} Project:default SyncPolicy:&SyncPolicy{Automated:&SyncPolicyAutomated{Prune:true,SelfHeal:false,AllowEmpty:false,},SyncOptions:[CreateNamespace=true],Retry:nil,ManagedNamespaceMetadata:nil,} IgnoreDifferences:[] Info:[] RevisionHistoryLimit:<nil> Sources:[]} Status:{Resources:[] Sync:{Status: ComparedTo:{Source:{RepoURL: Path: TargetRevision: Helm:nil Kustomize:nil Directory:nil Plugin:nil Chart: Ref: Name:} Destination:{Server: Namespace: Name: isServerInferred:false} Sources:[] IgnoreDifferences:[]} Revision: Revisions:[]} Health:{Status: Message: LastTransitionTime:<nil>} History:[] Conditions:[] ReconciledAt:<nil> OperationState:nil ObservedAt:<nil> SourceType: Summary:{ExternalURLs:[] Images:[]} ResourceHealthSource: SourceTypes:[] ControllerNamespace:} Operation:nil}]" applicationset=argocd/cluster generator="{nil &ClusterGenerator{Selector:{map[kubernetes.cnp.io/cluster.segment:multitenant] []},Template:ApplicationSetTemplate{ApplicationSetTemplateMeta:ApplicationSetTemplateMeta{Name:,Namespace:,Labels:map[string]string{},Annotations:map[string]string{},Finalizers:[],},Spec:ApplicationSpec{Source:nil,Destination:ApplicationDestination{Server:,Namespace:,Name:,},Project:,SyncPolicy:nil,IgnoreDifferences:[]ResourceIgnoreDifferences{},Info:[]Info{},RevisionHistoryLimit:nil,Sources:[]ApplicationSource{},},},Values:map[string]string{},FlatList:false,} nil nil nil nil nil nil nil nil}"
time="2024-12-09T14:29:33-05:00" level=debug msg="unchanged Application" app=argocd/cluster-generator-admin applicationset=argocd/cluster
time="2024-12-09T14:29:33-05:00" level=debug msg="unchanged Application" app=argocd/cluster-generator-dev applicationset=argocd/cluster
time="2024-12-09T14:29:33-05:00" level=info msg="end reconcile in 158.934ms" applicationset=argocd/cluster requeueAfter=0s
time="2024-12-09T14:29:33-05:00" level=debug msg="clusters matching labels: 2" applicationset=cluster namespace=argocd
time="2024-12-09T14:29:33-05:00" level=debug msg="Using flat mode = false for cluster generator" applicationset=cluster namespace=argocd
time="2024-12-09T14:29:33-05:00" level=debug msg="matched cluster secret" applicationset=cluster cluster=cluster-k3d-admin-serverlb-2295321533 namespace=argocd
time="2024-12-09T14:29:33-05:00" level=debug msg="matched cluster secret" applicationset=cluster cluster=cluster-k3d-dev-serverlb-422902893 namespace=argocd
time="2024-12-09T14:29:33-05:00" level=debug msg="apps from generator: [{TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:cluster-generator-admin GenerateName: Namespace:argocd SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[app-type:cluster] Annotations:map[] OwnerReferences:[] Finalizers:[resources-finalizer.argocd.argoproj.io] ManagedFields:[]} Spec:{Source:&ApplicationSource{RepoURL:https://github.com/rumstead/argocd-playground.git,Path:manifests/kustomize/,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Directory:nil,Plugin:nil,Chart:,Ref:,Name:,} Destination:{Server: Namespace:cluster-generator Name:in-cluster isServerInferred:false} Project:default SyncPolicy:&SyncPolicy{Automated:&SyncPolicyAutomated{Prune:true,SelfHeal:false,AllowEmpty:false,},SyncOptions:[CreateNamespace=true],Retry:nil,ManagedNamespaceMetadata:nil,} IgnoreDifferences:[] Info:[] RevisionHistoryLimit:<nil> Sources:[]} Status:{Resources:[] Sync:{Status: ComparedTo:{Source:{RepoURL: Path: TargetRevision: Helm:nil Kustomize:nil Directory:nil Plugin:nil Chart: Ref: Name:} Destination:{Server: Namespace: Name: isServerInferred:false} Sources:[] IgnoreDifferences:[]} Revision: Revisions:[]} Health:{Status: Message: LastTransitionTime:<nil>} History:[] Conditions:[] ReconciledAt:<nil> OperationState:nil ObservedAt:<nil> SourceType: Summary:{ExternalURLs:[] Images:[]} ResourceHealthSource: SourceTypes:[] ControllerNamespace:} Operation:nil} {TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:cluster-generator-dev GenerateName: Namespace:argocd SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[app-type:cluster] Annotations:map[] OwnerReferences:[] Finalizers:[resources-finalizer.argocd.argoproj.io] ManagedFields:[]} Spec:{Source:&ApplicationSource{RepoURL:https://github.com/rumstead/argocd-playground.git,Path:manifests/kustomize/,TargetRevision:HEAD,Helm:nil,Kustomize:nil,Directory:nil,Plugin:nil,Chart:,Ref:,Name:,} Destination:{Server: Namespace:cluster-generator Name:in-cluster isServerInferred:false} Project:default SyncPolicy:&SyncPolicy{Automated:&SyncPolicyAutomated{Prune:true,SelfHeal:false,AllowEmpty:false,},SyncOptions:[CreateNamespace=true],Retry:nil,ManagedNamespaceMetadata:nil,} IgnoreDifferences:[] Info:[] RevisionHistoryLimit:<nil> Sources:[]} Status:{Resources:[] Sync:{Status: ComparedTo:{Source:{RepoURL: Path: TargetRevision: Helm:nil Kustomize:nil Directory:nil Plugin:nil Chart: Ref: Name:} Destination:{Server: Namespace: Name: isServerInferred:false} Sources:[] IgnoreDifferences:[]} Revision: Revisions:[]} Health:{Status: Message: LastTransitionTime:<nil>} History:[] Conditions:[] ReconciledAt:<nil> OperationState:nil ObservedAt:<nil> SourceType: Summary:{ExternalURLs:[] Images:[]} ResourceHealthSource: SourceTypes:[] ControllerNamespace:} Operation:nil}]" applicationset=argocd/cluster generator="{nil &ClusterGenerator{Selector:{map[kubernetes.cnp.io/cluster.segment:multitenant] []},Template:ApplicationSetTemplate{ApplicationSetTemplateMeta:ApplicationSetTemplateMeta{Name:,Namespace:,Labels:map[string]string{},Annotations:map[string]string{},Finalizers:[],},Spec:ApplicationSpec{Source:nil,Destination:ApplicationDestination{Server:,Namespace:,Name:,},Project:,SyncPolicy:nil,IgnoreDifferences:[]ResourceIgnoreDifferences{},Info:[]Info{},RevisionHistoryLimit:nil,Sources:[]ApplicationSource{},},},Values:map[string]string{},FlatList:false,} nil nil nil nil nil nil nil nil}"
time="2024-12-09T14:29:33-05:00" level=debug msg="unchanged Application" app=argocd/cluster-generator-admin applicationset=argocd/cluster
time="2024-12-09T14:29:33-05:00" level=debug msg="unchanged Application" app=argocd/cluster-generator-dev applicationset=argocd/cluster
time="2024-12-09T14:29:33-05:00" level=info msg="end reconcile in 37.093792ms" applicationset=argocd/cluster requeueAfter=0s
time="2024-12-09T14:30:21-05:00" level=debug msg="received update event from owning an application" app=argocd/cluster-generator-admin
time="2024-12-09T14:30:21-05:00" level=debug msg="requeue: false caused by application cluster-generator-admin" app=argocd/cluster-generator-admin requeue=false
time="2024-12-09T14:30:22-05:00" level=debug msg="received update event from owning an application" app=argocd/cluster-generator-dev
time="2024-12-09T14:30:22-05:00" level=debug msg="requeue: false caused by application cluster-generator-dev" app=argocd/cluster-generator-dev requeue=false

Info level

time="2024-12-09T14:32:58-05:00" level=info msg="processing event for cluster secret" name=cluster-k3d-admin-serverlb-2295321533 namespace=argocd type=createSecretEventHandler
time="2024-12-09T14:32:58-05:00" level=info msg="Starting workers" controller=applicationset controllerGroup=argoproj.io controllerKind=ApplicationSet worker count=10
time="2024-12-09T14:32:58-05:00" level=info msg="listed ApplicationSets" count=1 type=createSecretEventHandler
time="2024-12-09T14:32:58-05:00" level=info msg="processing event for cluster secret" name=cluster-k3d-dev-serverlb-422902893 namespace=argocd type=createSecretEventHandler
time="2024-12-09T14:32:58-05:00" level=info msg="listed ApplicationSets" count=1 type=createSecretEventHandler
time="2024-12-09T14:32:58-05:00" level=info msg="generated 2 applications" applicationset=argocd/cluster
time="2024-12-09T14:32:58-05:00" level=info msg="end reconcile in 151.119917ms" applicationset=argocd/cluster requeueAfter=0s
time="2024-12-09T14:32:58-05:00" level=info msg="generated 2 applications" applicationset=argocd/cluster
time="2024-12-09T14:32:58-05:00" level=info msg="end reconcile in 22.246166ms" applicationset=argocd/cluster requeueAfter=0s

@@ -69,9 +69,11 @@ func GenerateApplications(logCtx *log.Entry, applicationSetInfo argov1alpha1.App
res = append(res, *app)
}
}

logCtx.WithField("generator", requestedGenerator).Infof("generated %d applications", len(res))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the convo in slack, I am removing the struct dump for info level logs.

@rumstead rumstead requested a review from crenshaw-dev December 9, 2024 19:40
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
@crenshaw-dev crenshaw-dev merged commit dfbfdba into argoproj:master Dec 9, 2024
27 checks passed
GuySaar8 pushed a commit to GuySaar8/argo-cd that referenced this pull request Dec 12, 2024
* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* e2e

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

---------

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
dudo pushed a commit to dudo/argo-cd that referenced this pull request Jan 18, 2025
* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* e2e

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

---------

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Signed-off-by: Brett C. Dudo <brett@dudo.io>
revitalbarletz pushed a commit to revitalbarletz/argo-cd that referenced this pull request Jan 20, 2025
* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* feat(appset): reduce cluster secret logging

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

* e2e

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

---------

Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants