contour-operator icon indicating copy to clipboard operation
contour-operator copied to clipboard

Add v1alpha2 API

Open danehans opened this issue 4 years ago • 11 comments

Please describe the problem you have https://github.com/projectcontour/contour-operator/pull/382 is an important breaking API change. Other potential breaking API changes may be needed due to Contour natively supporting Gateway API.

Possible API changes:

  • The operator will no longer need to manage the Envoy infra when Contour adds this support. How does this affect the operator API? For example, should GatewayClassRef still exist, or does it need to change?
  • Will Contour fully support EnvoyNetworkPublishing? Do any deviations exist?
  • Will the removal of gatewayclass/gateway controllers introduce API changes?

danehans avatar Jun 15 '21 17:06 danehans

v1alpha2 should be based on main after a release is cut, i.e. v1.17.0. Copy v1alpha1 to v1alpha2, preface deprecated fields with deprecated, make API changes, add any new fields, generate CRDs, update imports/examples to use new API version, etc..

danehans avatar Jun 16 '21 18:06 danehans

Will Contour fully support EnvoyNetworkPublishing? Do any deviations exist?

Since the GatewayClass is being managed similarly to IngressClass, I suggest the API change look something like:

// ContourSpec defines the desired state of Contour.
type ContourSpec struct {
...
	// GatewayClassController is the controller string used by Contour to manage gatewayclasses.
	// If unset, defaults to "projectcontour.io/contour"
	//
	// For additional GatewayClass details, refer to:
	//   https://gateway-api.sigs.k8s.io/api-types/gatewayclass/
	//
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:default={"projectcontour.io/contour"}
	// +optional
	GatewayClassController *string `json:"gatewayClassController,omitempty"`
}

danehans avatar Jun 16 '21 18:06 danehans

https://github.com/projectcontour/contour-operator/pull/382 details namespace-related API changes. Note: the PR implements the changes to v1alpha1 and should be updated to use v1alpha2 after this issue is resolved.

danehans avatar Jun 16 '21 18:06 danehans

xref: https://github.com/projectcontour/contour-operator/issues/322

danehans avatar Jun 16 '21 18:06 danehans

cc: @nak3 @amdonov @BostjanBozic to make you aware of the plans for an API bump. Feel free to chime in with any feedback for API improvements.

danehans avatar Jun 17 '21 16:06 danehans

From my side maybe just a remark that maybe we can get rid of NetworkPublishing level and go straight to Envoy, as there are no other options configurations there anyway. Unless there is something planned for the future?

On side note, should we maybe take this opportunity to upgrade project to Kubebuilder scheme v3 (migration)?

BostjanBozic avatar Jun 18 '21 06:06 BostjanBozic

Reopen https://github.com/projectcontour/contour-operator/issues/386 after this PR is resolved.

danehans avatar Jun 23 '21 21:06 danehans

From my side maybe just a remark that maybe we can get rid of NetworkPublishing level and go straight to Envoy, as there are no other options configurations there anyway. Unless there is something planned for the future?

@BostjanBozic thanks for the input. The NetworkPublishing API was designed to support the ability to manage Contour network endpoints. This may change due to https://github.com/projectcontour/contour/issues/3545.

On side note, should we maybe take this opportunity to upgrade project to Kubebuilder scheme v3 (migration)?

I agree that the we should consider migrating to kubebuilder v3, but I see that as a separate independent issue.

danehans avatar Jun 23 '21 21:06 danehans

On side note, should we maybe take this opportunity to upgrade project to Kubebuilder scheme v3 (migration)?

xref: https://github.com/projectcontour/contour-operator/issues/386

danehans avatar Jun 23 '21 21:06 danehans

This can't be done until we push out 1.17, so this is deliverable in the 1.18 timeframe.

youngnick avatar Jul 01 '21 05:07 youngnick

this is important to do for 1.19: https://github.com/projectcontour/contour-operator/issues/386#issuecomment-862618737

will also allow us to be smarter about how we handle multiple contours with gateway api

sunjayBhatia avatar Jul 22 '21 16:07 sunjayBhatia