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

Configurable HAP Shared Secrets Plans and Regions #1609

Closed
wants to merge 11 commits into from

Conversation

ralikio
Copy link
Member

@ralikio ralikio commented Jan 6, 2025

Description

The following PR implements #1520 feature request. It introduces two configuration lists that allows for specifying which plans or platform regions should be provisioned with shared gardener secrets.

Changes proposed in this pull request:

  • structures for "whitelisting" plans and regions that should be provisioned with shared secrets,
  • default configuration values,
  • usage of above in resolve credentials step,
  • docs update.

@ralikio ralikio added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 6, 2025
@ralikio ralikio requested review from a team as code owners January 6, 2025 21:04
@kyma-bot kyma-bot added area/documentation Issues or PRs related to documentation cla: yes Indicates the PR's author has signed the CLA. labels Jan 6, 2025
@kyma-gopher-bot kyma-gopher-bot enabled auto-merge (squash) January 6, 2025 21:04
Copy link

github-actions bot commented Jan 6, 2025

Add one of following labels

- kind/feature -> Use it when you want to submit a new feature

- kind/enhancement -> Use it when you modify or improve an existing feature

- kind/bug -> Use it when you fix a bug

@kyma-bot kyma-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 6, 2025
@ralikio ralikio self-assigned this Jan 6, 2025
@PK85
Copy link

PK85 commented Jan 7, 2025

see: https://sap-btp.slack.com/archives/G01L562297B/p1736235785889099

Corrected property format to allow wildcards and restrictive plan:region pairs.
@ralikio ralikio added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 7, 2025
Corrected property format to allow wildcards and restrictive plan:region pairs.
@PK85
Copy link

PK85 commented Jan 7, 2025

I did a code review, and decided to left more high level review, please see: #1520 (comment)

We will talk about that tomorrow

sort.Strings(keys)

output := ""
for _, item := range keys {
Copy link
Contributor

@jaroslaw-pieszka jaroslaw-pieszka Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why strings.Join is not appropriate?
Do we need the separator at the end?

"strings"
)

type Whitelist map[string]struct{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We define some date structure (even kind of ADT) but we use the name not related to its behavior. There is nothing about whitelisting, just set of strings with contains operation.

<!-- selection algorithm -->
When selecting a Secret for a given hyperscaler, KEB evaluates a set of rules to determine what secret bindings it should query for a given plan and region that SKR is provisioned in. The search looks for a secret bindings with `hyperscaler-type` label only (always used in the search) or additionally with one of or both `euAccess: true` and `shared: true` labels.

`hyperscaler-type` label is the one that does contain region information in the format `hyperscaler_type: <HYPERSCALER_NAME>[_<PLATFORM_REGION>][_<CLUSTER_REGION>]`, where both `_<PLATFORM_REGION>` and `_<CLUSTER_REGION>` are optional.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we stick to hyperscaler region (HYPERSCALER_REGION accordingly) as in #1520

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want something shorter. HAP_REGION?

Copy link
Member Author

@ralikio ralikio Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLUSTER_REGION is a known name in the documentation used in https://github.com/kyma-project/kyma-environment-broker/blob/main/docs/user/05-10-provisioning-kyma-environment.md#steps, https://github.com/kyma-project/kyma-environment-broker/blob/main/docs/user/05-70-manage-kyma-environment-through-cis-provisioning-service.md#steps. I want to hear our the teams' opinion which naming to use. I was familiar with CLUSTER_REGION and PLATFORM_REGIONS abstractions.

@ralikio
Copy link
Member Author

ralikio commented Jan 16, 2025

POC. I am dividing the PR into smaller chunks.

@ralikio ralikio closed this Jan 16, 2025
auto-merge was automatically disabled January 16, 2025 15:41

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Issues or PRs related to documentation cla: yes Indicates the PR's author has signed the CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants