From 7033ec4c21858eb619cfa751ad86656f72477a99 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Thu, 22 Aug 2024 13:51:08 +0300 Subject: [PATCH 1/2] added enforce privileged on the namespace resource for talos clusters --- clabverter/assets/namespace.yaml.template | 2 ++ .../golden/simple-no-explicit-namespace/_topo01-ns.yaml | 2 ++ .../golden/simple-no-explicit-namespace/topo01-ns.yaml | 2 ++ clabverter/test-fixtures/golden/simple/_topo01-ns.yaml | 2 ++ clabverter/test-fixtures/golden/simple/topo01-ns.yaml | 2 ++ 5 files changed, 10 insertions(+) diff --git a/clabverter/assets/namespace.yaml.template b/clabverter/assets/namespace.yaml.template index 088df4a..a1b293b 100644 --- a/clabverter/assets/namespace.yaml.template +++ b/clabverter/assets/namespace.yaml.template @@ -3,3 +3,5 @@ apiVersion: v1 kind: Namespace metadata: name: {{ .Name }} + labels: + pod-security.kubernetes.io/enforce: privileged \ No newline at end of file diff --git a/clabverter/test-fixtures/golden/simple-no-explicit-namespace/_topo01-ns.yaml b/clabverter/test-fixtures/golden/simple-no-explicit-namespace/_topo01-ns.yaml index f4c0d2f..e0b9260 100755 --- a/clabverter/test-fixtures/golden/simple-no-explicit-namespace/_topo01-ns.yaml +++ b/clabverter/test-fixtures/golden/simple-no-explicit-namespace/_topo01-ns.yaml @@ -3,3 +3,5 @@ apiVersion: v1 kind: Namespace metadata: name: c9s-topo01 + labels: + pod-security.kubernetes.io/enforce: privileged diff --git a/clabverter/test-fixtures/golden/simple-no-explicit-namespace/topo01-ns.yaml b/clabverter/test-fixtures/golden/simple-no-explicit-namespace/topo01-ns.yaml index f4c0d2f..e0b9260 100644 --- a/clabverter/test-fixtures/golden/simple-no-explicit-namespace/topo01-ns.yaml +++ b/clabverter/test-fixtures/golden/simple-no-explicit-namespace/topo01-ns.yaml @@ -3,3 +3,5 @@ apiVersion: v1 kind: Namespace metadata: name: c9s-topo01 + labels: + pod-security.kubernetes.io/enforce: privileged diff --git a/clabverter/test-fixtures/golden/simple/_topo01-ns.yaml b/clabverter/test-fixtures/golden/simple/_topo01-ns.yaml index bc8c389..e6c02ee 100755 --- a/clabverter/test-fixtures/golden/simple/_topo01-ns.yaml +++ b/clabverter/test-fixtures/golden/simple/_topo01-ns.yaml @@ -3,3 +3,5 @@ apiVersion: v1 kind: Namespace metadata: name: notclabernetes + labels: + pod-security.kubernetes.io/enforce: privileged diff --git a/clabverter/test-fixtures/golden/simple/topo01-ns.yaml b/clabverter/test-fixtures/golden/simple/topo01-ns.yaml index bc8c389..e6c02ee 100644 --- a/clabverter/test-fixtures/golden/simple/topo01-ns.yaml +++ b/clabverter/test-fixtures/golden/simple/topo01-ns.yaml @@ -3,3 +3,5 @@ apiVersion: v1 kind: Namespace metadata: name: notclabernetes + labels: + pod-security.kubernetes.io/enforce: privileged From a38908e1532258b54cbe03cd5b8697278fe24095 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Thu, 22 Aug 2024 13:58:53 +0300 Subject: [PATCH 2/2] remove stale ns files --- .../golden/simple-no-explicit-namespace/_topo01-ns.yaml | 2 +- .../golden/simple-no-explicit-namespace/topo01-ns.yaml | 7 ------- clabverter/test-fixtures/golden/simple/_topo01-ns.yaml | 2 +- clabverter/test-fixtures/golden/simple/topo01-ns.yaml | 7 ------- 4 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 clabverter/test-fixtures/golden/simple-no-explicit-namespace/topo01-ns.yaml delete mode 100644 clabverter/test-fixtures/golden/simple/topo01-ns.yaml diff --git a/clabverter/test-fixtures/golden/simple-no-explicit-namespace/_topo01-ns.yaml b/clabverter/test-fixtures/golden/simple-no-explicit-namespace/_topo01-ns.yaml index e0b9260..28b7436 100755 --- a/clabverter/test-fixtures/golden/simple-no-explicit-namespace/_topo01-ns.yaml +++ b/clabverter/test-fixtures/golden/simple-no-explicit-namespace/_topo01-ns.yaml @@ -4,4 +4,4 @@ kind: Namespace metadata: name: c9s-topo01 labels: - pod-security.kubernetes.io/enforce: privileged + pod-security.kubernetes.io/enforce: privileged \ No newline at end of file diff --git a/clabverter/test-fixtures/golden/simple-no-explicit-namespace/topo01-ns.yaml b/clabverter/test-fixtures/golden/simple-no-explicit-namespace/topo01-ns.yaml deleted file mode 100644 index e0b9260..0000000 --- a/clabverter/test-fixtures/golden/simple-no-explicit-namespace/topo01-ns.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: c9s-topo01 - labels: - pod-security.kubernetes.io/enforce: privileged diff --git a/clabverter/test-fixtures/golden/simple/_topo01-ns.yaml b/clabverter/test-fixtures/golden/simple/_topo01-ns.yaml index e6c02ee..6d92bf1 100755 --- a/clabverter/test-fixtures/golden/simple/_topo01-ns.yaml +++ b/clabverter/test-fixtures/golden/simple/_topo01-ns.yaml @@ -4,4 +4,4 @@ kind: Namespace metadata: name: notclabernetes labels: - pod-security.kubernetes.io/enforce: privileged + pod-security.kubernetes.io/enforce: privileged \ No newline at end of file diff --git a/clabverter/test-fixtures/golden/simple/topo01-ns.yaml b/clabverter/test-fixtures/golden/simple/topo01-ns.yaml deleted file mode 100644 index e6c02ee..0000000 --- a/clabverter/test-fixtures/golden/simple/topo01-ns.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: notclabernetes - labels: - pod-security.kubernetes.io/enforce: privileged