mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-23 15:23:28 +00:00
Handled list secrets for no secret in namespaces
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com> Test case included for default and non-default Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com> Changed Fake Labeller Implementation Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
551e6645b7
commit
a2ea804d2c
18
pkg/provider/labeller.go
Normal file
18
pkg/provider/labeller.go
Normal file
@ -0,0 +1,18 @@
|
||||
package provider
|
||||
|
||||
import "context"
|
||||
|
||||
type Labeller interface {
|
||||
Labels(ctx context.Context, namespace string) (map[string]string, error)
|
||||
}
|
||||
|
||||
/*
|
||||
* FakeLabeller can be used to fake labels applied on namespace to mark them valid/invalid for openfaas functions
|
||||
*/
|
||||
type FakeLabeller struct {
|
||||
FakeLabels map[string]string
|
||||
}
|
||||
|
||||
func (s *FakeLabeller) Labels(ctx context.Context, namespace string) (map[string]string, error) {
|
||||
return s.FakeLabels, nil
|
||||
}
|
Reference in New Issue
Block a user