-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
KubernetesService discovery by KubernetesService discovery by KubernetesService DiscoveryOcelot feature: Service DiscoveryOcelot feature: Service DiscoverybugIdentified as a potential bugIdentified as a potential bug
Description
Hi, I'm setting up ocelot on a k8s cluster and I noticed that if you set the PollKube
service discovery the first requests you receive for that k8s service go to 404 not found all the others after the first it works great also when pods go up and down.
I'm using ocelot version 24.0.1
Configuration to reproduce the problem:
{
"GlobalConfiguration": {
"RequestIdKey": "x-correlation-id",
"ServiceDiscoveryProvider": {
"Scheme": "https",
"Host": "kubernetes.docker.internal",
"Port": 6443,
"Token": "token",
"Namespace": "test-ns",
"Type": "PollKube",
"PollingInterval": 500
}
},
"Routes": [
{
"UpstreamPathTemplate": "/api/{everything}",
"UpstreamHttpMethod": [
"Get",
"Put",
"Post",
"Delete",
"Options"
],
"DownstreamPathTemplate": "/api/v1.0/{everything}",
"DownstreamScheme": "http",
"LoadBalancerOptions": {
"Type": "RoundRobin"
},
"ServiceName": "downstream-api-svc"
}
]
}
Add K8s to ocelotBuilder without kubeclint options because it is created from global configuration
var ocelotBuilder = builder.Services
.AddOcelot(builder.Configuration)
.AddKubernetes(null, allowInsecure: true);
Could you help me?
Thanks,
Pietro
Metadata
Metadata
Assignees
Labels
KubernetesService discovery by KubernetesService discovery by KubernetesService DiscoveryOcelot feature: Service DiscoveryOcelot feature: Service DiscoverybugIdentified as a potential bugIdentified as a potential bug