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

Fleet Performance Improvements #12413

Closed
wants to merge 1 commit into from

Conversation

richard-cox
Copy link
Member

@richard-cox richard-cox commented Oct 29, 2024

Summary

Contributes to #12424

Occurred changes and/or fixed issues

Technical notes summary

Areas or cases that should be tested

Areas which could experience regressions

Screenshot/Video

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

const perEntry = r.perClusterState?.find((x) => x.clusterId === c.id);
const tooMany = r.perClusterState?.length >= 10 || false;
const tooMany = r.perClusterState?.length >= 10 || false; // FIXME: shouldn't we not calc perEntry if there are too many?
Copy link
Member

@manno manno Oct 30, 2024

Choose a reason for hiding this comment

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

Additionally, in the current implementation Fleet creates an incomplete flag on the resource and shouldn't add more than 10 perCluster states.

@@ -323,14 +324,18 @@ export default class GitRepo extends SteveModel {
get resourcesStatuses() {
const clusters = this.targetClusters || [];
const resources = this.status?.resources || [];
const conditions = this.status?.conditions || [];
// const conditions = this.status?.conditions || [];
// const bundleDeployments = this.bundleDeployments || [];

const out = [];

for (const c of clusters) {
Copy link
Member

Choose a reason for hiding this comment

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

This code assumes each resource is installed on every cluster. This is not always the case. Users can for example use targetCustomization to deploy resources only to some clusters. Additionally, popular charts install different resources depending on the k8s version of the cluster. Some charts even allow to deploy "extraObjects" via a helm chart value. 🤷

Copy link
Member

Choose a reason for hiding this comment

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

Regarding get targetClusters() { that can be overriden via fleet.yaml so this code can't really deduct the targeted clusters anymore.

Copy link
Member Author

Choose a reason for hiding this comment

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

ouch, as in the gitrepo resource has a native targetClusters property?

@richard-cox
Copy link
Member Author

superseded by #12521

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.

3 participants