I dont think I need raw

This commit is contained in:
SeanOMik 2023-04-03 00:12:37 -04:00
parent 89daa3a89a
commit da280d229b
Signed by: SeanOMik
GPG Key ID: 568F326C7EB33ACB
1 changed files with 111 additions and 60 deletions

View File

@ -62,66 +62,117 @@ spec:
interval: 1m interval: 1m
--- ---
# ================= Release for incubator/raw ================= # ================= Release for incubator/raw =================
apiVersion: helm.toolkit.fluxcd.io/v2beta1 #apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease #kind: HelmRelease
#metadata:
# name: raw
# namespace: longhorn-system
#spec:
# interval: 5m
# dependsOn:
# - name: kyverno
# namespace: longhorn-system
# chart:
# spec:
# chart: raw
# version: '2.0.0'
# sourceRef:
# kind: HelmRepository
# name: raw-charts
# namespace: flux-system
# interval: 1m
# values:
# resources:
# - apiVersion: v1
# kind: ConfigMap
# metadata:
# name: longhorn-custom-path
# namespace: longhorn-system
# data:
# PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
# - apiVersion: kyverno.io/v1
# kind: ClusterPolicy
# metadata:
# name: add-host-path-to-longhorn
# annotations:
# policies.kyverno.io/title: Add Environment Variables from ConfigMap
# policies.kyverno.io/subject: Pod
# policies.kyverno.io/category: Other
# policies.kyverno.io/description: >-
# Longhorn invokes executables on the host system, and needs
# to be aware of the host systems PATH. This modifies all
# deployments such that the PATH is explicitly set to support
# NixOS based systems.
# spec:
# rules:
# - name: add-env-vars
# match:
# resources:
# kinds:
# - Pod
# namespaces:
# - longhorn-system
# mutate:
# patchStrategicMerge:
# spec:
# initContainers:
# - (name): "*"
# envFrom:
# - configMapRef:
# name: longhorn-custom-path
# containers:
# - (name): "*"
# envFrom:
# - configMapRef:
# name: longhorn-custom-path
---
apiVersion: v1
kind: ConfigMap
metadata: metadata:
name: raw name: longhorn-custom-path
namespace: longhorn-system namespace: longhorn-system
data:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
---
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: add-host-path-to-longhorn
annotations:
policies.kyverno.io/title: Add Environment Variables from ConfigMap
policies.kyverno.io/subject: Pod
policies.kyverno.io/category: Other
policies.kyverno.io/description: >-
Longhorn invokes executables on the host system, and needs
to be aware of the host systems PATH. This modifies all
deployments such that the PATH is explicitly set to support
NixOS based systems.
spec: spec:
interval: 5m rules:
dependsOn: - name: add-env-vars
- name: kyverno match:
namespace: longhorn-system resources:
chart: kinds:
spec: - Pod
chart: raw namespaces:
version: '2.0.0' - longhorn-system
sourceRef: mutate:
kind: HelmRepository patchStrategicMerge:
name: raw-charts spec:
namespace: flux-system initContainers:
interval: 1m - (name): "*"
values: envFrom:
resources: - configMapRef:
- apiVersion: v1 name: longhorn-custom-path
kind: ConfigMap containers:
metadata: - (name): "*"
name: longhorn-custom-path envFrom:
namespace: longhorn-system - configMapRef:
data: name: longhorn-custom-path
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
- apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: add-host-path-to-longhorn
annotations:
policies.kyverno.io/title: Add Environment Variables from ConfigMap
policies.kyverno.io/subject: Pod
policies.kyverno.io/category: Other
policies.kyverno.io/description: >-
Longhorn invokes executables on the host system, and needs
to be aware of the host systems PATH. This modifies all
deployments such that the PATH is explicitly set to support
NixOS based systems.
spec:
rules:
- name: add-env-vars
match:
resources:
kinds:
- Pod
namespaces:
- longhorn-system
mutate:
patchStrategicMerge:
spec:
initContainers:
- (name): "*"
envFrom:
- configMapRef:
name: longhorn-custom-path
containers:
- (name): "*"
envFrom:
- configMapRef:
name: longhorn-custom-path