Actualizar workloads/headlamp/kustomization.yaml
Adaptar secret y resolver problema de kubeconfig
This commit is contained in:
@@ -1,9 +1,33 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
# Esto fuerza a que todos los recursos remotos caigan en nuestro namespace seguro
|
||||
# Fuerza a todos los recursos al namespace headlamp
|
||||
namespace: headlamp
|
||||
|
||||
resources:
|
||||
- https://raw.githubusercontent.com/kubernetes-sigs/headlamp/main/kubernetes-headlamp.yaml
|
||||
- ingress.yaml
|
||||
- ingress.yaml
|
||||
|
||||
# Inyectamos el kubeconfig como un volumen montado desde el secreto
|
||||
patches:
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: headlamp
|
||||
patch: |-
|
||||
- op: add
|
||||
path: /spec/template/spec/volumes/-
|
||||
value:
|
||||
name: kubeconfig-vol
|
||||
secret:
|
||||
secretName: headlamp-kubeconfig
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/volumeMounts/-
|
||||
value:
|
||||
name: kubeconfig-vol
|
||||
mountPath: /home/headlamp/.config/Headlamp/kubeconfigs/config
|
||||
subPath: config
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/0/env/-
|
||||
value:
|
||||
name: KUBECONFIG
|
||||
value: /home/headlamp/.config/Headlamp/kubeconfigs/config
|
||||
Reference in New Issue
Block a user