Resolve "Use GitLab serverless with existing Knative installation"
What does this MR do?
Following the suggestion on https://gitlab.com/gitlab-org/gitlab-ce/issues/58941#note_155863604
Our goal is to find deployed functions regardless of the associated cluster instance having a Knative application installed via GitLab managed apps.
Although, we're currently using ReactiveCaching
to fetch the services which is associated with a Clusters::Applications::Knative
model. Since we might not have a Clusters::Applications::Knative
instance associated to the cluster, then we need to extract this ReactiveCaching
logic out of this model.
Proposal:
-
Stop detecting Knative from the database presence, since it might not have been installed by us. Instead, search by the
apis/serving.knative.dev
resource on the cluster. (already implemented by our KubeClient gem). -
Since
Clusters::Applications::Knative
instance might not exist for the cluster, move the responsibility of finding services to aClusters::Cluster::KnativeServicesFinder
class. -
Since
Clusters::Cluster::KnativeServicesFinder
wont be ActiveRecord class, use theReactiveCaching
key as the the cluster id.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes #58941 (closed)