Add Gateway API support for SolrCloud external addressability - #843
Open
chinmoysahu wants to merge 15 commits into
Open
Add Gateway API support for SolrCloud external addressability#843chinmoysahu wants to merge 15 commits into
chinmoysahu wants to merge 15 commits into
Conversation
Implements Kubernetes Gateway API as a new external addressability method, enabling HTTPRoute-based routing for SolrCloud services. - Add Gateway API types and controller logic - Generate HTTPRoutes for common and per-node services - Add RBAC for HTTPRoute and BackendTLSPolicy - Update CRDs, Helm charts, and documentation - Add E2E tests following existing Ingress test patterns
- Add comprehensive cleanup logic for BackendTLSPolicy resources: * Delete common policy when hideCommon=true * Delete node policies when hideNodes=true * Delete all policies when BackendTLSPolicy config removed * Delete all policies when method changes from Gateway - Remove focused test markers (FIt, FContext, FDescribe) - Improve variable naming: hostname -> fqdn for clarity - Enhance SolrBackendTLSPolicy documentation with validation constraints
Allows users to append extra alias hostnames to the common HTTPRoute beyond the auto-generated ones from domainName/additionalDomainNames. This is additive (not an override) to maintain consistency with status.externalCommonAddress and BackendTLSPolicy references.
…BackendTLSPolicy validation, doc fixes - Make Gateway API HTTPRoute watch conditional (--gateway-api flag) to avoid envtest failures when Gateway API CRDs are not installed - Fix hideNodes cleanup: delete all node HTTPRoutes when hideNodes=true, not just orphaned ones from scale-down - Add validation: BackendTLSPolicy requires spec.solrTLS to be configured - Fix license header typo in gateway-api.md - Fix BackendTLSPolicy version reference (v1alpha3 -> v1) - Clarify headless service documentation
Contributor
|
Ok, I've merged main in, so we should be up-to-date. I'll do some real reviewing soon. Thanks for getting this setup! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for the Kubernetes Gateway API as a new external addressability method for SolrCloud instances. Gateway API is the successor to the Ingress API and provides a more flexible, vendor-neutral way to manage ingress traffic in Kubernetes.
Features
Gateway API Integration
spec.solrAddressability.external.method: GatewaysectionNameBackendTLSPolicy Support
spec.solrTLSis enabledAPI Changes
New Types (
api/v1beta1/solrcloud_types.go):SolrGatewayOptions,GatewayParentReference,SolrBackendTLSPolicy,GatewayCertificateReferenceNew Utility Functions (
controllers/util/):gateway_util.go: HTTPRoute generation and managementgateway_util_backendtls.go: BackendTLSPolicy generation and managementRBAC: Added permissions for
httproutesandbackendtlspoliciesingateway.networking.k8s.ioAPI groupDocumentation
docs/solr-cloud/gateway-api.md: Comprehensive usage guide with configuration examples, BackendTLSPolicy setup, and Gateway implementation support matrix (Envoy Gateway, kgateway, NGINX Gateway Fabric, etc.)docs/solr-cloud/README.md: Added Gateway API referenceDependency Updates
Gateway API v1.4.0+ is required to use the stable
v1API forBackendTLSPolicy(GA). This upgrade forced Go 1.24.0+ (required by Gateway API v1.4.0), which cascaded to Kubernetes libraries (v0.34.1) and controller-runtime (v0.22.1).CRD Changes: Extensive changes in
config/crd/bases/*.yamlinclude new Gateway API fields plus upstream schema updates from Kubernetes library upgrades (deprecation notices, field descriptions, etc.). These are auto-generated bycontroller-gen.References:
Example Configuration
Testing
E2E Tests (
tests/e2e/solrcloud_gateway_test.go):Manual Testing:
Compatibility
Migration Path
method: Gateway