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

🌱 add createNamespace option to chart render #603

Merged

Conversation

zhiweiyin318
Copy link
Member

Summary

Related issue(s)

Fixes #

@zhiweiyin318 zhiweiyin318 changed the title add createNamespace option to chart render 🌱 add createNamespace option to chart render Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 79.31034% with 6 lines in your changes missing coverage. Please review.

Project coverage is 63.81%. Comparing base (9cedd46) to head (cefb55f).
Report is 1 commits behind head on main.

Files Patch % Lines
pkg/operator/helpers/chart/render.go 79.31% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   63.80%   63.81%   +0.01%     
==========================================
  Files         180      180              
  Lines       14060    14087      +27     
==========================================
+ Hits         8971     8990      +19     
- Misses       4190     4194       +4     
- Partials      899      903       +4     
Flag Coverage Δ
unit 63.81% <79.31%> (+0.01%) ⬆️

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

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

@zhiweiyin318 zhiweiyin318 force-pushed the render-chart branch 4 times, most recently from d4ac71a to bf25d92 Compare August 28, 2024 01:03
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
},
ObjectMeta: metav1.ObjectMeta{
Name: namespace,
},
Copy link
Contributor

@dongbeiqing91 dongbeiqing91 Aug 28, 2024

Choose a reason for hiding this comment

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

In some enterprise environments, annotations or labels are sometimes required in Namespace. It would be better if optional annotations and labels can be supported here.

Copy link
Member Author

Choose a reason for hiding this comment

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

The release ns can be created automatically without any customized annotations or labels if use Helm to install the operators .
This PR only adds an option to render the operator helm charts to determine if add the ns objects into rendered object slice or not, like using helm install --create-namepace flag.
By default the release ns will not be included into the result, and user needs to create it manually, and in the default case user can add any annotations or labels to the user's ns.

There are 2 kinds of ns in OCM, the ns in which the operators are running is created or named by user, the ns like open-cluster-management-hub, open-cluster-management-agent and open-cluster-management-agent-addon are created by cluster-manager or klusterlet operator.
I think we could consider to support add optional annotations and labels to these namespaces created by OCM operators.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see
/lgtm

@qiujian16
Copy link
Member

/approve

Copy link
Contributor

openshift-ci bot commented Aug 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, zhiweiyin318

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

@openshift-merge-bot openshift-merge-bot bot merged commit 0deb09b into open-cluster-management-io:main Aug 28, 2024
15 checks passed
@zhiweiyin318 zhiweiyin318 deleted the render-chart branch August 28, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants