use ObjectMeta instead of name and namespace fields

This commit is contained in:
Seth Pollack
2019-06-29 23:28:56 -04:00
parent 558be8b923
commit 2126b6cf23
18 changed files with 77 additions and 54 deletions

View File

@@ -13,10 +13,9 @@ import (
// A secret generator example that gets data
// from a database (simulated by a hardcoded map).
type plugin struct {
rf *resmap.Factory
ldr ifc.Loader
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
rf *resmap.Factory
ldr ifc.Loader
types.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// List of keys to use in database lookups
Keys []string `json:"keys,omitempty" yaml:"keys,omitempty"`
}

View File

@@ -23,9 +23,8 @@ func TestSecretsFromDatabasePlugin(t *testing.T) {
apiVersion: someteam.example.com/v1
kind: SecretsFromDatabase
metadata:
name: mySecretGenerator
name: forbiddenValues
namespace: production
name: forbiddenValues
namespace: production
keys:
- ROCKET
- VEGETABLE