Restore authenticated secret reader in current cluster
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 7s
Auto-update README / Generate README and Create MR (push) Successful in 7s
Check with kubeconform / lint (push) Successful in 10s

This commit is contained in:
Ultradesu committed 2026-10-18 11:23:14 +01:00
1 parent 52780edbb5
commit 8a90756af0
7 files changed
+32 -53

No files matched your search

+6
View File
@@ -75,6 +75,12 @@ apps:
namespace: web-petting namespace: web-petting
wave: 5 wave: 5
skipDryRunOnMissingResource: true skipDryRunOnMissingResource: true
- name: k8s-secrets
project: apps
path: k8s/apps/k8s-secrets
namespace: k8s-secret
wave: 6 # after secret-stores and auth-proxy
skipDryRunOnMissingResource: true
- name: llamacpp - name: llamacpp
project: apps project: apps
path: k8s-ng/apps/llamacpp path: k8s-ng/apps/llamacpp
-21
View File
@@ -1,21 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: k8s-secrets
namespace: argocd
spec:
project: apps
destination:
namespace: k8s-secret
server: https://kubernetes.default.svc
source:
repoURL: ssh://git@gt.hexor.cy:30022/ab/homelab.git
targetRevision: HEAD
path: k8s/apps/k8s-secrets
syncPolicy:
automated:
selfHeal: true
prune: true
syncOptions:
- CreateNamespace=true
+3 -3
View File
@@ -16,11 +16,12 @@ spec:
spec: spec:
serviceAccountName: secret-reader serviceAccountName: secret-reader
nodeSelector: nodeSelector:
kubernetes.io/os: linux homelab.hexor.cy/pool: core
homelab.hexor.cy/exposure: external
containers: containers:
- name: secret-reader - name: secret-reader
image: ultradesu/k8s-secrets:0.2.1 image: ultradesu/k8s-secrets:0.2.1
imagePullPolicy: Always imagePullPolicy: IfNotPresent
args: args:
- "--secrets" - "--secrets"
- "openai-creds" - "openai-creds"
@@ -28,7 +29,6 @@ spec:
- "k8s-secret" - "k8s-secret"
- "--port" - "--port"
- "3000" - "3000"
- "--webhook"
ports: ports:
- containerPort: 3000 - containerPort: 3000
name: http name: http
+10 -22
View File
@@ -1,44 +1,32 @@
---
apiVersion: external-secrets.io/v1 apiVersion: external-secrets.io/v1
kind: ExternalSecret kind: ExternalSecret
metadata: metadata:
name: openai-creds name: openai-creds
spec: spec:
refreshInterval: 5m
secretStoreRef:
kind: ClusterSecretStore
name: vaultwarden-login
target: target:
name: openai-creds name: openai-creds
deletionPolicy: Delete deletionPolicy: Delete
template: template:
type: Opaque type: Opaque
data: data:
USER: |- USER: "{{ .user }}"
{{ .user }} PASS: "{{ .pass }}"
PASS: |- TOTP: "{{ .totp }}"
{{ .pass }}
TOTP: |-
{{ .totp }}
data: data:
- secretKey: user - secretKey: user
sourceRef:
storeRef:
name: vaultwarden-login
kind: ClusterSecretStore
remoteRef: remoteRef:
key: a485f323-fd47-40ee-a5cf-40891b1f963c key: k8s/openai/creds
property: login.username property: login.username
- secretKey: pass - secretKey: pass
sourceRef:
storeRef:
name: vaultwarden-login
kind: ClusterSecretStore
remoteRef: remoteRef:
key: a485f323-fd47-40ee-a5cf-40891b1f963c key: k8s/openai/creds
property: login.password property: login.password
- secretKey: totp - secretKey: totp
sourceRef:
storeRef:
name: vaultwarden-login
kind: ClusterSecretStore
remoteRef: remoteRef:
key: a485f323-fd47-40ee-a5cf-40891b1f963c key: k8s/openai/creds
property: login.totp property: login.totp
+2 -6
View File
@@ -5,12 +5,8 @@ metadata:
name: auth-proxy name: auth-proxy
spec: spec:
forwardAuth: forwardAuth:
address: http://auth-proxy.auth-proxy.svc:80/auth address: http://auth-proxy.keycloak.svc:80/auth
trustForwardHeader: true trustForwardHeader: false
authResponseHeaders:
- X-Auth-Request-User
- X-Auth-Request-Email
- X-Auth-Request-Groups
--- ---
apiVersion: traefik.io/v1alpha1 apiVersion: traefik.io/v1alpha1
kind: IngressRoute kind: IngressRoute
+9
View File
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service-account.yaml
- rbac.yaml
- external-secret.yaml
- deployment.yaml
- service.yaml
- ingress.yaml
+2 -1
View File
@@ -5,7 +5,8 @@ metadata:
rules: rules:
- apiGroups: [""] - apiGroups: [""]
resources: ["secrets"] resources: ["secrets"]
verbs: ["get", "list"] resourceNames: ["openai-creds"]
verbs: ["get"]
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding