Skip to content

Remove --namespace flag - #433

Merged
jetstack-bot merged 6 commits into
cert-manager:masterfrom
kragniz:remove-namespace-flag
Apr 9, 2018
Merged

jetstack-bot merged 6 commits into
cert-manager:masterfrom
kragniz:remove-namespace-flag

Conversation

@kragniz

@kragniz kragniz commented Apr 6, 2018

Copy link
Copy Markdown
Member

What this PR does / why we need it: removes the --namespace flag, which currently isn't tested.

Which issue this PR fixes: fixes #334

Special notes for your reviewer:

Release note:

Removed --namespace flag

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 6, 2018
@jetstack-bot
jetstack-bot requested a review from munnerz April 6, 2018 09:05
Comment thread cmd/controller/app/controller.go Outdated
// the --cluster-resource-namespace.
sharedInformerFactory := informers.NewFilteredSharedInformerFactory(intcl, time.Second*30, opts.Namespace, nil)
kubeSharedInformerFactory := kubeinformers.NewFilteredSharedInformerFactory(cl, time.Second*30, opts.Namespace, nil)
sharedInformerFactory := informers.NewFilteredSharedInformerFactory(intcl, time.Second*30, defaultNamespace, nil)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can stop using the filtered variants of these functions and therefore remove the defaultNamespace const altogether. (NewSharedInformerFactory(intcl, time.Second*30))

Comment thread cmd/controller/app/controller.go Outdated
KubeSharedInformerFactory: kubeSharedInformerFactory,
SharedInformerFactory: sharedInformerFactory,
Namespace: opts.Namespace,
Namespace: defaultNamespace,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The namespace field can be removed from this structure altogether afaik? I don't think it's used.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was thinking about the last part of the original issue that talks about potentially adding the flag back in the future, so left it around. It'd be cleaner to just remove it though.

Comment thread cmd/controller/app/controller.go Outdated
IssuerAmbientCredentials: opts.IssuerAmbientCredentials,
}),
Namespace: opts.Namespace,
Namespace: defaultNamespace,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The namespace field can be removed from this structure altogether afaik? I don't think it's used.

@kragniz

kragniz commented Apr 7, 2018

Copy link
Copy Markdown
Member Author

/test e2e v1.7

@munnerz

munnerz commented Apr 9, 2018

Copy link
Copy Markdown
Member

/lgtm
/approve

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2018
@jetstack-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: munnerz

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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2018
@jetstack-bot
jetstack-bot merged commit 8d80bb7 into cert-manager:master Apr 9, 2018
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. 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. 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.

Remove untested single-namespace-scoped functionality

3 participants