diff --git a/Cargo.toml b/Cargo.toml index d2deabc..1a049bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "persistentvolumeclaim-storageclass-policy" -version = "0.1.0" +version = "0.1.1" authors = ["Kubewarden developers "] edition = "2021" @@ -8,7 +8,9 @@ edition = "2021" 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" diff --git a/artifacthub-pkg.yml b/artifacthub-pkg.yml index ee5ce4f..5384f21 100644 --- a/artifacthub-pkg.yml +++ b/artifacthub-pkg.yml @@ -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 @@ -65,7 +65,6 @@ annotations: group: Settings label: Fallback StorageClass required: false - hide_input: true type: string variable: fallbackStorageClass kubewarden/resources: PersistentVolumeClaim diff --git a/metadata.yml b/metadata.yml index 598c342..83f90d6 100644 --- a/metadata.yml +++ b/metadata.yml @@ -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 @@ -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 - 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 diff --git a/questions-ui.yml b/questions-ui.yml index a1b7164..0217ea7 100644 --- a/questions-ui.yml +++ b/questions-ui.yml @@ -21,6 +21,5 @@ questions: group: Settings label: Fallback StorageClass required: false - hide_input: true type: string variable: fallbackStorageClass