kubernetes-retired / cluster-api-provider-nested

Cluster API Provider for Nested Clusters
Apache License 2.0
301 stars 67 forks source link

⚠️ syncer: clean opaqued keys before construct super cluster object #219

Closed zhuangqh closed 3 years ago

zhuangqh commented 3 years ago

Signed-off-by: zhuangqh zhuangqhc@gmail.com

What this PR does / why we need it:

prevent tenant from using super cluster annotation/labels

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #

Fei-Guo commented 3 years ago

Most of the code changes are refactoring changes. The added logic makes sense for preventing tenant from abusing certain keys maintained by the super cluster.

/lgtm /approve

k8s-ci-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Fei-Guo, zhuangqh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[virtualcluster/OWNERS](https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/main/virtualcluster/OWNERS)~~ [Fei-Guo,zhuangqh] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment