Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Add option for Contour's --ingress-class-name #228

Closed
eplightning opened this issue Mar 1, 2021 · 7 comments · Fixed by #239
Closed

Add option for Contour's --ingress-class-name #228

eplightning opened this issue Mar 1, 2021 · 7 comments · Fixed by #239
Labels
area/ingress Issues or PRs related to the Ingress API. area/operational Issues or PRs about making Contour easier to operate as a production service. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@eplightning
Copy link

Please describe the problem you have

Currently there's no way to specify Contour's --ingress-class-name flag (https://projectcontour.io/docs/main/config/annotations/#ingress-class) when using the operator.

This makes it impossible to deploy multiple instances of Contour which serve different subsets of ingresses (without deploying other Contour instances manually of course).

I might be missing something but I can't see any way of specifying it at this moment.

@eplightning eplightning added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 1, 2021
@sunjayBhatia sunjayBhatia added area/ingress Issues or PRs related to the Ingress API. area/operational Issues or PRs about making Contour easier to operate as a production service. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Mar 1, 2021
@nak3
Copy link
Member

nak3 commented Mar 2, 2021

This is a blocker of contour operator for Knative.

@sunjayBhatia sunjayBhatia added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 2, 2021
@sunjayBhatia sunjayBhatia added this to the 1.14.0 milestone Mar 2, 2021
@sunjayBhatia
Copy link
Member

Sounds like we can maybe just add this configuration field in the top level ContourSpec alongside the Gateway class reference?

type ContourSpec struct {
// Replicas is the desired number of Contour replicas. If unset,
// defaults to 2.
//
// +kubebuilder:default=2
// +kubebuilder:validation:Minimum=0
Replicas int32 `json:"replicas,omitempty"`
// Namespace defines the schema of a Contour namespace. See each field for
// additional details. Namespace name should be the same namespace as the
// Gateway when GatewayClassRef is set.
//
// TODO [danehans]: Ignore Namespace when GatewayClassRef is set.
// xref: https://github.com/projectcontour/contour-operator/issues/212
//
// +kubebuilder:default={name: "projectcontour", removeOnDeletion: false}
Namespace NamespaceSpec `json:"namespace,omitempty"`
// NetworkPublishing defines the schema for publishing Contour to a network.
//
// See each field for additional details.
//
// +kubebuilder:default={envoy: {type: LoadBalancerService, containerPorts: {{name: http, portNumber: 8080}, {name: https, portNumber: 8443}}}}
NetworkPublishing NetworkPublishing `json:"networkPublishing,omitempty"`
// GatewayClassRef is a reference to a GatewayClass name used for
// managing a Contour.
//
// +kubebuilder:validation:MaxLength=253
// +optional
GatewayClassRef *string `json:"gatewayClassRef,omitempty"`
}

If theres no objections to that placement I can put up a quick PR

@stevesloka
Copy link
Member

I think that works @sunjayBhatia. We'll need to have logic to check for duplicate ingress class names as well as duplicate gatewayclass names but can be a seperate PR (if not already there).

@sunjayBhatia
Copy link
Member

Oh actually before we do this how do you see this interfering with the IngressClass work as well: projectcontour/contour#2146

Seems like this request is for the Ingress v1beta1 feature and the --ingress-class-name flag is already public, but since it's not exposed on the operator this is a chance to have a nicely defined API here with the differences between Ingress v1beta1 and Ingress v1

@danehans
Copy link
Contributor

danehans commented Mar 4, 2021

xref: #240 for questions related to ingressclass validation.

@danehans
Copy link
Contributor

@eplightning @nak3 now that this issue is resolved, the operator should support the Knative use case. Can you please confirm and provide an update to this issue?

@eplightning
Copy link
Author

Just tested it out, I can now create multiple Contour instances with different --ingress-class-name flags using the Operator.

It's enough for my use case. I'm not an expert on Knative but it should be enough there as well.

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/ingress Issues or PRs related to the Ingress API. area/operational Issues or PRs about making Contour easier to operate as a production service. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants