File tree Expand file tree Collapse file tree 13 files changed +22
-22
lines changed Expand file tree Collapse file tree 13 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 1
1
exitCode : 1
2
2
testType : eval
3
- image : gcr.io/kpt-fn/gatekeeper:unstable
3
+ image : gcr.io/kpt-fn/gatekeeper:v0.1
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ metadata:
4
4
name : fnresults
5
5
exitCode : 1
6
6
items :
7
- - image : gcr.io/kpt-fn/gatekeeper:unstable
7
+ - image : gcr.io/kpt-fn/gatekeeper:v0.1
8
8
stderr : |-
9
9
[error] v1/ConfigMap/default/super-secret : The following banned keys are being used in the ConfigMap: {"private_key"}
10
10
violatedConstraint: no-secrets-in-configmap
Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ We have a `ConfigMap` in `config-map.yaml` that violates the policy.
18
18
Get the package:
19
19
20
20
``` shell
21
- $ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/gatekeeper/imperative
21
+ $ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/gatekeeper/imperative@gatekeeper/v0.1
22
22
```
23
23
24
24
Run the function with ` --results-dir ` flag:
25
25
26
26
``` shell
27
- $ kpt fn eval --image=gcr.io/kpt-fn/gatekeeper:unstable --results-dir=results
27
+ $ kpt fn eval --image=gcr.io/kpt-fn/gatekeeper:v0.1 --results-dir=results
28
28
```
29
29
30
30
### Expected result
@@ -38,7 +38,7 @@ metadata:
38
38
name : fnresults
39
39
exitCode : 1
40
40
items :
41
- - image : gcr.io/kpt-fn/gatekeeper:unstable
41
+ - image : gcr.io/kpt-fn/gatekeeper:v0.1
42
42
stderr : |-
43
43
The following banned keys are being used in the ConfigMap: {"private_key"}
44
44
violatedConstraint: no-secrets-in-configmap
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ metadata:
4
4
name : fnresults
5
5
exitCode : 1
6
6
items :
7
- - image : gcr.io/kpt-fn/gatekeeper:unstable
7
+ - image : gcr.io/kpt-fn/gatekeeper:v0.1
8
8
stderr : |-
9
9
[error] v1/ConfigMap/default/super-secret : The following banned keys are being used in the ConfigMap: {"private_key"}
10
10
violatedConstraint: no-secrets-in-configmap
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ metadata:
4
4
name: example
5
5
pipeline:
6
6
validators:
7
- - image: gcr.io/kpt-fn/gatekeeper:unstable
7
+ - image: gcr.io/kpt-fn/gatekeeper:v0.1
Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ metadata:
17
17
name : example
18
18
pipeline :
19
19
validators :
20
- - image : gcr.io/kpt-fn/gatekeeper:unstable
20
+ - image : gcr.io/kpt-fn/gatekeeper:v0.1
21
21
` ` `
22
22
23
23
### Function invocation
24
24
25
25
Get the package:
26
26
27
27
` ` ` shell
28
- $ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/gatekeeper/invalid-configmap
28
+ $ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/gatekeeper/invalid-configmap@gatekeeper/v0.1
29
29
```
30
30
31
31
Run the function:
@@ -45,7 +45,7 @@ metadata:
45
45
name : fnresults
46
46
exitCode : 1
47
47
items :
48
- - image : gcr.io/kpt-fn/gatekeeper:unstable
48
+ - image : gcr.io/kpt-fn/gatekeeper:v0.1
49
49
stderr : |-
50
50
The following banned keys are being used in the ConfigMap: {"private_key"}
51
51
violatedConstraint: no-secrets-in-configmap
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ metadata:
4
4
name : fnresults
5
5
exitCode : 0
6
6
items :
7
- - image : gcr.io/kpt-fn/gatekeeper:unstable
7
+ - image : gcr.io/kpt-fn/gatekeeper:v0.1
8
8
exitCode : 0
9
9
results :
10
10
- message : |-
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ metadata:
4
4
name: example
5
5
pipeline:
6
6
validators:
7
- - image: gcr.io/kpt-fn/gatekeeper:unstable
7
+ - image: gcr.io/kpt-fn/gatekeeper:v0.1
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ metadata:
15
15
name : example
16
16
pipeline :
17
17
validators :
18
- - image : gcr.io/kpt-fn/gatekeeper:unstable
18
+ - image : gcr.io/kpt-fn/gatekeeper:v0.1
19
19
` ` `
20
20
21
21
In the constraint, we use ` enforcementAction: warn` instead of
36
36
Get the package :
37
37
38
38
` ` ` shell
39
- $ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/gatekeeper/warning-only
39
+ $ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/gatekeeper/warning-only@gatekeeper/v0.1
40
40
` ` `
41
41
42
42
Run the function :
@@ -56,7 +56,7 @@ metadata:
56
56
name: fnresults
57
57
exitCode: 0
58
58
items:
59
- - image: gcr.io/kpt-fn/gatekeeper:unstable
59
+ - image: gcr.io/kpt-fn/gatekeeper:v0.1
60
60
exitCode: 0
61
61
results:
62
62
- message: |-
Original file line number Diff line number Diff line change @@ -2,11 +2,11 @@ image: gcr.io/kpt-fn/gatekeeper
2
2
description : Validate the KRM resources using Gatekeeper policies.
3
3
tags :
4
4
- validator
5
- sourceURL : https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master /functions/go/gatekeeper
5
+ sourceURL : https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/gatekeeper/v0.1 /functions/go/gatekeeper
6
6
examplePackageURLs :
7
- - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master /examples/gatekeeper/invalid-configmap
8
- - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master /examples/gatekeeper/warning-only
9
- - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master /examples/gatekeeper/imperative
7
+ - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/gatekeeper/v0.1 /examples/gatekeeper/invalid-configmap
8
+ - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/gatekeeper/v0.1 /examples/gatekeeper/warning-only
9
+ - https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/gatekeeper/v0.1 /examples/gatekeeper/imperative
10
10
emails :
11
11
- kpt-team@google.com
12
12
license : Apache-2.0
You can’t perform that action at this time.
0 commit comments