Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: metadata URLs, names, and questions-ui.yml #11

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[package]
name = "persistentvolumeclaim-storageclass-policy"
version = "0.1.0"
version = "0.1.1"
authors = ["Kubewarden developers <cncf-kubewarden-maintainers@lists.cncf.io>"]
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
k8s-openapi = { version = "0.21.1", default_features = false, features = ["v1_29"] }
k8s-openapi = { version = "0.21.1", default_features = false, features = [
"v1_29",
] }
kubewarden-policy-sdk = "0.10.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
19 changes: 9 additions & 10 deletions artifacthub-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@
#
# This config can be saved to its default location with:
# kwctl scaffold artifacthub > artifacthub-pkg.yml
version: 0.1.0
version: 0.1.1
name: persistentvolumeclaim-storageclass-policy
displayName: PersistentVolumeClaim StorageClass Validator
createdAt: 2024-03-21T16:50:25.961234397Z
displayName: PVC StorageClass Validator
createdAt: 2024-03-25T09:37:27.712344872Z
description: Policy that validates and adjusts the usage of StorageClasses in PersistentVolumeClaims
license: Apache-2.0
homeURL: https://github.com/kubewarden/persistent-volume-clain-validator-policy
homeURL: https://github.com/kubewarden/persistentvolumeclaim-storageclass-policy
containersImages:
- name: policy
image: ghcr.io/kubewarden/policies/persistent-volume-clain-validator-policy:v0.1.0
image: ghcr.io/kubewarden/policies/persistentvolumeclaim-storageclass-policy:v0.1.1
keywords:
- persistentvolumeclaim
- pvc
- kubewarden
links:
- name: policy
url: https://github.com/kubewarden/persistent-volume-clain-validator-policy/releases/download/v0.1.0/policy.wasm
url: https://github.com/kubewarden/persistentvolumeclaim-storageclass-policy/releases/download/v0.1.1/policy.wasm
- name: source
url: https://github.com/kubewarden/persistent-volume-clain-validator-policy
url: https://github.com/kubewarden/persistentvolumeclaim-storageclass-policy
install: |
The policy can be obtained using [`kwctl`](https://github.com/kubewarden/kwctl):
```console
kwctl pull ghcr.io/kubewarden/policies/persistent-volume-clain-validator-policy:v0.1.0
kwctl pull ghcr.io/kubewarden/policies/persistentvolumeclaim-storageclass-policy:v0.1.1
```
Then, generate the policy manifest and tune it to your liking. For example:
```console
kwctl scaffold manifest -t ClusterAdmissionPolicy registry://ghcr.io/kubewarden/policies/persistent-volume-clain-validator-policy:v0.1.0
kwctl scaffold manifest -t ClusterAdmissionPolicy registry://ghcr.io/kubewarden/policies/persistentvolumeclaim-storageclass-policy:v0.1.1
```
maintainers:
- name: Kubewarden developers
Expand Down Expand Up @@ -65,7 +65,6 @@ annotations:
group: Settings
label: Fallback StorageClass
required: false
hide_input: true
type: string
variable: fallbackStorageClass
kubewarden/resources: PersistentVolumeClaim
Expand Down
16 changes: 8 additions & 8 deletions metadata.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
rules:
- apiGroups: [""]
apiVersions: ["v1"]
resources: ["persistentvolumeclaims"]
operations: ["CREATE"]
- apiGroups: [""]
apiVersions: ["v1"]
resources: ["persistentvolumeclaims"]
operations: ["CREATE"]
mutating: true
contextAwareResources: []
executionMode: kubewarden-wapc
Expand All @@ -13,16 +13,16 @@ executionMode: kubewarden-wapc
backgroundAudit: true
annotations:
# artifacthub specific:
io.artifacthub.displayName: PersistentVolumeClaim StorageClass Validator
io.artifacthub.displayName: PVC StorageClass Validator
io.artifacthub.resources: PersistentVolumeClaim
io.artifacthub.keywords: persistentvolumeclaim, pvc, kubewarden
io.kubewarden.policy.ociUrl: ghcr.io/kubewarden/policies/persistent-volume-clain-validator-policy
io.kubewarden.policy.ociUrl: ghcr.io/kubewarden/policies/persistentvolumeclaim-storageclass-policy
# kubewarden specific:
io.kubewarden.policy.title: persistentvolumeclaim-storageclass-policy
io.kubewarden.policy.description: "Policy that validates and adjusts the usage of StorageClasses in PersistentVolumeClaims"
io.kubewarden.policy.author: Kubewarden developers <cncf-kubewarden-maintainers@lists.cncf.io>
io.kubewarden.policy.url: https://github.com/kubewarden/persistent-volume-clain-validator-policy
io.kubewarden.policy.source: https://github.com/kubewarden/persistent-volume-clain-validator-policy
io.kubewarden.policy.url: https://github.com/kubewarden/persistentvolumeclaim-storageclass-policy
io.kubewarden.policy.source: https://github.com/kubewarden/persistentvolumeclaim-storageclass-policy
io.kubewarden.policy.license: Apache-2.0
# The next two annotations are used in the policy report generated by the
# Audit scanner. Severity indicates policy check result criticality and
Expand Down
1 change: 0 additions & 1 deletion questions-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ questions:
group: Settings
label: Fallback StorageClass
required: false
hide_input: true
type: string
variable: fallbackStorageClass
Loading