Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync resources from control plane to Kyma Runtimes #913

Closed
Tracked by #776
pbochynski opened this issue Oct 4, 2023 · 5 comments
Closed
Tracked by #776

Sync resources from control plane to Kyma Runtimes #913

pbochynski opened this issue Oct 4, 2023 · 5 comments
Labels
Epic wontfix This will not be worked on

Comments

@pbochynski
Copy link
Contributor

pbochynski commented Oct 4, 2023

Description
Provide a way for central components to push some resources to Kyma Runtimes. It can be a secret, deployment, or any other k8s resource. The resource can be pushed to the individual cluster or to the group of clusters (e.g. all internal clusters, all beta clusters).

Reasons

Several central components need to create some resources in managed Kyma Runtimes. Use cases:

  • KEB installs secret for BTP service operator
  • compass manager needs to propagate a secret for the runtime agent
    The NFS storage controller needs to create a storage class and persistent volume
  • The warden needs to create a deployment and service account and role

Introducing a resource that contains a raw k8s manifest to install could be a generic solution. This way only one component would fetch the target cluster kubeconfig and use it to apply the resource. Together with the watcher component we can provide a tooling that will allow central components to avoid direct connection with thousands of Kyma Runtimes. As a result, we could achieve better performance (optimize the number of connections) and better security (fewer components have cluster-admin access to customer runtimes).

Acceptance Criteria

  • Describe the [KCP Sync Resource] behaviour
    • Given an SKR Cluster
      • And a KCP Kyma CR is created on the KCP Cluster
      • And a Kubeconfig Secret is created on the KCP Cluster
      • And there is a Kubernetes Resource Manifest to be synced to the SKR Cluster
      • And there is a target SKR Cluster or a group of those determined
    • When the [KCP Sync Resource] is created on the KCP Cluster
      • Then the correct SKR Cluster group is determined as the sync target
        • And the Kubernetes Resource Manifest inside the [KCP Sync Resource] is synced to the SKR Cluster
        • And the [KCP Sync Resource] has a determined state
    • When the [KCP Sync Resource] is removed from the KCP Cluster
      • Then the Kubernetes Resource Manifest is removed from the SKR Cluster
@janmedrek
Copy link
Contributor

janmedrek commented Oct 26, 2023

We would need some kind of design for the [KCP Sync Resource] (name TBD). I believe it should be a separate CRD that would function similarly to the Manifest CR, it would have an inline k8s manifest inside though.

kcp-resource drawio (1)

With a generic solution, we would be able to address the issue of Mandatory Modules as well, it would not require additional implementation on our side (i.e. Warden would be just a synced k8s manifest and not a module).

This would fulfil almost all of the Mandatory Module ACs, so it is worth considering at least.

@ruanxin
Copy link
Contributor

ruanxin commented Oct 30, 2023

A proposal for this KCP Sync Resource #991

@ruanxin
Copy link
Contributor

ruanxin commented Nov 4, 2023

A proposal for this resource sync setup design, I have a PR in kyma community as SDD document.

@a-thaler
Copy link

We learned today that the VPC Peering use case requires a sync in the opposite direction as well. @pbochynski could you formulate that in the description additionally to not make it transparent for all.

@ruanxin
Copy link
Contributor

ruanxin commented Mar 6, 2024

@janmedrek janmedrek added the wontfix This will not be worked on label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants