Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gloo Edge not starting correctly with an incorrect Upstream #4497

Closed
djannot opened this issue Mar 26, 2021 · 2 comments
Closed

Gloo Edge not starting correctly with an incorrect Upstream #4497

djannot opened this issue Mar 26, 2021 · 2 comments
Assignees
Labels
Type: Bug Something isn't working

Comments

@djannot
Copy link
Contributor

djannot commented Mar 26, 2021

Describe the bug
When an Upstream is incorrect (for example, it references a Kubernetes Service that doesn't exist), then Gloo Edge can't start

To Reproduce
Create an Upstream which references a Kubernetes Service that doesn't exist:

apiVersion: gloo.solo.io/v1
kind: Upstream
metadata:
  name: bad-upstream
  namespace: gloo-system
spec:
  discoveryMetadata:
    labels:
      app: nginx
  kube:
    selector:
      app: nginx
    serviceName: doesntexist
    serviceNamespace: default
    servicePort: 80

Restart the gloo deployment, then the gateway-proxy deployment:

kubectl -n gloo-system rollout restart deploy/gloo
kubectl -n gloo-system rollout status deploy/gloo
kubectl -n gloo-system rollout restart deploy/gateway-proxy
kubectl -n gloo-system rollout status deploy/gateway-proxy 

No snapshot will be created and no service will be available

Additional context

  • Gloo Edge version: reproduced with 1.6.8 EE and the latest 1.7 beta
@djannot djannot added the Type: Bug Something isn't working label Mar 26, 2021
@djannot
Copy link
Contributor Author

djannot commented Mar 26, 2021

Seems related to this issue as well: #4438

@kdorosh kdorosh self-assigned this Mar 26, 2021
@kdorosh
Copy link
Contributor

kdorosh commented Mar 26, 2021

I was able to reproduce, and then fix by enabling route replacement.

This is by design. You can have the invalid route replaced by enabling route replacement in the Gloo Settings:

apiVersion: gloo.solo.io/v1
kind: Settings
metadata:
  annotations:
    meta.helm.sh/release-name: gloo
    meta.helm.sh/release-namespace: gloo-system
  labels:
    app: gloo
    app.kubernetes.io/managed-by: Helm
    gloo: settings
  name: default
  namespace: gloo-system
spec:
  discovery:
    fdsMode: WHITELIST
  discoveryNamespace: gloo-system
  gateway:
    readGatewaysFromAllNamespaces: false
    validation:
      allowWarnings: true
      alwaysAccept: true
      proxyValidationServerAddr: gloo:9988
  gloo:
    disableKubernetesDestinations: false
    disableProxyGarbageCollection: false
    enableRestEds: true
    invalidConfigPolicy:
      invalidRouteResponseBody: Gloo Gateway has invalid configuration. Administrators
        should run `glooctl check` to find and fix config errors.
      invalidRouteResponseCode: 404
      replaceInvalidRoutes: true # add this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants