Skip to content

Commit 72cf7e3

Browse files
committed
chore: update metadata
Fix README.md, artifacthub-pkg.yml and metadata.yml. Also add questions-ui.yml Also fix the release action of GH This is done to fix rancher/kubewarden-ui#207 Signed-off-by: Flavio Castelli <[email protected]>
1 parent a50566a commit 72cf7e3

File tree

4 files changed

+112
-26
lines changed

4 files changed

+112
-26
lines changed

.github/workflows/release.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ jobs:
2626
with:
2727
input-wasm: environment_variable_policy
2828
oci-target: ghcr.io/${{ github.repository_owner }}/policies/environment-variable-policy
29-
secrets:
30-
workflow-pat: ${{ secrets.WORKFLOW_PAT }}
29+

README.md

-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/environment-variable-policy)](https://artifacthub.io/packages/search?repo=environment-variable-policy)
2-
31
# environment-variable-policy
42

53
The environment-variable-policy can be used to inspect environment variables
@@ -110,21 +108,3 @@ settings:
110108
- name: "envvar4"
111109
value: "envvar4_value"
112110
```
113-
114-
## License
115-
116-
```
117-
Copyright (C) 2021 José Guilherme Vanz <[email protected]>
118-
119-
Licensed under the Apache License, Version 2.0 (the "License");
120-
you may not use this file except in compliance with the License.
121-
You may obtain a copy of the License at
122-
123-
http://www.apache.org/licenses/LICENSE-2.0
124-
125-
Unless required by applicable law or agreed to in writing, software
126-
distributed under the License is distributed on an "AS IS" BASIS,
127-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128-
See the License for the specific language governing permissions and
129-
limitations under the License.
130-
```

artifacthub-pkg.yml

+61-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
version: 0.1.1
2+
version: 0.1.2
33
name: environment-variable-policy
44
displayName: Environment Variable Policy
5-
createdAt: '2022-10-25T08:41:16-03:00'
5+
createdAt: '2023-01-19T14:46:21+02:00'
66
description: A Kubewarden Policy that controls the usage of environment variables
77
license: Apache-2.0
88
homeURL: https://github.com/kubewarden/environment-variable-policy
99
containersImages:
1010
- name: policy
11-
image: "ghcr.io/kubewarden/policies/environment-variable-policy:v0.1.1"
11+
image: "ghcr.io/kubewarden/policies/environment-variable-policy:v0.1.2"
1212
keywords:
1313
- deployment
1414
- replicaset
@@ -22,7 +22,7 @@ keywords:
2222
- environment-variables
2323
links:
2424
- name: policy
25-
url: https://github.com/kubewarden/environment-variable-policy/releases/download/v0.1.1/policy.wasm
25+
url: https://github.com/kubewarden/environment-variable-policy/releases/download/v0.1.2/policy.wasm
2626
- name: source
2727
url: https://github.com/kubewarden/environment-variable-policy
2828
provider:
@@ -33,3 +33,60 @@ annotations:
3333
kubewarden/resources: Deployment,Replicaset,Statefulset,Daemonset,Replicationcontroller,Job,Cronjob,Pod
3434
kubewarden/mutation: false
3535
kubewarden/contextAware: false
36+
kubewarden/rules: |
37+
rules:
38+
- apiGroups: [""]
39+
apiVersions: ["v1"]
40+
resources: ["deployment","replicaset","statefulset","daemonset","replicationcontroller","job","cronjob","pod"]
41+
operations: ["CREATE"]
42+
kubewarden/questions-ui: |
43+
questions:
44+
- default: null
45+
description: >-
46+
Each rule defined in the policy settings is composed by a reject operator
47+
and a set of the environment variables used with the operator against the
48+
environment variables from the resources. The rules are evaluated in the
49+
order that they are defined. The resource is denied in the first failed
50+
evaluated rule.
51+
group: Settings
52+
label: Description
53+
required: false
54+
hide_input: true
55+
type: string
56+
variable: description
57+
- default: []
58+
group: Settings
59+
label: Rules
60+
hide_input: true
61+
type: map[
62+
variable: rules
63+
subquestions:
64+
- default: anyIn
65+
group: Settings
66+
label: Reject Operator
67+
options:
68+
- anyIn
69+
- anyNotIn
70+
- allAreUsed
71+
- notAllAreUsed
72+
required: false
73+
type: enum
74+
variable: rules.reject
75+
- default: []
76+
description: ''
77+
group: Settings
78+
label: Environment Variables
79+
hide_input: true
80+
type: map[
81+
variable: rules.environmentVariables
82+
subquestions:
83+
- default: ''
84+
group: Settings
85+
label: Name
86+
type: string
87+
variable: rules.environmentVariables.name
88+
- default: ''
89+
group: Settings
90+
label: Value
91+
type: string
92+
variable: rules.environmentVariables.value

questions-ui.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
questions:
2+
- default: null
3+
description: >-
4+
Each rule defined in the policy settings is composed by a reject operator
5+
and a set of the environment variables used with the operator against the
6+
environment variables from the resources. The rules are evaluated in the
7+
order that they are defined. The resource is denied in the first failed
8+
evaluated rule.
9+
group: Settings
10+
label: Description
11+
required: false
12+
hide_input: true
13+
type: string
14+
variable: description
15+
- default: []
16+
group: Settings
17+
label: Rules
18+
hide_input: true
19+
type: map[
20+
variable: rules
21+
subquestions:
22+
- default: anyIn
23+
group: Settings
24+
label: Reject Operator
25+
options:
26+
- anyIn
27+
- anyNotIn
28+
- allAreUsed
29+
- notAllAreUsed
30+
required: false
31+
type: enum
32+
variable: rules.reject
33+
- default: []
34+
description: ''
35+
group: Settings
36+
label: Environment Variables
37+
hide_input: true
38+
type: map[
39+
variable: rules.environmentVariables
40+
subquestions:
41+
- default: ''
42+
group: Settings
43+
label: Name
44+
type: string
45+
variable: rules.environmentVariables.name
46+
- default: ''
47+
group: Settings
48+
label: Value
49+
type: string
50+
variable: rules.environmentVariables.value

0 commit comments

Comments
 (0)