try again

This commit is contained in:
SeanOMik 2023-04-02 23:55:19 -04:00
parent 6463458ab2
commit 540b683b0e
Signed by: SeanOMik
GPG Key ID: 568F326C7EB33ACB
1 changed files with 45 additions and 42 deletions

View File

@ -69,6 +69,9 @@ metadata:
namespace: longhorn-system namespace: longhorn-system
spec: spec:
interval: 5m interval: 5m
dependsOn:
name: kyverno
namespace: longhorn-system
chart: chart:
spec: spec:
chart: raw chart: raw
@ -80,45 +83,45 @@ spec:
interval: 1m interval: 1m
values: values:
- resources: - resources:
- apiVersion: v1 - apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: longhorn name: longhorn-custom-path
namespace: longhorn-system namespace: longhorn-system
data: 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 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 - apiVersion: kyverno.io/v1
kind: ClusterPolicy kind: ClusterPolicy
metadata: metadata:
name: longhorn name: add-host-path-to-longhorn
annotations: annotations:
policies.kyverno.io/title: Add Environment Variables from ConfigMap policies.kyverno.io/title: Add Environment Variables from ConfigMap
policies.kyverno.io/subject: Pod policies.kyverno.io/subject: Pod
policies.kyverno.io/category: Other policies.kyverno.io/category: Other
policies.kyverno.io/description: >- policies.kyverno.io/description: >-
Longhorn invokes executables on the host system, and needs Longhorn invokes executables on the host system, and needs
to be aware of the host systems PATH. This modifies all to be aware of the host systems PATH. This modifies all
deployments such that the PATH is explicitly set to support deployments such that the PATH is explicitly set to support
NixOS based systems. NixOS based systems.
spec: spec:
rules: rules:
- name: add-env-vars - name: add-env-vars
match: match:
resources: resources:
kinds: kinds:
- Pod - Pod
namespaces: namespaces:
- longhorn-system - longhorn-system
mutate: mutate:
patchStrategicMerge: patchStrategicMerge:
spec: spec:
initContainers: initContainers:
- (name): "*" - (name): "*"
envFrom: envFrom:
- configMapRef: - configMapRef:
name: longhorn name: longhorn-custom-path
containers: containers:
- (name): "*" - (name): "*"
envFrom: envFrom:
- configMapRef: - configMapRef:
name: longhorn name: longhorn-custom-path