External Secrets Store

This commit is contained in:
Stéphane Tailland
2026-08-19 18:53:35 +02:00
parent 22348ce610
commit bf9fcaecd3
4 changed files with 33 additions and 16 deletions
-1
View File
@@ -4,5 +4,4 @@ resources:
- konnectapiauthconfiguration.yaml - konnectapiauthconfiguration.yaml
- gatewayconfiguration.yaml - gatewayconfiguration.yaml
- gateway.yaml - gateway.yaml
- secret.yaml
- certificate.yaml - certificate.yaml
-15
View File
@@ -1,15 +0,0 @@
# konghq.com/secret: "true" is required — the Kong Operator's secret
# watch/cache is scoped to that label; without it, references from
# KonnectAPIAuthConfiguration.secretRef resolve to "does not exist" even
# though the Secret is present (see ~/dev/kong/kube/gateway/apigw/secret.yaml).
apiVersion: v1
kind: Secret
metadata:
name: ${NAME}-konnect-auth
namespace: ${NAMESPACE}
labels:
konghq.com/credential: konnect
konghq.com/secret: "true"
type: Opaque
stringData:
token: ${KONNECT_PAT_TOKEN}
+1
View File
@@ -3,3 +3,4 @@ kind: Kustomization
resources: resources:
- gatewayclass.yaml - gatewayclass.yaml
- dataplane-template-defaults.yaml - dataplane-template-defaults.yaml
- vault-clustersecretstore.yaml
@@ -0,0 +1,32 @@
# Shared by every kong-v2 domain — one Vault connection, not duplicated per
# domain. Auth is AppRole (not Kubernetes auth): Vault at vault.sttlab.eu
# can't reach back into this cluster's API server to validate SA tokens
# (local cluster's API is https://127.0.0.1:26443, not internet-reachable) —
# Kubernetes auth was the first choice but isn't viable here.
#
# Both roleId and secretId come from vault-approle-kong-v2 (ns
# external-secrets) — created directly via `vault write` + `kubectl create
# secret`, never written to a file. Scoped read-only to secrets/kong-v2/*
# via Vault policy kong-v2-readonly (see Vault directly for policy/role
# definitions — not tracked in this repo, no Terraform-for-Vault yet).
apiVersion: external-secrets.io/v1
kind: ClusterSecretStore
metadata:
name: vault-kong-v2
spec:
provider:
vault:
server: https://vault.sttlab.eu
path: secrets
version: v2
auth:
appRole:
path: approle
roleRef:
name: vault-approle-kong-v2
namespace: external-secrets
key: roleId
secretRef:
name: vault-approle-kong-v2
namespace: external-secrets
key: secretId