kyma-project / runtime-watcher

Apache License 2.0
1 stars 14 forks source link

Send Kyma CR object key in the watcher payload to identify which SKR the watched resource belongs to #100

Closed fourthisle closed 1 year ago

fourthisle commented 1 year ago

Description:

In the current watcher-listener payload, it is not possible to know which SKR the watched resource belongs to. The payload should be extended to include this information as it enables KCP components other than lifecycle-manager which have use cases to watch SKR resources.

AC:

fourthisle commented 1 year ago

After further investigation, it turns out that this change request is not required. While installing the resource to be watched, the central-component (component deployed on KCP) needs to apply an owned-by annotation with the namespace/name combination of which Kyma CR (or any tuple identifier it may choose) to the to-be-watched resource. The watcher will send that back in the owner field in the KCP payload sent to the listener endpoint. The following is a sample secret resource that contains the owned-by annotation referencing the SKR, which corresponds to the Kyma CR kyma-sample belonging to the kcp-system namespace:

---
apiVersion: v1
kind: Secret
metadata:
  name: keb-secret
  namespace: kcp-system
  labels:
    "operator.kyma-project.io/watched-by": "lifecycle-manager"
    "operator.kyma-project.io/managed-by": "lifecycle-manager"
  annotations:
    "operator.kyma-project.io/owned-by": "kcp-system/kyma-sample"
data:
  config: Y29uZmln
  cfg: Y2Zn
ukff commented 1 year ago

proposed solution will not work for existing secrets, it would require KEB to update all existing btp-manager secrets on all clusters by adding annotations, and we would prefer not to do that.

kyma-bot commented 1 year ago

This issue or PR has been automatically marked as stale due to the lack of recent activity. Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

You can:

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

kyma-bot commented 1 year ago

This issue or PR has been automatically marked as stale due to the lack of recent activity. Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

You can:

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

kyma-bot commented 1 year ago

This issue or PR has been automatically closed due to the lack of activity. Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

You can:

If you think that I work incorrectly, kindly raise an issue with the problem.

/close

kyma-bot commented 1 year ago

@kyma-bot: Closing this issue.

In response to [this](https://github.com/kyma-project/runtime-watcher/issues/100#issuecomment-1722229094): >This issue or PR has been automatically closed due to the lack of activity. >Thank you for your contributions. > >This bot triages issues and PRs according to the following rules: >- After 60d of inactivity, `lifecycle/stale` is applied >- After 7d of inactivity since `lifecycle/stale` was applied, the issue is closed > >You can: >- Reopen this issue or PR with `/reopen` >- Mark this issue or PR as fresh with `/remove-lifecycle stale` > >If you think that I work incorrectly, kindly [raise an issue](https://github.com/kyma-project/test-infra/issues/new/choose) with the problem. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.