mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 09:51:23 +00:00
Get plugin config from data field
This commit is contained in:
@@ -81,15 +81,15 @@ functionConfig:
|
||||
kind: FulfillmentCenter
|
||||
metadata:
|
||||
name: staging
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/example/foo:v1.0.0
|
||||
namespace: foo
|
||||
fieldSpecs:
|
||||
- path: metadata/namespace
|
||||
create: true
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/example/foo:v1.0.0
|
||||
data:
|
||||
namespace: foo
|
||||
fieldSpecs:
|
||||
- path: metadata/namespace
|
||||
create: true
|
||||
items:
|
||||
- apiVersion: apps/v1
|
||||
kind: foobar
|
||||
@@ -108,7 +108,9 @@ func runKrmFunction(t *testing.T, input []byte, dir string) []byte {
|
||||
cmd.Stderr = eb
|
||||
cmd.Dir = dir
|
||||
err := cmd.Run()
|
||||
assert.NoErrorf(t, err, "Stdout:\n%s\nStderr:\n%s\n", ob.String(), eb.String())
|
||||
if !assert.NoErrorf(t, err, "Stdout:\n%s\nStderr:\n%s\n", ob.String(), eb.String()) {
|
||||
t.FailNow()
|
||||
}
|
||||
return ob.Bytes()
|
||||
}
|
||||
|
||||
@@ -135,15 +137,15 @@ functionConfig:
|
||||
kind: FulfillmentCenter
|
||||
metadata:
|
||||
name: staging
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/example/foo:v1.0.0
|
||||
namespace: foo
|
||||
fieldSpecs:
|
||||
- path: metadata/namespace
|
||||
create: true
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/example/foo:v1.0.0
|
||||
data:
|
||||
namespace: foo
|
||||
fieldSpecs:
|
||||
- path: metadata/namespace
|
||||
create: true
|
||||
`, string(output))
|
||||
}
|
||||
|
||||
@@ -194,11 +196,13 @@ functionConfig:
|
||||
kind: FulfillmentCenter
|
||||
metadata:
|
||||
name: staging
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/example/foo:v1.0.0
|
||||
data:
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/example/foo:v1.0.0
|
||||
name: staging
|
||||
items: []
|
||||
`)
|
||||
}
|
||||
@@ -225,10 +229,12 @@ functionConfig:
|
||||
kind: FulfillmentCenter
|
||||
metadata:
|
||||
name: staging
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/example/foo:v1.0.0
|
||||
data:
|
||||
metadata:
|
||||
annotations:
|
||||
config.kubernetes.io/function: |
|
||||
container:
|
||||
image: gcr.io/example/foo:v1.0.0
|
||||
name: staging
|
||||
`, string(output))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user