You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
Applying an HTTPRoute automatically creates an accompanying service intention config entry for the destination service directly through the Consul API.
Attempting to manage the service intentions for the same destination service afterwards, using a ServiceIntentions custom resource, will silently fail as the Consul K8s controller responsible for reconciliation of ServiceIntentions does not merge an existing config entry.
Reproduction Steps
Create API-Gateway CRDs
helm install consul ...
Deploy API Gateway resource agw
Deploy public-api service
Create HTTPRoute for public-api
Deploy frontend service
Attempt to create ServiceIntentions for public-api to add frontend to sources array
Logs
Logs
config entry output after HTTPRoute creation:
#consul config read -kind=service-intentions -namespace=hashicups -name=public-api
{
"Kind": "service-intentions",
"Name": "public-api",
"Partition": "default",
"Namespace": "hashicups",
"Sources": [
{
"Name": "agw",
"Partition": "default",
"Namespace": "api-gateway",
"Action": "allow",
"Precedence": 9,
"Type": "consul",
"Description": "Allow traffic from Consul API Gateway. Reconciled by controller at 2023-03-10T23:29:36Z."
}
],
"CreateIndex": 7252,
"ModifyIndex": 7252
}
Capability to create an HTTPRoute while maintaining the ability to define [additional] service intentions for the same destination service through the ServiceIntentions CRD.
Environment details
consul-api-gateway version: 0.5.1
configuration used to deploy the gateway controller:
# consul 1.0.4 helm chartapiGateway:
enabled: trueimage: hashicorp/consul-api-gateway:0.5.1imageEnvoy: envoyproxy/envoy:v1.24.2
Kubernetes version: v1.23.12
Consul Server version: hashicorp/consul-enterprise:1.14.4-ent-ubi
I can confirm I'm seeing the same issue, the ServiceIntentions appears to deploy correctly, however when I describe the ServiceIntentions I see the following:
Status:
Conditions:
Last Transition Time: 2023-03-17T16:39:57Z
Message: config entry already exists in Consul
Reason: ExternallyManagedConfigError
Status: False
Type: Synced
Consul API Gateway has evolved a lot this year and now comes baked into the consul-k8s Helm chart without the need for this separate project/controller. As a result, the project in this repo has been deprecated (see this release note).
The specific issue described here has been addressed in v1.2.0+ of consul-k8s, and the API gateway solution there does not create intentions, instead leaving that to the user to do however they wish and avoiding the need to merge the configuration entries altogether (see release note).
We recommend upgrading to v1.2.0+ of the Consul Helm chart and running Consul v1.16.0+ with the native Consul API Gateway solution baked in to resolve this issue. You can find instructions for completing that upgrade here.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Overview of the Issue
Applying an
HTTPRoute
automatically creates an accompanying service intention config entry for the destination service directly through the Consul API.Attempting to manage the service intentions for the same destination service afterwards, using a
ServiceIntentions
custom resource, will silently fail as the Consul K8s controller responsible for reconciliation ofServiceIntentions
does not merge an existing config entry.Reproduction Steps
helm install consul ...
agw
public-api
serviceHTTPRoute
forpublic-api
frontend
serviceServiceIntentions
forpublic-api
to addfrontend
to sources arrayLogs
Logs
config entry output after HTTPRoute creation:
output from 'kubectl logs':
Expected behavior
Capability to create an
HTTPRoute
while maintaining the ability to define [additional] service intentions for the same destination service through theServiceIntentions
CRD.Environment details
consul-api-gateway
version: 0.5.1The text was updated successfully, but these errors were encountered: