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

Adds serviceaccounts,secrets and configmaps GVRs to the default Syncer sync list #680

Merged

Conversation

jmprusi
Copy link
Member

@jmprusi jmprusi commented Mar 10, 2022

This PR adds to the default Sync list of the syncer, the GVRs of:

  • Configmap
  • ServiceAccounts
  • Secrets

This means, that even if not specified via API imports, or "resources-to-sync" args, the syncer will sync those resources to the workloadclusters.

Pushing the discussion on how to improve the default syncing into Prototype4: kcp-dev/contrib-tmc#137

This is related to: #280

@jmprusi jmprusi force-pushed the jmprusi-syncer-sync-configmaps-serviceaccounts branch from d394699 to 8252223 Compare March 10, 2022 16:08
@jmprusi jmprusi changed the title Adds serviceaccounts and configmaps GVRs to the default Syncer sync list Adds serviceaccounts,secrets and configmaps GVRs to the default Syncer sync list Mar 10, 2022
@@ -176,7 +176,7 @@ func getAllGVRs(discoveryClient discovery.DiscoveryInterface, resourcesToSync ..
return nil, err
}
}
gvrstrs := []string{"namespaces.v1."} // A syncer should always watch namespaces
gvrstrs := []string{"namespaces.v1.", "serviceaccounts.v1.", "configmaps.v1.", "secrets.v1."} // A syncer should always watch namespaces, serviceaccounts, secrets and configmaps.
Copy link
Member

Choose a reason for hiding this comment

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

does this also mean they are synced by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes... But we can tune the scheduler to avoid that.

Copy link
Member Author

Choose a reason for hiding this comment

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

@sttts I've pushed a WIP commit, trying to solve that issue, let me know what you think

Copy link
Member Author

Choose a reason for hiding this comment

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

as we discussed on slack, I've dropped those changes, and let's assume for now, that we sync everything by default.

Copy link
Member Author

@jmprusi jmprusi Mar 16, 2022

Choose a reason for hiding this comment

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

Pushing the default syncing discussion into Prototype4 https://github.com/kcp-dev/kcp/issues/727

@jmprusi jmprusi changed the title Adds serviceaccounts,secrets and configmaps GVRs to the default Syncer sync list WIP Adds serviceaccounts,secrets and configmaps GVRs to the default Syncer sync list Mar 14, 2022
@jmprusi jmprusi force-pushed the jmprusi-syncer-sync-configmaps-serviceaccounts branch 2 times, most recently from 8124ae8 to a48b537 Compare March 15, 2022 14:37
@jmprusi jmprusi changed the title WIP Adds serviceaccounts,secrets and configmaps GVRs to the default Syncer sync list Adds serviceaccounts,secrets and configmaps GVRs to the default Syncer sync list Mar 15, 2022
@jmprusi jmprusi force-pushed the jmprusi-syncer-sync-configmaps-serviceaccounts branch 3 times, most recently from 1a48143 to 5042497 Compare March 15, 2022 18:11
@jmprusi jmprusi requested a review from sttts March 15, 2022 18:15
@jmprusi jmprusi enabled auto-merge March 16, 2022 11:49
@jmprusi jmprusi force-pushed the jmprusi-syncer-sync-configmaps-serviceaccounts branch 2 times, most recently from baf4ceb to 34e0dcf Compare March 16, 2022 11:58
@jmprusi jmprusi merged commit 6d1c3f4 into kcp-dev:main Mar 16, 2022
@jmprusi jmprusi deleted the jmprusi-syncer-sync-configmaps-serviceaccounts branch March 16, 2022 12:38
@kcp-ci-bot kcp-ci-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants