Skip to content

feat(provider): Ha proxy provider for load balancing - #7822

Open
jasonmcintosh wants to merge 121 commits into
spinnaker:mainfrom
jasonmcintosh:haProxyProvider
Open

feat(provider): Ha proxy provider for load balancing#7822
jasonmcintosh wants to merge 121 commits into
spinnaker:mainfrom
jasonmcintosh:haProxyProvider

Conversation

@jasonmcintosh

Copy link
Copy Markdown
Member

Ties into the proxmox - enables on premise caching & deployments using proxmox & haproxy for load balancing. Generates haproxy SDK from the openapi spec using openapi generator (similar to gate's api generation for the spin cli).

jasonmcintosh and others added 30 commits July 17, 2026 23:55
…ne API v3 SDK and credentials stack

* Vendor the HAProxy Data Plane API v3 OpenAPI spec (v3.4, upstream commit
  f314b6be) and generate a java/retrofit2/jackson SDK at build time via
  openapi-generator 7.10.0
* Register the module in clouddriver/settings.gradle cloudProviderProjects
* Credentials stack behind haproxy.enabled mirroring the proxmox provider:
  ConfigurationProperties, parser, named account credentials, lifecycle
  handler, account.storage support
* MockWebServer contract tests pinning request paths/auth/parsing, plus a
  disabled live integration test for validating against a real endpoint

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…aching agents

* HaProxyCacheKeys with haproxy;TYPE;account;region;name layout and
  HaProxyResourceType (FRONTEND, BACKEND, APPLICATION, CLUSTER)
* HaProxyMetadataNamer derives Monikers from Data Plane API metadata
  (spinnaker-app/cluster/stack/detail/sequence) with Frigga fallback
* FrontendCachingAgent and BackendCachingAgent load full sections
  (binds, rules, embedded servers) and build application/cluster
  relationship entries via AbstractHaProxyCachingAgent
* Agents wired into HaProxyCredentialsLifecycleHandler per account

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* HaProxyLoadBalancer model: frontend presented as a load balancer with
  mode, binds, default backend, metadata, and attached server groups
* HaProxyLoadBalancerProvider reads FRONTEND/BACKEND/APPLICATION cache
  entries; server groups come from default_backend plus use_backend
  switching rule targets, with instances from embedded backend servers
* Item/ByAccount/ByRegion/Details summary hierarchy for the LB listing
  endpoints; dangling backend references yield empty server groups

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* HaProxySecurityGroup model: a frontend's client-access policy (src
  ACLs gated by http-request allow/deny rules) as a security group
* HaProxySecurityGroupProvider is a pure view over cached FRONTEND
  entries (full sections already include acl_list and
  http_request_rule_list) — no additional caching agent required
* Each referenced src ACL address expands to an IpRangeRule with the
  frontend's bind ports and the rule type/cond/cond_test as description;
  frontends without access rules yield no security group

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* tcp-request connection/content/session accept/reject rules referencing
  src ACLs now expand to IpRangeRules alongside the http-request rules,
  covering TCP-mode frontends (e.g. database proxies)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ncer instances

* BackendCachingAgent fetches runtime server state per backend
  (/runtime/backends/{name}/servers), embeds it in backend attributes,
  and emits authoritative HEALTH cache entries keyed
  haproxy;HEALTH;account;region;backend;server with the server address
  and the account's optional proxmoxAccount link for IP correlation
* HaProxyServerHealth maps admin/operational state to HealthState
  (maint->OutOfService, drain/stopping->Draining, up->Up, down->Down),
  with operator-set admin state taking precedence
* LoadBalancerProvider now populates instance health from cached runtime
  state; integration test prints runtime states for live validation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* HaProxyTransactions runs config changes as version -> transaction ->
  commit (force_reload), retrying commit conflicts (HTTP 406/409) from a
  fresh version and deleting abandoned transactions
* upsertLoadBalancer creates or replaces a frontend as a full section
  (binds and metadata included) inside a transaction
* deleteLoadBalancer removes the frontend; missing frontends are a no-op
* enableServerGroup/disableServerGroup flip every backend server between
  ready and maint via the runtime API (immediate, no reload), skipping
  servers already in the target state
* Converters registered for the standard atomic operation names with
  matching descriptions off HaProxyBaseDescription

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* @spinnaker/haproxy workspace package with CloudProviderRegistry
  registration: load balancer transformer (normalizes server groups and
  instance health from the HaProxyServer health map, builds instance
  counts) and a React details panel (details, binds, server groups with
  per-server health)
* Wired into deck-app (workspace dependency, app.ts import, settings.js
  provider defaults) and the module build script
* No securityGroup UI registration yet; core degrades gracefully when a
  provider has no securityGroup.transformer delegate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mergify Bot added 30 commits September 1, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant