Skip to content

Feat add ns generation#1667

Merged
AhmedGrati merged 4 commits intokubernetes:mainfrom
AhmedGrati:feat-add-ns-generation
Jul 16, 2023
Merged

Feat add ns generation#1667
AhmedGrati merged 4 commits intokubernetes:mainfrom
AhmedGrati:feat-add-ns-generation

Conversation

@AhmedGrati
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Implement namespace generation through the CLI flag --namespace or -n.

Which issue(s) this PR fixes:

Fixes #1657.

Special notes for your reviewer:

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 13, 2023
@k8s-ci-robot k8s-ci-robot requested review from hangyan and sebgoa July 13, 2023 20:03
@AhmedGrati AhmedGrati requested review from cdrage and removed request for hangyan and sebgoa July 13, 2023 20:03
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 13, 2023
@AhmedGrati AhmedGrati force-pushed the feat-add-ns-generation branch from c90037e to f110a8b Compare July 13, 2023 20:10
@cdrage
Copy link
Copy Markdown
Member

cdrage commented Jul 16, 2023

Works for me! Thank you :)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 16, 2023
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AhmedGrati, cdrage

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

The pull request process is described here

Details 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

TessaIO added 3 commits July 16, 2023 22:42
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
@AhmedGrati AhmedGrati force-pushed the feat-add-ns-generation branch from f110a8b to 4609293 Compare July 16, 2023 21:42
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 16, 2023
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
@AhmedGrati AhmedGrati force-pushed the feat-add-ns-generation branch from 4609293 to 608f876 Compare July 16, 2023 21:50
@AhmedGrati AhmedGrati merged commit b6b708b into kubernetes:main Jul 16, 2023
@MikeTangoEcho
Copy link
Copy Markdown

MikeTangoEcho commented Aug 4, 2023

@AhmedGrati @cdrage Hi, Is there a way to disable this feature ? Or when there is no namespace specified it doesn't add all resources to default namespace. I use kompose with helm chart generation, and the namespace is decided on helm release installation.

The lines to be modified would be.

https://github.com/AhmedGrati/kompose/blob/608f87669f63a93c7af5700ee3d17bdbbf197256/pkg/transformer/utils.go#L465-L468

I can make a PR if needed.

@github-belhorma-bendebiche
Copy link
Copy Markdown

This is a breaking change. We currently create a namespace with other resources in it before installing the chart generated by kompose (and overriding the namespace using helm's flags). This flow is no longer possible: if we don't set a namespace, everything goes into default. If we do set a namespace, the chart is no longer installable (since the namespace already exists and we don't want the chart to create it).

@cdrage
Copy link
Copy Markdown
Member

cdrage commented Oct 11, 2023

This is a breaking change. We currently create a namespace with other resources in it before installing the chart generated by kompose (and overriding the namespace using helm's flags). This flow is no longer possible: if we don't set a namespace, everything goes into default. If we do set a namespace, the chart is no longer installable (since the namespace already exists and we don't want the chart to create it).

On it! This shouldn't of been added, sorry about that. I totally missed it.

@cdrage
Copy link
Copy Markdown
Member

cdrage commented Oct 11, 2023

@github-belhorma-bendebiche Fixed in #1731

@github-belhorma-bendebiche
Copy link
Copy Markdown

Thank you for the quick fix!

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specify a namespace with convert?

6 participants