Skip to content

Conversation

@TheAifam5
Copy link
Contributor

@TheAifam5 TheAifam5 commented Oct 16, 2025

Closes: #215
Depends On: #214

@TheAifam5
Copy link
Contributor Author

TheAifam5 commented Oct 16, 2025

The commit 59162cd will be deleted once #214 is merged.

@TheAifam5 TheAifam5 changed the title Add support for cilium ingress Add support for Cilium-based Gateway API Oct 16, 2025
@TheAifam5 TheAifam5 force-pushed the feat/cilium-gateway-api branch 2 times, most recently from 5930d13 to 6fd1cd1 Compare October 17, 2025 20:28
Comment on lines +43 to +48
spec = {
gatewayClassName = "cilium"
infrastructure = {
annotations = local.ingress_load_balancer_annotations
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks more like Gateway spec. I think the GatewayClass is created automatically when GatewayAPI CRDs are detected: https://github.com/cilium/cilium/blob/v1.18.2/install/kubernetes/cilium/values.yaml#L1015-L1019

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been not finalized yet, nor even tested. Please don't review drafts if possible, thank you.

Comment on lines +1699 to +1707
validation {
condition = (
var.gateway_api_provider != "cilium" ||
(var.gateway_api_provider == "cilium" &&
var.cilium_helm_version == "v1.18.2" &&
var.gateway_api_version == "v1.3.0")
)
error_message = "When gateway_api_provider is 'cilium', cilium_helm_version must be 'v1.18.2' and gateway_api_version must be 'v1.3.0'."
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s avoid such explicit version tracking in this module. We should only ships config compatible with the component versions in use.

Comment on lines +1672 to +1691
variable "gateway_api_provider" {
type = string
default = "cilium"
description = "Specifies the Gateway API provider. Options are 'cilium' (Cilium Controller), or 'ingate' (InGate Ingress & Gateway API Controller)."

validation {
condition = contains(["cilium", "ingate"], var.gateway_api_provider)
error_message = "Invalid Gateway API provider. Allowed values are 'cilium', or 'ingate'."
}

validation {
condition = var.gateway_api_provider != "cilium" || var.cilium_enabled
error_message = "Gateway API provider cannot be set to 'cilium' unless Cilium is also enabled."
}

validation {
condition = var.gateway_api_provider != "ingate"
error_message = "Gateway API provider 'ingate' is not yet supported."
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d remove that, since we should aim to support multiple providers. Our main focus should be on Cilium, as it’s already shipped with this module. At this point, I’m not sure if or when we’ll add other GatewayAPIs, especially since deep integration with this module isn’t necessary anymore. Let’s finish Cilium GatewayAPI first, then decide if adding more providers is really needed.

Comment on lines +1710 to +1716
validation {
condition = (
var.gateway_api_provider != "ingate" ||
(var.gateway_api_provider == "ingate" && var.gateway_api_version == "v1.2.0")
)
error_message = "When gateway_api_provider is 'ingate', gateway_api_version must be 'v1.2.0'."
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s avoid such explicit version tracking in this module. We should only ships config compatible with the component versions in use.

type = bool
default = false
description = "Enables the experimental Gateway API features. These features are not yet part of the official Gateway API specification and may change in future releases."
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline at the end

@M4t7e
Copy link
Contributor

M4t7e commented Oct 18, 2025

I don't see a way to provide the LB annotations via GatewayClass. It would be best to configure HCCM Service Controller with global presets instead of annotations, but most of the relevant annotations are not available as env var. See:

@TheAifam5 TheAifam5 force-pushed the feat/cilium-gateway-api branch from 6fd1cd1 to 4214d6a Compare October 18, 2025 11:02
@M4t7e
Copy link
Contributor

M4t7e commented Oct 18, 2025

I've just noticed there's also a limit of 8 annotations for the Gateway CRD. See: kubernetes-sigs/gateway-api#2734

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.

Support for Gateway API

2 participants