Giter VIP home page Giter VIP logo

Comments (3)

github-actions avatar github-actions commented on July 20, 2024

Hey @iamyeka! Thanks for opening your first issue. We appreciate your contribution and welcome you to our community! We are glad to have you here and to have your input on Contour. You can also join us on our mailing list and in our channel in the Kubernetes Slack Workspace

from contour.

skriss avatar skriss commented on July 20, 2024

The desire was to not use privileged ports within the Envoy container so it didn't have to run as root/with any elevated privileges. Host networking is not currently supported via the Gateway provisioner, you would need to use custom YAML for that.

from contour.

iamyeka avatar iamyeka commented on July 20, 2024

If i need to use privileged ports like 80&443 within the Envoy container and gateway api at the same time, how could i be able to do that?

From the codes below, it looks like the port will be added 8000 as long as the gateway instance exists. I've done the some tests and can confirm that.

func (p *ListenerProcessor) Run(dag *DAG, cache *KubernetesCache) {
	if cache.gateway != nil {
		dag.HasDynamicListeners = true

		for _, port := range gatewayapi.ValidateListeners(cache.gateway.Spec.Listeners).Ports {
			address := p.HTTPAddress
			if port.Protocol == "https" {
				address = p.HTTPSAddress
			}
			dag.Listeners[port.Name] = &Listener{
				Name:             port.Name,
				Protocol:         port.Protocol,
				Address:          address,
				Port:             int(port.ContainerPort),
				EnableWebsockets: true,
				vhostsByName:     map[string]*VirtualHost{},
				svhostsByName:    map[string]*SecureVirtualHost{},
			}
		}
	} else {
		dag.Listeners[HTTP_LISTENER_NAME] = &Listener{
			Name:            HTTP_LISTENER_NAME,
			Protocol:        "http",
			Address:         p.HTTPAddress,
			Port:            intOrDefault(p.HTTPPort, 8080),
			RouteConfigName: "ingress_http",
			vhostsByName:    map[string]*VirtualHost{},
		}

		dag.Listeners[HTTPS_LISTENER_NAME] = &Listener{
			Name:                        HTTPS_LISTENER_NAME,
			Protocol:                    "https",
			Address:                     p.HTTPSAddress,
			Port:                        intOrDefault(p.HTTPSPort, 8443),
			RouteConfigName:             "https",
			FallbackCertRouteConfigName: "ingress_fallbackcert",
			svhostsByName:               map[string]*SecureVirtualHost{},
		}
	}
}

from contour.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.