From 5f3a3e95b8a39c09f019fa6c8baacc448a6c00d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Cuadrado=20Juan?= Date: Tue, 16 Jan 2024 14:14:13 +0100 Subject: [PATCH 1/2] fix: Update rules with correct apiGroups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Víctor Cuadrado Juan --- artifacthub-pkg.yml | 24 +++++++++++++++++++++++- metadata.yml | 29 ++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/artifacthub-pkg.yml b/artifacthub-pkg.yml index 8ba341c..3960152 100644 --- a/artifacthub-pkg.yml +++ b/artifacthub-pkg.yml @@ -78,12 +78,34 @@ annotations: - v1 resources: - pods + operations: + - CREATE + - apiGroups: + - '' + apiVersions: + - v1 + resources: + - replicationcontrollers + operations: + - CREATE + - UPDATE + - apiGroups: + - apps + apiVersions: + - v1 + resources: - deployments - replicasets - statefulsets - daemonsets + operations: + - CREATE + - apiGroups: + - batch + apiVersions: + - v1 + resources: - jobs - cronjobs - - replicationcontrollers operations: - CREATE diff --git a/metadata.yml b/metadata.yml index 29bf9ca..e3e264d 100644 --- a/metadata.yml +++ b/metadata.yml @@ -1,17 +1,39 @@ rules: - apiGroups: - - '' + - "" apiVersions: - v1 resources: - pods + operations: + - CREATE + - apiGroups: + - "" + apiVersions: + - v1 + resources: + - replicationcontrollers + operations: + - CREATE + - UPDATE + - apiGroups: + - "apps" + apiVersions: + - v1 + resources: - deployments - replicasets - statefulsets - daemonsets + operations: + - CREATE + - apiGroups: + - "batch" + apiVersions: + - v1 + resources: - jobs - cronjobs - - replicationcontrollers operations: - CREATE mutating: true @@ -24,7 +46,8 @@ annotations: # kubewarden specific io.kubewarden.policy.ociUrl: ghcr.io/kubewarden/policies/capabilities-psp io.kubewarden.policy.title: capabilities-psp - io.kubewarden.policy.description: Replacement for the Kubernetes Pod Security Policy + io.kubewarden.policy.description: + Replacement for the Kubernetes Pod Security Policy that controls the usage of capabilities io.kubewarden.policy.author: Kubewarden developers io.kubewarden.policy.url: https://github.com/kubewarden/capabilities-psp-policy From b78b9fb906dd4e16dd7a2a04e82b3f1fe657bb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Cuadrado=20Juan?= Date: Tue, 16 Jan 2024 14:14:38 +0100 Subject: [PATCH 2/2] build: Bump version to 0.1.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Víctor Cuadrado Juan --- Cargo.lock | 2 +- Cargo.toml | 2 +- artifacthub-pkg.yml | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 21cfe5f..40a6c0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "capabilities-psp" -version = "0.1.14" +version = "0.1.15" dependencies = [ "anyhow", "assert-json-diff", diff --git a/Cargo.toml b/Cargo.toml index 75cd66a..fabc3f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "capabilities-psp" -version = "0.1.14" +version = "0.1.15" authors = ["Flavio Castelli "] edition = "2018" diff --git a/artifacthub-pkg.yml b/artifacthub-pkg.yml index 3960152..4f08bb6 100644 --- a/artifacthub-pkg.yml +++ b/artifacthub-pkg.yml @@ -4,16 +4,16 @@ # # This config can be saved to its default location with: # kwctl scaffold artifacthub > artifacthub-pkg.yml -version: 0.1.14 +version: 0.1.15 name: capabilities-psp displayName: Capabilities PSP -createdAt: 2023-11-29T15:59:18.74914057Z +createdAt: 2024-01-16T13:13:41.907494337Z description: Replacement for the Kubernetes Pod Security Policy that controls the usage of capabilities license: Apache-2.0 homeURL: https://github.com/kubewarden/capabilities-psp-policy containersImages: - name: policy - image: ghcr.io/kubewarden/policies/capabilities-psp:v0.1.14 + image: ghcr.io/kubewarden/policies/capabilities-psp:v0.1.15 keywords: - psp - container @@ -21,17 +21,17 @@ keywords: - capabilities links: - name: policy - url: https://github.com/kubewarden/capabilities-psp-policy/releases/download/v0.1.14/policy.wasm + url: https://github.com/kubewarden/capabilities-psp-policy/releases/download/v0.1.15/policy.wasm - name: source url: https://github.com/kubewarden/capabilities-psp-policy install: | The policy can be obtained using [`kwctl`](https://github.com/kubewarden/kwctl): ```console - kwctl pull ghcr.io/kubewarden/policies/capabilities-psp:v0.1.14 + kwctl pull ghcr.io/kubewarden/policies/capabilities-psp:v0.1.15 ``` Then, generate the policy manifest and tune it to your liking. For example: ```console - kwctl scaffold manifest -t ClusterAdmissionPolicy registry://ghcr.io/kubewarden/policies/capabilities-psp:v0.1.14 + kwctl scaffold manifest -t ClusterAdmissionPolicy registry://ghcr.io/kubewarden/policies/capabilities-psp:v0.1.15 ``` maintainers: - name: Kubewarden developers