kyma-project / lifecycle-manager

Controller that manages the lifecycle of Kyma Modules in your cluster.
http://kyma-project.io
Apache License 2.0
10 stars 30 forks source link

Istio Gateway resource should be discoverable using a label #234

Closed fourthisle closed 1 year ago

fourthisle commented 2 years ago

Description:

Currently, the watcher reconciler expects that an istio gateway resource with the name lifecycle-manager-gateway is deployed in the default namespace. Due to the fact that this can vary between the different KCP environments, a better approach would be to implement a more generic way for resolving the name and namespace of the gateway resource. The watcher reconciler uses it to configure the virtual service resource it is managing.

Edit: In this Issue we don't configure the gateway itself. It's only about finding a proper gateway and configuring Virtual Service for the Watcher using that Gateway.

ACs:

Related:

_Originally posted by @jakobmoellersap in https://github.com/kyma-project/lifecycle-manager/pull/231#discussion_r987619930_

Tomasz-Smelcerz-SAP commented 1 year ago

@khlifi411 I have a question about the AC: "Use operator.kyma-project.io/ingress-for + controller name on the gateway to determine the controller that should be used" I assume this means, that spec.selector.app should be set to the operator.kyma-project.io/ingress-for-<controller-name> on the gateway object. But we don't create any gateway object directly in the codebase. I assume then that this should be done in the yaml files / kustomization definitions of the project. Is that correct?

jeremyharisch commented 1 year ago

@Tomasz-Smelcerz-SAP the Gateway will be created at Deploy-Time. I am currently working on that. You do not have to implement the Gateway for this task 👍

fourthisle commented 1 year ago

@khlifi411 I have a question about the AC: "Use operator.kyma-project.io/ingress-for + controller name on the gateway to determine the controller that should be used" I assume this means, that spec.selector.app should be set to the operator.kyma-project.io/ingress-for-<controller-name> on the gateway object. But we don't create any gateway object directly in the codebase. I assume then that this should be done in the yaml files / kustomization definitions of the project. Is that correct?

Yes. That's right!

Tomasz-Smelcerz-SAP commented 1 year ago

@khlifi411 @jeremyharisch One more question. What kind of label selector are we targeting? I need a default. Should it be just the label (we don't care for value), like operator.kyma-project.io/gateway, or maybe key=value, like operator.kyma-project.io/gateway=default ? Any hints?

fourthisle commented 1 year ago

@khlifi411 @jeremyharisch One more question. What kind of label selector are we targeting? I need a default. Should it be just the label (we don't care for value), like operator.kyma-project.io/gateway, or maybe key=value, like operator.kyma-project.io/gateway=default ? Any hints?

For me, It is better to check for just a label as checking for the value assumes that other gateways deployed on KCP have different values for the label. My suggestion would be operator.kyma-project.io/default-gateway 👍

jeremyharisch commented 1 year ago

@khlifi411 @jeremyharisch One more question. What kind of label selector are we targeting? I need a default. Should it be just the label (we don't care for value), like operator.kyma-project.io/gateway, or maybe key=value, like operator.kyma-project.io/gateway=default ? Any hints?

@khlifi411 @Tomasz-Smelcerz-SAP I would like that we stick to Kubernetes "standards" meaning looking for a label with a specific value. Since this does not hurt us, and we do not start introducing random label values. But in general, either way works for our setup.