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

karmada operator: change karmada system namespace to karmada-system #3750

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

calvin0327
Copy link

What type of PR is this?
/kind feature

What this PR does / why we need it:

Change the karmada controlplane system namespace to karmada-system. keep the same behavior with chart and karmadactl.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 3, 2023
@calvin0327 calvin0327 changed the title karmada operator: change karmada system namespace karmada operator: change karmada system namespace to karmada-system Jul 3, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.02% ⚠️

Comparison is base (8d1a800) 53.84% compared to head (c422952) 53.83%.
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3750      +/-   ##
==========================================
- Coverage   53.84%   53.83%   -0.02%     
==========================================
  Files         231      231              
  Lines       23062    23062              
==========================================
- Hits        12418    12415       -3     
- Misses       9967     9970       +3     
  Partials      677      677              
Flag Coverage Δ
unittests 53.83% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

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

@Poor12
Copy link
Member

Poor12 commented Jul 3, 2023

Does this also mean that the namespace is not configurable? Must be karmada-system?

@calvin0327
Copy link
Author

Does this also mean that the namespace is not configurable? Must be karmada-system?

@Poor12 Indeed, the karmadaSystemNamespace should be a configurable variable. I dont's know where is the best place to configure it, karmada operator flag? or karmada CR?

@Poor12
Copy link
Member

Poor12 commented Jul 4, 2023

From my perspective, I think the namespace of components should be the same with the namespace of Karmada CR.

@calvin0327
Copy link
Author

From my perspective, I think the namespace of components should be the same with the namespace of Karmada CR.

@Poor12 If so, the system namespace of karmada instance seems to be different.

@Poor12
Copy link
Member

Poor12 commented Jul 5, 2023

Yeah, in that way, the namespace of default Karmada CR should be karmada-system. And I don‘t think it's possible for Karmada's components to exist in multiple namespaces at the same time.

@calvin0327
Copy link
Author

In my scenario, we create a karmada named e2etest-instancedefaulto6z and in namespace e2etest-instancedefaulto6z.

[root@master ~]# kubectl get karmada -A
NAMESPACE                    NAME                         READY   AGE
e2etest-instancedefaulto6z   e2etest-instancedefaulto6z   True    29m

And we access the karmada controlplane:

image

It is same with karmada cr of namespace, so, the system namespace of every karmada instance is different.
So, I think it's better to keep all karmada instance system namespace the same.

@Poor12 @lonelyCZ

@karmada-bot karmada-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 15, 2023
@calvin0327
Copy link
Author

@RainbowMango @jwcesign Do you have any comments?

@@ -68,7 +68,7 @@ func runSystemNamespace(r workflow.RunData) error {

err := apiclient.CreateNamespace(data.KarmadaClient(), &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: data.GetNamespace(),
Name: constants.KarmadaSystemNamespace,
Copy link
Member

Choose a reason for hiding this comment

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

The following two places still referencing the names with data.GetNamespace, I guess should be updated accordingly, right?

return fmt.Errorf("failed to create namespace %s, err: %w", data.GetNamespace(), err)

klog.V(2).InfoS("[systemName] Successfully created karmada system namespace", "namespace", data.GetNamespace(), "karmada", klog.KObj(data))

Copy link
Author

Choose a reason for hiding this comment

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

Yes, that's right. the namespace message of these logs should be consistent.
updated, thanks.

@karmada-bot karmada-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 19, 2023
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 20, 2023
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 20, 2023
@karmada-bot karmada-bot merged commit 0135ebf into karmada-io:master Sep 20, 2023
11 checks passed
@RainbowMango RainbowMango added this to the v1.8 milestone Nov 7, 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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants