Harbor
Helm-based Harbor install. Exposed either through the chart Ingress (ingress.enabled, default true) or through the Gateway API on eg-shared (gateway.enabled). Both can run in parallel (cutover pattern) — see Exposure below.
Harbor 2.15.2 (Block 0.0.21)
Chart default is 1.19.2 (official pairing: Harbor 2.15.2). Harbor OSS images are pinned to v2.15.2.
Watch
- Bundled internal PostgreSQL in 2.15.2 would jump 15 → 18 via
pg_upgrade. This workspace uses external CNPG (database.type=external); that bundled upgrade does not run. - From Harbor 2.15.2 the chart Redis image becomes Valkey (
goharbor/valkey-photon:v2.15.2), protocol-compatible. No new block keys. - Images (
goharbor/*:v2.15.2) need registry/egress.
Release notes: https://github.com/goharbor/harbor/releases/tag/v2.15.2 Chart: https://github.com/goharbor/harbor-helm/releases/tag/v1.19.2
Workspaces with only ingress.* need no change.
Exposure: Ingress and/or Gateway API
Two independent switches, ingress.enabled (default true) and gateway.enabled (default false):
- Ingress only — Helm
expose.type=ingress. The chart Ingress routes/api/,/service/,/v2/,/c/toharbor-coreand/toharbor-portal. - Gateway only (
ingress.enabled: false) — Helmexpose.type=clusterIP, no chart Ingress. The HTTPRoute serves the host. - Both — chart Ingress and HTTPRoute serve the same host in parallel, with separate TLS secrets (
harbor-ingress/harbor-gateway-tls). Use it to move DNS from the ingress controller to the Envoy VIP without downtime.
The HTTPRoute routes exactly like the chart Ingress, straight to <fullname>-core and <fullname>-portal (<fullname> = block name if it contains harbor, else <block-name>-harbor). Both Services exist in every expose mode, so flipping ingress.enabled never changes the Gateway path. Setting gateway.service_name replaces this with a single backend (e.g. harbor = the chart nginx, which only exists with ingress.enabled: false).
externalURL is https://<gateway.host or ingress.core.domain> whenever the Gateway or Ingress TLS is on.
Endpoint monitoring
Default on. Probes GET /api/v2.0/health and expects 200. GET / only hits the portal. GET /v2/ returns 401. The annotations land on the chart Ingress or, when gateway.enabled is true, on the HTTPRoute. Switch: ingress.endpoint_monitor.enabled (also for the HTTPRoute). polycrate_k8sapp_name is the block instance name.
Gateway API / Envoy (gateway)
Prerequisites in the cluster:
- Gateway API CRDs and Envoy Gateway, e.g. via block
cargo.ayedo.cloud/ayedo/k8s/envoy - a
GatewayClass, defaulteg-shared(mergeGateways: true, shared VIP).eg-dedicatedgives each Gateway its own VIP. - cert-manager with the
ClusterIssuerfromgateway.tls.issuer - DNS for the host points at the Envoy VIP
TLS terminates at Envoy; the backend is plain HTTP.
Resources (all in namespace, created by install, removed when gateway.enabled: false):
Certificateharbor-gateway-tls(cert-manager) — always withgateway.enabledGatewayharbor-https(HTTPS :443,tls.mode: Terminate,allowedRoutes: Same) — only withcreate_gateway: trueand emptyparent_gateway_nameClientTrafficPolicyharbor-https-client/BackendTrafficPolicyharbor-https-backend— only with an own GatewayHTTPRouteharbor→harbor-core:80(/api,/service,/v2,/c) andharbor-portal:80(/) — always withgateway.enabled
Keys under gateway — format: key (default) — description:
enabled(false) — Create the Gateway API resources.falseremoves them on the nextinstall.create_gateway(true) — Own HTTPS Gateway in the namespace. Ignored onceparent_gateway_nameis set.gateway_class_name(eg-shared) —GatewayClassof the own Gatewaygateway_name(harbor-https) — Name of the own Gateway. Withcreate_gateway: falseand no parent, the HTTPRoute points at an existing Gateway of this name in the block namespace.parent_gateway_name("") — Set → no own Gateway; the HTTPRoute attaches to this Gatewayparent_gateway_namespace(envoy-gateway-system) — Namespace of the parent Gatewayparent_gateway_section_name(https) — Listener (sectionName) of the parent Gatewayhost(""→ingress.core.domain) — Hostname. One of both is required, otherwiseinstallfails.route_name(harbor) — Name of the HTTPRouteservice_name("") — Empty: path routing to core/portal as above. Set: single backend for path/(e.g.harborwithingress.enabled: false)service_port(80) — Port of the single backend; ignored with path routingtls.issuer(letsencrypt-production, fallbackingress.letsencrypt.issuer) —ClusterIssuerfor the Certificatetls.secret_name(harbor-gateway-tls) — Secret of the Certificatetraffic.request_timeout(900s) —ClientTrafficPolicy.requestReceivedTimeoutandBackendTrafficPolicy.requestTimeout. A single blob upload or download that takes longer is cut off — raise it for very large images on slow links.traffic.connect_timeout(60s) —BackendTrafficPolicy.connectTimeouttraffic.idle_timeout(900s) —ClientTrafficPolicy.idleTimeouttraffic.buffer_limit(10Mi) —ClientTrafficPolicy.connection.bufferLimit
Ready-made examples: polycrate block examples harbor (gateway-api-envoy, gateway-parent, dual-ingress-gateway).
Variant A — own Gateway on eg-shared (default)
- name: harbor
from: cargo.ayedo.cloud/ayedo/k8s/harbor:0.0.26
config:
namespace: harbor
ingress:
enabled: false # Gateway only; true = Ingress in parallel
core:
domain: registry.example.com
gateway:
enabled: true
gateway_class_name: eg-shared
tls:
issuer: letsencrypt-production
secret_name: harbor-gateway-tls
DNS for registry.example.com points at the shared VIP of the envoy block. Use gateway_class_name: eg-dedicated for an own IP.
Variant B — attach the route to an existing parent Gateway
ingress:
enabled: false
core:
domain: registry.example.com
gateway:
enabled: true
parent_gateway_name: shared-https # existing Gateway with an HTTPS Terminate listener
parent_gateway_namespace: envoy-gateway-system
parent_gateway_section_name: https
tls:
issuer: letsencrypt-production
The parent needs a terminating HTTPS listener with that sectionName that admits routes from the block namespace (allowedRoutes.namespaces.from: All or a matching selector) and references a certificate for the host. The block's Certificate lives in the block namespace; a listener in another namespace needs a ReferenceGrant or its own (wildcard) certificate. No own Gateway, no traffic policies — timeouts and buffer limits come from the parent. The envoy block's default_gateway (eg-shared, listener tls, TLS passthrough) is not a valid parent: HTTPRoutes need a terminating HTTPS listener.
Variant C — existing Gateway in the block namespace
gateway:
enabled: true
create_gateway: false
gateway_name: my-existing-gateway
The block creates only the Certificate and the HTTPRoute, pointing at my-existing-gateway in the block namespace (no sectionName).
Variant D — Ingress and Gateway in parallel (cutover)
ingress:
enabled: true
core:
domain: registry.example.com
class: nginx
tls:
enabled: true
letsencrypt:
issuer: letsencrypt-production
gateway:
enabled: true # host empty → ingress.core.domain
tls:
issuer: letsencrypt-production
polycrate run harbor installwith both on. Ingress and Gateway serve the same host.- Check the Gateway before the DNS switch:
curl --resolve registry.example.com:443:<ENVOY-VIP> https://registry.example.com/api/v2.0/health→200. - Switch DNS to the Envoy VIP;
docker login registry.example.comonce clients see the new record. - Optional:
ingress.enabled: falseandinstallagain. Helm switches toexpose.type=clusterIPand removes the chart Ingress; the HTTPRoute stays unchanged.
Checks
kubectl -n harbor get svc harbor-core harbor-portal
kubectl -n harbor get gateway,httproute,certificate
kubectl -n harbor get httproute harbor -o jsonpath='{.status.parents[*].conditions}'
Accepted=True and ResolvedRefs=True on the route, Ready=True on the Certificate.
Typical errors:
installfails:gateway.enabled requires gateway.host or ingress.core.domain— neither is set.- HTTPRoute
ResolvedRefs=False/BackendNotFound—gateway.service_name: harboris set whileingress.enabledistrue(no nginx Service then). Removeservice_nameto route to core/portal. - HTTPRoute
Accepted=False/NotAllowedByListeners— the parent Gateway does not admit routes from the namespace, orparent_gateway_section_namedoes not match. - Certificate stays
Ready=False— the ACME challenge cannot reach the host (DNS still on the old target, issuer without a matching solver).kubectl -n harbor describe challenge. - Large
docker pushaborts after ~15 minutes — raisetraffic.request_timeout.