Documentation
This commit is contained in:
@@ -2,7 +2,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
metadata:
|
metadata:
|
||||||
name: catalog-dev-api
|
name: catalog-dev-api
|
||||||
namespace: flux-system
|
namespace: catalog
|
||||||
spec:
|
spec:
|
||||||
interval: 10m
|
interval: 10m
|
||||||
sourceRef:
|
sourceRef:
|
||||||
@@ -12,16 +12,12 @@ spec:
|
|||||||
prune: true
|
prune: true
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- name: catalog-dev-api-gateway
|
- name: catalog-dev-api-gateway
|
||||||
|
namespace: flux-system
|
||||||
postBuild:
|
postBuild:
|
||||||
substitute:
|
substitute:
|
||||||
NAME: catalog-dev
|
NAME: catalog-dev
|
||||||
NAMESPACE: catalog
|
NAMESPACE: catalog
|
||||||
CONTROL_PLANE_REF_NAME: catalog-dev-bkphl
|
CONTROL_PLANE_REF_NAME: catalog-dev-bkphl
|
||||||
BACKEND_HOST: classic-models-api.classic-models.svc.cluster.local
|
BACKEND_HOST: classic-models-api.classic-models.svc.cluster.local
|
||||||
# PLACEHOLDER audience name — no Keycloak client for "catalog-api"
|
OIDC_ISSUER: https://keycloak.sttlab.eu/realms/sttlab
|
||||||
# exists yet, this will reject every real token until that client is
|
|
||||||
# created.
|
|
||||||
API_AUDIENCE: '["catalog-api"]'
|
API_AUDIENCE: '["catalog-api"]'
|
||||||
substituteFrom:
|
|
||||||
- kind: ConfigMap
|
|
||||||
name: dataplane-template-defaults
|
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
# Per-API audience check — narrows on top of the domain-wide whitelist
|
|
||||||
# check already enforced globally (k8s-platform/dataplane-globalpolicy-template,
|
|
||||||
# scope: GlobalInControlPlane). Defense in depth: both instances run
|
|
||||||
# independently on every request (verified Kong behavior, see STATUS.md).
|
|
||||||
#
|
|
||||||
# PLACEHOLDER-in-spirit: no Keycloak client named "catalog-api" exists yet
|
|
||||||
# (only classic-models-api's own client/mapper does) — this will reject
|
|
||||||
# every real token until that client + its oidc-audience-mapper are created.
|
|
||||||
apiVersion: configuration.konghq.com/v1
|
apiVersion: configuration.konghq.com/v1
|
||||||
kind: KongPlugin
|
kind: KongPlugin
|
||||||
metadata:
|
metadata:
|
||||||
@@ -14,17 +6,8 @@ metadata:
|
|||||||
plugin: openid-connect
|
plugin: openid-connect
|
||||||
config:
|
config:
|
||||||
issuer: ${OIDC_ISSUER}
|
issuer: ${OIDC_ISSUER}
|
||||||
# Whole YAML flow-sequence as one string var, same reason as
|
|
||||||
# JWT_AUDIENCE_WHITELIST in the global template — postBuild.substitute
|
|
||||||
# does plain text substitution, not list generation.
|
|
||||||
audience_required: ${API_AUDIENCE}
|
audience_required: ${API_AUDIENCE}
|
||||||
auth_methods:
|
auth_methods:
|
||||||
- bearer
|
- bearer
|
||||||
display_errors: false
|
display_errors: false
|
||||||
# This Control Plane enforces a global tls_certificate_verify option
|
|
||||||
# (Konnect-side, not set by us) that rejects any plugin instance whose TLS
|
|
||||||
# verification is off — openid-connect defaults to ssl_verify: false,
|
|
||||||
# which silently broke the DataPlane's config sync entirely (verified via
|
|
||||||
# DataPlane pod logs: "ssl_verify cannot be disabled"). Explicit true is
|
|
||||||
# the correct fix anyway: verify the issuer's cert when fetching JWKS.
|
|
||||||
ssl_verify: true
|
ssl_verify: true
|
||||||
|
|||||||
@@ -1,10 +1,3 @@
|
|||||||
# Explicit on purpose, unlike catalog-api's earlier (removed) layout —
|
|
||||||
# kong-kustomization.yaml (the Flux CR) now lives in this same directory,
|
|
||||||
# and Flux's path-without-a-kustomization.yaml auto-generation scans every
|
|
||||||
# yaml file present, indiscriminately. Without this explicit list, it would
|
|
||||||
# include kong-kustomization.yaml itself as a managed resource — the
|
|
||||||
# Kustomization would end up applying (and, with prune: true, potentially
|
|
||||||
# pruning) its own object. Listing resources explicitly avoids that.
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
# Bound to the natively-authored KongService (../service.yaml), not to
|
|
||||||
# individual routes — all of catalog-api's routes share the same audience,
|
|
||||||
# same as tasks-api's pattern. Unlike the earlier HTTPRoute-derived
|
|
||||||
# KongService, this name is ours and stable across reconciles.
|
|
||||||
apiVersion: configuration.konghq.com/v1alpha1
|
apiVersion: configuration.konghq.com/v1alpha1
|
||||||
kind: KongPluginBinding
|
kind: KongPluginBinding
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
# One KongRoute per operation in ../openapi.yaml (14 total — same
|
|
||||||
# granularity as ~/dev/kong/kube/apis/tasks-api/routes.yaml: split by
|
|
||||||
# operation even when two share a path, so a future per-operation policy
|
|
||||||
# doesn't require restructuring). Regex paths use Kong's own `~` syntax
|
|
||||||
# directly — no auto-translation layer involved this time (that was
|
|
||||||
# specific to the HTTPRoute path we abandoned).
|
|
||||||
apiVersion: configuration.konghq.com/v1alpha1
|
apiVersion: configuration.konghq.com/v1alpha1
|
||||||
kind: KongRoute
|
kind: KongRoute
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -1,11 +1,3 @@
|
|||||||
# host is a plain DNS string, not a Kubernetes object reference — unlike
|
|
||||||
# HTTPRoute's backendRefs, this needs no ReferenceGrant to cross into the
|
|
||||||
# classic-models namespace.
|
|
||||||
#
|
|
||||||
# metadata.name carries the ${NAME} (env) prefix because this domain's
|
|
||||||
# environments share one k8s namespace (see dataplane-catalog's own
|
|
||||||
# NAME/NAMESPACE split) — spec.name (Kong/Konnect-side) doesn't need it,
|
|
||||||
# each env already has its own isolated Control Plane.
|
|
||||||
apiVersion: configuration.konghq.com/v1alpha1
|
apiVersion: configuration.konghq.com/v1alpha1
|
||||||
kind: KongService
|
kind: KongService
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: source.toolkit.fluxcd.io/v1
|
||||||
|
kind: GitRepository
|
||||||
|
metadata:
|
||||||
|
name: catalog-api
|
||||||
|
namespace: catalog
|
||||||
|
spec:
|
||||||
|
interval: 5m
|
||||||
|
url: ssh://git@gitea.sttlab.eu:2222/stt/kong-catalog-api.git
|
||||||
|
secretRef:
|
||||||
|
name: catalog-api-git-auth
|
||||||
|
ref:
|
||||||
|
branch: main
|
||||||
Reference in New Issue
Block a user