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

Extend project-synchronizer to sync labels #12791

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

xmudrii
Copy link
Member

@xmudrii xmudrii commented Oct 26, 2023

What this PR does / why we need it:

We observed that the metering report doesn't contain data for project-labels when master and seed clusters are separate. After some additional investigation, we found out that the reason for that is that we don't sync labels from Project objects in the master cluster to Project objects in the seed clusters. Metering uses the kubermatic_project_labels to determine Project labels, and the data source is per-seed Prometheus running in the monitoring namespace.

kubermatic_project_labels is exported by both kubermatic-master-controller-manager and kubermatic-seed-controller-manager, but because this Prometheus is per-seed, only data exported by kubermatic-seed-controller-manager is accessible. For that to work properly, we also need to have labels on Project copy in the seed cluster.

What type of PR is this?

/kind bug

Does this PR introduce a user-facing change? Then add your Release Note here:

Extend project-synchronizer controller in kubermatic-master-controller-manager to propagate labels from Projects in the master cluster to Projects in the seed cluster. This fixes an issue where the metering report doesn't contain project-labels in separate master/seed setups

Documentation:

NONE

/assign @xrstf @embik

@kubermatic-bot kubermatic-bot added docs/none Denotes a PR that doesn't need documentation (changes). release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Oct 26, 2023
@kubermatic-bot kubermatic-bot added dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. kind/bug Categorizes issue or PR as related to a bug. sig/app-management Denotes a PR or issue as being assigned to SIG App Management. do-not-merge/code-freeze Indicates that a PR should not merge because it has not been approved for code freeze yet. labels Oct 26, 2023
@xmudrii xmudrii added the backport-needed Denotes a PR or issue that has not been fully backported. label Oct 26, 2023
@kubermatic-bot kubermatic-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 26, 2023
@xmudrii
Copy link
Member Author

xmudrii commented Oct 26, 2023

/cherrypick release/v2.23

@kubermatic-bot
Copy link
Contributor

@xmudrii: once the present PR merges, I will cherry-pick it on top of release/v2.23 in a new PR and assign it to you.

In response to this:

/cherrypick release/v2.23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@xmudrii
Copy link
Member Author

xmudrii commented Oct 26, 2023

/cherrypick release/v2.22

@kubermatic-bot
Copy link
Contributor

@xmudrii: once the present PR merges, I will cherry-pick it on top of release/v2.22 in a new PR and assign it to you.

In response to this:

/cherrypick release/v2.22

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@xmudrii
Copy link
Member Author

xmudrii commented Oct 26, 2023

/cherrypick release/v2.21

@kubermatic-bot
Copy link
Contributor

@xmudrii: once the present PR merges, I will cherry-pick it on top of release/v2.21 in a new PR and assign it to you.

In response to this:

/cherrypick release/v2.21

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
@xrstf
Copy link
Contributor

xrstf commented Oct 26, 2023

/approve
/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2023
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1cd63c70548d0b4436a0464e6b800ae06b5b5c83

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xrstf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 26, 2023
@embik embik added the code-freeze-approved Indicates a PR has been approved by release managers during code freeze. label Oct 26, 2023
@kubermatic-bot kubermatic-bot removed the do-not-merge/code-freeze Indicates that a PR should not merge because it has not been approved for code freeze yet. label Oct 26, 2023
@xrstf xrstf added this to the KKP 2.24 milestone Oct 26, 2023
@kubermatic-bot kubermatic-bot merged commit a239f94 into kubermatic:main Oct 26, 2023
16 checks passed
@kubermatic-bot
Copy link
Contributor

@xmudrii: #12791 failed to apply on top of branch "release/v2.23":

Applying: Extend project-synchronizer to sync labels
Using index info to reconstruct a base tree...
M	pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
CONFLICT (content): Merge conflict in pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Extend project-synchronizer to sync labels
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release/v2.23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubermatic-bot
Copy link
Contributor

@xmudrii: #12791 failed to apply on top of branch "release/v2.22":

Applying: Extend project-synchronizer to sync labels
Using index info to reconstruct a base tree...
M	pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
CONFLICT (content): Merge conflict in pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Extend project-synchronizer to sync labels
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release/v2.22

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubermatic-bot
Copy link
Contributor

@xmudrii: #12791 failed to apply on top of branch "release/v2.21":

Applying: Extend project-synchronizer to sync labels
Using index info to reconstruct a base tree...
M	pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
M	pkg/controller/master-controller-manager/project-synchronizer/resources.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/master-controller-manager/project-synchronizer/resources.go
Auto-merging pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
CONFLICT (content): Merge conflict in pkg/controller/master-controller-manager/project-synchronizer/controller_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Extend project-synchronizer to sync labels
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release/v2.21

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pkprzekwas pkprzekwas added backport-complete Denotes a PR or issue which has been fully backported to all required release branches. and removed backport-needed Denotes a PR or issue that has not been fully backported. labels Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-complete Denotes a PR or issue which has been fully backported to all required release branches. code-freeze-approved Indicates a PR has been approved by release managers during code freeze. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/app-management Denotes a PR or issue as being assigned to SIG App Management. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants