From 39b2696b5d76ae9ac0822e3fafa6aa79b251d579 Mon Sep 17 00:00:00 2001 From: "M.-Leander Reimer" Date: Tue, 3 Dec 2024 22:43:04 +0100 Subject: [PATCH] Added Kyverno. --- .../platform/kyverno/kustomization.yaml | 6 +++ .../platform/kyverno/namespace.yaml | 4 ++ infrastructure/platform/kyverno/release.yaml | 42 +++++++++++++++++++ .../platform/kyverno/repository.yaml | 8 ++++ 4 files changed, 60 insertions(+) create mode 100644 infrastructure/platform/kyverno/kustomization.yaml create mode 100644 infrastructure/platform/kyverno/namespace.yaml create mode 100644 infrastructure/platform/kyverno/release.yaml create mode 100644 infrastructure/platform/kyverno/repository.yaml diff --git a/infrastructure/platform/kyverno/kustomization.yaml b/infrastructure/platform/kyverno/kustomization.yaml new file mode 100644 index 0000000..1658c0f --- /dev/null +++ b/infrastructure/platform/kyverno/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - repository.yaml + - release.yaml \ No newline at end of file diff --git a/infrastructure/platform/kyverno/namespace.yaml b/infrastructure/platform/kyverno/namespace.yaml new file mode 100644 index 0000000..047db5e --- /dev/null +++ b/infrastructure/platform/kyverno/namespace.yaml @@ -0,0 +1,4 @@ +kind: Namespace +apiVersion: v1 +metadata: + name: kyverno \ No newline at end of file diff --git a/infrastructure/platform/kyverno/release.yaml b/infrastructure/platform/kyverno/release.yaml new file mode 100644 index 0000000..3e7e6cf --- /dev/null +++ b/infrastructure/platform/kyverno/release.yaml @@ -0,0 +1,42 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: kyverno + namespace: flux-system +spec: + chart: + spec: + chart: kyverno + sourceRef: + kind: HelmRepository + name: kyverno + version: "3.3.3" + interval: 1h0m0s + releaseName: kyverno + targetNamespace: kyverno + values: + admissionController: + replicas: 3 + backgroundController: + replicas: 3 + cleanupController: + replicas: 3 + reportsController: + replicas: 3 +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: kyverno-policies + namespace: flux-system +spec: + chart: + spec: + chart: kyverno-policies + sourceRef: + kind: HelmRepository + name: kyverno + version: "3.3.1" + interval: 1h0m0s + releaseName: kyverno-policies + targetNamespace: kyverno \ No newline at end of file diff --git a/infrastructure/platform/kyverno/repository.yaml b/infrastructure/platform/kyverno/repository.yaml new file mode 100644 index 0000000..2d28533 --- /dev/null +++ b/infrastructure/platform/kyverno/repository.yaml @@ -0,0 +1,8 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta1 +kind: HelmRepository +metadata: + name: kyverno + namespace: flux-system +spec: + interval: 1h0m0s + url: https://kyverno.github.io/kyverno/ \ No newline at end of file