From 1afda5f8d35a0b84b8c8efd4ae78e3b45ab55969 Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Tue, 30 Jan 2024 02:17:26 +0100 Subject: [PATCH] feat(iot): Move to new kustomize-optimised config --- apps/base/iot/kustomization.yaml | 8 ++++++-- apps/base/iot/namespace.yaml | 28 +--------------------------- apps/base/iot/shelly-exporter.yaml | 1 - apps/k8s01/iot/kustomization.yaml | 4 +++- 4 files changed, 10 insertions(+), 31 deletions(-) diff --git a/apps/base/iot/kustomization.yaml b/apps/base/iot/kustomization.yaml index 012654722..17695acfe 100644 --- a/apps/base/iot/kustomization.yaml +++ b/apps/base/iot/kustomization.yaml @@ -6,8 +6,8 @@ resources: - shelly-exporter.yaml - shelly-ht-monitor.yaml - ../../../shared/networkpolicies/allow-from-monitoring.yaml -patchesStrategicMerge: - - networkpolicy.yaml +patches: + - path: networkpolicy.yaml configMapGenerator: - name: iot-grafana-dashboards files: @@ -15,3 +15,7 @@ configMapGenerator: options: labels: grafana_dashboard: iot + +components: + - ../../../shared/components/flux-namespace-admin + - ../../../shared/components/namespace-baseline \ No newline at end of file diff --git a/apps/base/iot/namespace.yaml b/apps/base/iot/namespace.yaml index c22a70136..90e21cab7 100644 --- a/apps/base/iot/namespace.yaml +++ b/apps/base/iot/namespace.yaml @@ -2,30 +2,4 @@ apiVersion: v1 kind: Namespace metadata: name: iot - labels: - pod-security.kubernetes.io/audit: restricted - pod-security.kubernetes.io/enforce: baseline - pod-security.kubernetes.io/warn: restricted - pod-security.kubernetes.io/audit-version: v1.26 - pod-security.kubernetes.io/enforce-version: v1.23 - pod-security.kubernetes.io/warn-version: v1.26 ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: flux-reconciler - namespace: iot ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: flux-reconciler - namespace: iot -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: admin -subjects: - - kind: ServiceAccount - name: flux-reconciler - namespace: iot + labels: {} diff --git a/apps/base/iot/shelly-exporter.yaml b/apps/base/iot/shelly-exporter.yaml index 287c66443..dd5becc78 100644 --- a/apps/base/iot/shelly-exporter.yaml +++ b/apps/base/iot/shelly-exporter.yaml @@ -4,7 +4,6 @@ metadata: name: shelly-exporter namespace: iot spec: - serviceAccountName: flux-reconciler releaseName: shelly-exporter chart: spec: diff --git a/apps/k8s01/iot/kustomization.yaml b/apps/k8s01/iot/kustomization.yaml index f712fc87f..c9f20ea9a 100644 --- a/apps/k8s01/iot/kustomization.yaml +++ b/apps/k8s01/iot/kustomization.yaml @@ -4,9 +4,11 @@ namespace: iot resources: - ../../base/iot - certificate.yaml -- ../../../shared/applications/oauth2-proxy.yaml - oauth2.yaml - rainer.yaml - shelly.yaml - shelly-ht-monitor.yaml - monitoring.yaml + +components: + - ../../../shared/components/oauth2-proxy -- GitLab