question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After updating to kube 15.0.6, no redirect working

See original GitHub issue

Expected Behavior / New Feature

We had 14.0.11 installed for our gateway service running in Azure K8s, version 1.15.7. After updating to 15.0.6 no reroutes are working. There should be no regressions when doing this update.

Actual Behavior / Motivation for New Feature

Looking at the logs, it shows these errors: Unable to find service discovery provider for type: kube

Here is the Global config: "GlobalConfiguration": { "ServiceDiscoveryProvider": { "Host": "unused", "Port": 443, "Token": "unused", "Namespace": "XXX", "Type": "kube" } }

Since we use rbac with least accessabiliy we have the following definition for the access rights.

apiVersion: v1
kind: ServiceAccount
metadata:
  namespace: XXX
  name: api-serviceaccount
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: XXX
  name: service-reader
rules:
- apiGroups: [""] # "" indicates the core API group
  resources: ["services", "endpoints", "pods"]
  verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: read-services
  namespace: XXX
subjects:
- kind: ServiceAccount
  name: api-serviceaccount
  namespace: XXX
  apiGroup: ""
roleRef:
  kind: Role #this must be Role or ClusterRole
  name: service-reader
  apiGroup: rbac.authorization.k8s.io

Any other information thats needed? Everything else we kept the same, its really only the nuget update and the user account changes.

Steps to Reproduce the Problem

  1. Build a system using 14.x.x for k8s and define a reroute.
  2. Update the kubernetes nuget to 15.06
  3. Verify that the reroute is still working

Specifications

  • Version: 15.0.6
  • Platform: net core 3.1
  • Subsystem: kube

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:8
  • Comments:22

github_iconTop GitHub Comments

4reactions
molesinskicommented, Apr 15, 2020

The way I see it, this commit https://github.com/ThreeMammals/Ocelot/commit/6e5471a714dddb0a3a40fbb97eac2810cee1c78d renamed service discovery providers and now they are rejected here https://github.com/ThreeMammals/Ocelot/blob/master/src/Ocelot/ServiceDiscovery/ServiceDiscoveryProviderFactory.cs#L57. This should be broken for all service discovery providers as they were renamed in multiple places.

The way I got it to work was to create proxy providers with proper names, like they used to have: https://gist.github.com/molesinski/c949264d2d287e13c8c7477eb0632221

1reaction
elvishsu66commented, Jun 26, 2020

Found out the reason from https://github.com/ThreeMammals/Ocelot/commit/3439be89271bb37b170429d69ca74978c941432e It turns out that v16.0.1 has changed the ReRoutes to Routes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

kubernetes/CHANGELOG/CHANGELOG-1.24.md at master
A security issue was discovered in kube-apiserver that could allow an attacker controlled aggregated API server to redirect client traffic to any URL....
Read more >
k8s.gcr.io Redirect to registry.k8s.io - What You Need to ...
If you believe you have encountered a bug with the new registry or the redirect, please open an issue in the kubernetes/registry.k8s.io repo. ......
Read more >
How To Deploy a Frontend on Kubernetes?
A step by step guide to deploying an Angular frontend behind an NGinx Ingress on Kubernetes. K8S installation, Ingress controller deployment ...
Read more >
Release Notes
Changes in validating schemes for valid redirect URIs ... After the upgrade to Jakarta EE, artifacts for Keycloak Admin clients were renamed ...
Read more >
Updating the Kubernetes kube-proxy self-managed add-on
When you update the self-managed type of this add-on, you specify a valid container image version listed in this table. Prerequisites. An existing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found