Skip to content

Conversation

@cnvergence
Copy link
Member

@cnvergence cnvergence commented Dec 30, 2024

What type of PR is this?

api: support infra deployment in the gateway namespace

What this PR does / why we need it:

api for supporting gateway namespace for envoy proxy infrastructure pods, there will be two modes, hoping that gateway-api proposal will pass in kubernetes-sigs/gateway-api#3366

This is the first part of #2629 issue

Which issue(s) this PR fixes:

Release Notes: No

@cnvergence cnvergence force-pushed the support-infra-different-ns branch from 8385605 to 7a963e3 Compare December 30, 2024 17:58
@codecov
Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.74%. Comparing base (43621b4) to head (ce9e640).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4982      +/-   ##
==========================================
- Coverage   66.75%   66.74%   -0.01%     
==========================================
  Files         209      209              
  Lines       32058    32058              
==========================================
- Hits        21399    21396       -3     
- Misses       9381     9383       +2     
- Partials     1278     1279       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cnvergence cnvergence force-pushed the support-infra-different-ns branch from c0d2e29 to c22f4d6 Compare December 31, 2024 17:54
@cnvergence cnvergence marked this pull request as ready for review December 31, 2024 17:54
@cnvergence cnvergence requested a review from a team as a code owner December 31, 2024 17:54
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks !

@arkodg arkodg requested review from a team January 6, 2025 18:35
cnvergence and others added 6 commits January 7, 2025 04:34
Signed-off-by: Karol Szwaj <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Co-authored-by: Arko Dasgupta <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
@zirain zirain force-pushed the support-infra-different-ns branch from 3d0bd84 to ce9e640 Compare January 6, 2025 20:34
@arkodg arkodg merged commit 731d0d0 into envoyproxy:main Jan 6, 2025
25 checks passed
@cnvergence cnvergence deleted the support-infra-different-ns branch January 7, 2025 08:56
@kahirokunn
Copy link

awesome!!! Thx !!

@HannaManista
Copy link

HannaManista commented Mar 6, 2025

Hi All, @arkodg, I try to introduce the gateway-namespace deployment in my EnvoyGateway configuration, but it seems to fail - resources are still created in the controller's nsp instead of the separate gateway namespaces, what I have is:

 config: 
            envoyGateway:
              gateway:
                controllerName: "gateway.envoyproxy.io/envoy-gatewayclass-controller"   
              provider:
                type: Kubernetes
                kubernetes:
                  deploy: 
                    type: "GatewayNamespace"

What is added in the docs (https://gateway.envoyproxy.io/docs/api/extension_types/#kubernetesdeploymode) seems to pose a doubt for me on where actually this type: GatewayNamespace sohuld be added - under kubernetes? Will you help me figuring this out?
Thanks in advance!

@arkodg
Copy link
Contributor

arkodg commented Mar 6, 2025

@HannaManista this feature is still WIP, only the API is merged

@HannaManista
Copy link

Thanks for quick asnwer! So it means it is not yet ready to be used? Do you have an estimated time when this will be implemented?

@arkodg
Copy link
Contributor

arkodg commented Mar 6, 2025

should be ready by v1.4 ( end April 2025)

@HannaManista
Copy link

Hi, I can see that this issue was added in v1.4.0 (#5137 ) by @cnvergence so it should be also available to be used. As I mentioned earlier, I need to enable creating Gateway pods and services in gateway's namespace (not controller's nsp), so based on docs I should set
type: "GatewayNamespace" (https://gateway.envoyproxy.io/v1.3/api/extension_types/#kubernetesdeploymode)
but as of the documentation, it is not clear where the "type" attribute should be placed - directly in provider section? Can you help me out on how to enable this GatewayNamespace mode?

@cnvergence
Copy link
Member Author

Hi @HannaManista, the docs should be added soon, you can take a look already here
#6040
Please note that it is still an alpha feature. If you encounter any issues, we would love to hear from you :)

@cnvergence
Copy link
Member Author

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyGateway
metadata:
  name: envoy-gateway
  namespace: envoy-gateway-system
spec:
  provider:
    type: Kubernetes
    kubernetes:
      deploy:
        type: GatewayNamespace

@HannaManista
Copy link

Great! Thanks, I'll try it out :)

@HannaManista
Copy link

HannaManista commented May 15, 2025

And did you have opportunity to try out if the change in deploy mode from (default) ControllerNamespace to GatewayNamespace causes gateway's downtime? Taking of course a scenario where the gateway is deployed in different namespace than the controller
Probably yes, because the deployment will have to be recreated in another nsp

@arkodg
Copy link
Contributor

arkodg commented May 15, 2025

yes its not going to be hitless

@HannaManista
Copy link

HannaManista commented May 23, 2025

Hi cnvergence, I tried to switch from version 1.3 to 1.4 and encountered an error on the envoy-gateway pod:
MountVolume.SetUp failed for volume "certs" : configmap references non-existent config key: ca.crt
As of my investigation, in EnvoyGateway v1.3 there is a secret that is mounted to the envoy container:
image
and contains a ca.crt
In v1.4 the Secret "envoy" is switched to ConfigMap which is mounted to the container:
image
The problem is it doesn't contain the key "ca.crt" and therefore the Envoy Pod is hanging in a ContainerCreating state.
image

@cnvergence
Copy link
Member Author

Hi @HannaManista, it is related to #6064. The fix was merged with the main last week and will be released in v1.4.1.
Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants