From 8a47d5e7790aa9f9b401a913190e7c6f18dbf8a2 Mon Sep 17 00:00:00 2001
From: Morgan Hoffman <hoffmanm@vt.edu>
Date: Fri, 12 Jul 2024 20:51:37 +0000
Subject: [PATCH] [PLATFORM-2631] - Templates v1

---
 Chart.yaml                                                     | 2 +-
 templates/constraint_image_admission_controller.yaml           | 2 +-
 templates/constraint_template_allow_rollout_restart.yaml       | 2 +-
 .../constraint_template_allow_rollout_restart_deployments.yaml | 2 +-
 .../constraint_template_allow_rollout_restart_statefulset.yaml | 2 +-
 templates/constraint_template_authorized_domain_policy.yaml    | 3 ++-
 templates/constraint_template_authorized_storage_classes.yaml  | 2 +-
 templates/constraint_template_block_loadbalancer.yaml          | 2 +-
 templates/constraint_template_block_nodeport.yaml              | 2 +-
 templates/constraint_template_container_resource_quotas.yaml   | 3 ++-
 templates/constraint_template_flux_tenant.yaml                 | 2 +-
 templates/constraint_template_pss_apparmor.yaml                | 2 +-
 templates/constraint_template_pss_host_namespace.yaml          | 2 +-
 templates/constraint_template_pss_hostpath_volume.yaml         | 2 +-
 templates/constraint_template_pss_hostport.yaml                | 2 +-
 templates/constraint_template_pss_pod_capabilities.yaml        | 2 +-
 templates/constraint_template_pss_privileged.yaml              | 2 +-
 templates/constraint_template_pss_procmount.yaml               | 2 +-
 templates/constraint_template_pss_seccomp.yaml                 | 2 +-
 templates/constraint_template_pss_selinux.yaml                 | 2 +-
 templates/constraint_template_pss_sysctl_options.yaml          | 2 +-
 21 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/Chart.yaml b/Chart.yaml
index 4a98d74..391d6af 100644
--- a/Chart.yaml
+++ b/Chart.yaml
@@ -1,4 +1,4 @@
 apiVersion: v2
 name: constraint-templates
-version: 1.6.4
+version: 1.7.0
 appVersion: 1.0.0
diff --git a/templates/constraint_image_admission_controller.yaml b/templates/constraint_image_admission_controller.yaml
index b9cd5b2..afd68f9 100644
--- a/templates/constraint_image_admission_controller.yaml
+++ b/templates/constraint_image_admission_controller.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: k8simageprovenance
diff --git a/templates/constraint_template_allow_rollout_restart.yaml b/templates/constraint_template_allow_rollout_restart.yaml
index 7622d0b..70e4297 100644
--- a/templates/constraint_template_allow_rollout_restart.yaml
+++ b/templates/constraint_template_allow_rollout_restart.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: allowrolloutrestart
diff --git a/templates/constraint_template_allow_rollout_restart_deployments.yaml b/templates/constraint_template_allow_rollout_restart_deployments.yaml
index 8cc935f..cc9269e 100644
--- a/templates/constraint_template_allow_rollout_restart_deployments.yaml
+++ b/templates/constraint_template_allow_rollout_restart_deployments.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: allowrolloutrestartdeployments
diff --git a/templates/constraint_template_allow_rollout_restart_statefulset.yaml b/templates/constraint_template_allow_rollout_restart_statefulset.yaml
index f6b2cb3..3780d2c 100644
--- a/templates/constraint_template_allow_rollout_restart_statefulset.yaml
+++ b/templates/constraint_template_allow_rollout_restart_statefulset.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: allowrolloutrestartstatefulsets
diff --git a/templates/constraint_template_authorized_domain_policy.yaml b/templates/constraint_template_authorized_domain_policy.yaml
index 4d4fdea..3da1719 100644
--- a/templates/constraint_template_authorized_domain_policy.yaml
+++ b/templates/constraint_template_authorized_domain_policy.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: authorizeddomainpolicy
@@ -10,6 +10,7 @@ spec:
       validation:
         # Schema for the `parameters` field
         openAPIV3Schema:
+          type: object
           properties:
             domains:
               type: array
diff --git a/templates/constraint_template_authorized_storage_classes.yaml b/templates/constraint_template_authorized_storage_classes.yaml
index f0a7885..1cdf701 100644
--- a/templates/constraint_template_authorized_storage_classes.yaml
+++ b/templates/constraint_template_authorized_storage_classes.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: pvcstorageclassmatchesnodepool
diff --git a/templates/constraint_template_block_loadbalancer.yaml b/templates/constraint_template_block_loadbalancer.yaml
index 31df777..7225196 100644
--- a/templates/constraint_template_block_loadbalancer.yaml
+++ b/templates/constraint_template_block_loadbalancer.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: blockloadbalancer
diff --git a/templates/constraint_template_block_nodeport.yaml b/templates/constraint_template_block_nodeport.yaml
index 40b1889..dfdcf6f 100644
--- a/templates/constraint_template_block_nodeport.yaml
+++ b/templates/constraint_template_block_nodeport.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: blocknodeport
diff --git a/templates/constraint_template_container_resource_quotas.yaml b/templates/constraint_template_container_resource_quotas.yaml
index a3ea551..fc7e0fb 100644
--- a/templates/constraint_template_container_resource_quotas.yaml
+++ b/templates/constraint_template_container_resource_quotas.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: containerresourcequotas
@@ -10,6 +10,7 @@ spec:
       validation:
         # Schema for the `parameters` field
         openAPIV3Schema:
+          type: object
           properties:
             cpu:
               type: string
diff --git a/templates/constraint_template_flux_tenant.yaml b/templates/constraint_template_flux_tenant.yaml
index dbf47ad..8021824 100644
--- a/templates/constraint_template_flux_tenant.yaml
+++ b/templates/constraint_template_flux_tenant.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: fluxtenantpolicy
diff --git a/templates/constraint_template_pss_apparmor.yaml b/templates/constraint_template_pss_apparmor.yaml
index 1ab93dd..7f3ad49 100644
--- a/templates/constraint_template_pss_apparmor.yaml
+++ b/templates/constraint_template_pss_apparmor.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: pssapparmor
diff --git a/templates/constraint_template_pss_host_namespace.yaml b/templates/constraint_template_pss_host_namespace.yaml
index 835bd31..00d41a3 100644
--- a/templates/constraint_template_pss_host_namespace.yaml
+++ b/templates/constraint_template_pss_host_namespace.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: psshostnamespace
diff --git a/templates/constraint_template_pss_hostpath_volume.yaml b/templates/constraint_template_pss_hostpath_volume.yaml
index eadb130..0ff44e4 100644
--- a/templates/constraint_template_pss_hostpath_volume.yaml
+++ b/templates/constraint_template_pss_hostpath_volume.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: psshostpathvolume
diff --git a/templates/constraint_template_pss_hostport.yaml b/templates/constraint_template_pss_hostport.yaml
index 1f07308..226be26 100644
--- a/templates/constraint_template_pss_hostport.yaml
+++ b/templates/constraint_template_pss_hostport.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: psshostport
diff --git a/templates/constraint_template_pss_pod_capabilities.yaml b/templates/constraint_template_pss_pod_capabilities.yaml
index dd73b93..388eef5 100644
--- a/templates/constraint_template_pss_pod_capabilities.yaml
+++ b/templates/constraint_template_pss_pod_capabilities.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: psspodcapabilities
diff --git a/templates/constraint_template_pss_privileged.yaml b/templates/constraint_template_pss_privileged.yaml
index 7dd5d9d..6f9d08e 100644
--- a/templates/constraint_template_pss_privileged.yaml
+++ b/templates/constraint_template_pss_privileged.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: pssprivilegedpod
diff --git a/templates/constraint_template_pss_procmount.yaml b/templates/constraint_template_pss_procmount.yaml
index bdd64bb..4caafb3 100644
--- a/templates/constraint_template_pss_procmount.yaml
+++ b/templates/constraint_template_pss_procmount.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: pssprocmount
diff --git a/templates/constraint_template_pss_seccomp.yaml b/templates/constraint_template_pss_seccomp.yaml
index e470bba..35e5f3a 100644
--- a/templates/constraint_template_pss_seccomp.yaml
+++ b/templates/constraint_template_pss_seccomp.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: pssseccomp
diff --git a/templates/constraint_template_pss_selinux.yaml b/templates/constraint_template_pss_selinux.yaml
index c1cc025..238bad8 100644
--- a/templates/constraint_template_pss_selinux.yaml
+++ b/templates/constraint_template_pss_selinux.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: pssselinux
diff --git a/templates/constraint_template_pss_sysctl_options.yaml b/templates/constraint_template_pss_sysctl_options.yaml
index bacca2b..cc82ffe 100644
--- a/templates/constraint_template_pss_sysctl_options.yaml
+++ b/templates/constraint_template_pss_sysctl_options.yaml
@@ -1,4 +1,4 @@
-apiVersion: templates.gatekeeper.sh/v1beta1
+apiVersion: templates.gatekeeper.sh/v1
 kind: ConstraintTemplate
 metadata:
   name: psssysctlsoptions
-- 
GitLab