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

[Feature] multiple namespace support #511

Closed
32 tasks done
alexellis opened this issue Sep 20, 2019 · 5 comments
Closed
32 tasks done

[Feature] multiple namespace support #511

alexellis opened this issue Sep 20, 2019 · 5 comments

Comments

@alexellis
Copy link
Member

alexellis commented Sep 20, 2019

Feature: multiple namespace support

The feature is outlined at #433, which can be used for comments, questions, and suggestions.

The use-case is: multiple namespaces, single installation, i.e. dev/staging, team-a/team-b, client-a/client-b.

Checklist:

CLI

Secrets

  • Update faas-netes for CRUD for secrets to use namespace detected or passed

Logs

  • Update faas-netes to use namespace detected or passed for logs

Docs

Triggers

OpenFaaS operator

Diagram

Test out the patches so far

Test e2e with this Gist and the following patches: https://gist.github.com/alexellis/3b285ca0952d4cef48ca5dbff7e4e288

alexellis added a commit that referenced this issue Sep 21, 2019
This is required to list namespaces as part of #511.

The default namespace is matched, and any additional namespaces
must be annotated with the "openfaas" label. This is to prevent
kube-system, etc from being used.

Tested e2e with k3s/k8s 1.15 - the default ns showed, a new ns
was created and annotated, which then showed up in the results
subsequently.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
alexellis added a commit that referenced this issue Sep 21, 2019
This is required to list namespaces as part of #511.

The default namespace is matched, and any additional namespaces
must be annotated with the "openfaas" label. This is to prevent
kube-system, etc from being used.

Tested e2e with k3s/k8s 1.15 - the default ns showed, a new ns
was created and annotated, which then showed up in the results
subsequently.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
alexellis added a commit that referenced this issue Sep 22, 2019
This is being added for #511, so that the list, update, delete
and read endpoints all can take an optional namespace override.

Tested with k3s 1.15 and two namespaces. Also tested that kube-
system is blocked for those commands.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
alexellis added a commit that referenced this issue Sep 22, 2019
This is being added for #511, so that the list, update, delete
and read endpoints all can take an optional namespace override.

Tested with k3s 1.15 and two namespaces. Also tested that kube-
system is blocked for those commands.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
@alexellis alexellis changed the title Feature: multiple namespace support [Feature] multiple namespace support Sep 27, 2019
@viveksyngh
Copy link
Contributor

I will work on updating faas-netes to make secrets API namespace aware and add namespace flag to the secrets command to CLI.

@jonatasbaldin
Copy link
Contributor

hey @viveksyngh, I'm working on the faas-netes, faas-provider and faas for that already 🙈

would u like to focus on the CLI?

for the GET /system/secrets I'm gonna pass a namespace query parameter and for the other ones (POST, PUT, DELETE) I'll pass a new namespace field in the body.

what do u think?

@jonatasbaldin
Copy link
Contributor

I have a POC working locally already, will cleanup and push today :)

@viveksyngh
Copy link
Contributor

or the GET /system/secrets I'm gonna pass a namespace query parameter and for the other ones (POST, PUT, DELETE) I'll pass a new namespace field in the body.

I think that should be fine. Please let me know if you need any help.

I can work on the CLI.

@jonatasbaldin
Copy link
Contributor

Here's the PRs from the Secrets:

❤️

viveksyngh added a commit to viveksyngh/faas that referenced this issue Mar 22, 2020
This commit adds namespace in function names while logging metrics to
prometheus, irrespective of the function is invoked with namespace suffix
or not.

This is also required to add multiple namespace support to faas-idler

https://github.com/openfaas-incubator/faas-idler/issues/37 which is part
of openfaas/faas-netes#511

Signed-off-by: Vivek Singh <[email protected]>
viveksyngh added a commit to viveksyngh/faas that referenced this issue Oct 29, 2020
This commit adds namespace in function names while logging metrics to
prometheus, irrespective of the function is invoked with namespace suffix
or not.

This is also required to add multiple namespace support to faas-idler

https://github.com/openfaas-incubator/faas-idler/issues/37 which is part
of openfaas/faas-netes#511

Signed-off-by: Vivek Singh <[email protected]>
alexellis pushed a commit to openfaas/faas that referenced this issue Nov 2, 2020
This commit adds namespace in function names while logging metrics to
prometheus, irrespective of the function is invoked with namespace suffix
or not.

This is also required to add multiple namespace support to faas-idler

openfaasltd/faas-idler#37 which is part
of openfaas/faas-netes#511

Signed-off-by: Vivek Singh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants