emissary-ingress / emissary

open source Kubernetes-native API gateway for microservices built on the Envoy Proxy
https://www.getambassador.io
Apache License 2.0
4.37k stars 685 forks source link

emissary 3.9.1 manifests do not work #5465

Closed miguelvr closed 11 months ago

miguelvr commented 11 months ago

Describe the bug Manifests for 3.9.1 add an init container to the emissary-ingress deployment that looks for emissary-apiext in the emissary-system namespace instead of in the emissary namespace

To Reproduce Install the with 3.9.1 manifests

Expected behavior Init container should start up the pod and look for emissary-apiext in the emissary namespace. The namespace should at the very least be templated with an env var, so it can be modified with kustomize

Versions (please complete the following information):

Alice-Lilith commented 11 months ago

The installation namespace for the emissary-apiext deployment should indeed be emissary-system unless modified from the defaults in the officially published manifests, so this sounds like the correct behaviour to me. Changing the namespace of the emissary-apiext deployment is totally fine, but you'll need to go ahead and change the init container (and possibly some other configuration depending on your setup). If deploying Emissary with kubectl you can manually modify the installation manifest. If you're using the helm chart, then the waitForApiext helm value can be used to point it at your emissary-apiext installation (or disable it if you like).

jpo-tu commented 10 months ago

I wished something like this worked (it used to):

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: my-namespace # <- THIS
resources:
  - https://app.getambassador.io/yaml/emissary/3.9.1/emissary-crds.yaml
  - https://app.getambassador.io/yaml/emissary/3.9.1/emissary-emissaryns.yaml

As a workaround for 3.9.x, the following emulates disabling the wait-for-apiext init container altogether:

kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: my-namespace
resources:
  - https://app.getambassador.io/yaml/emissary/3.9.1/emissary-crds.yaml
  - https://app.getambassador.io/yaml/emissary/3.9.1/emissary-emissaryns.yaml
patches:
  - path: deployment-emissary-ingress.yaml

deployment-emissary-ingress.yaml:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: emissary-ingress
  namespace: emissary
spec:
  template:
    spec:
      initContainers: null