Skip to content

Conversation

rfranzke
Copy link
Member

How to categorize this PR?

/area ipcei
/kind enhancement

What this PR does / why we need it:
This PR adds a starting point for the static pod translator that we used in the PoC work when playing with autonomous shoot clusters. For now, it only supports Deployments, but perhaps we have to augment it with support for StatefulSets as well (depending on how ETCD will be managed, still under discussion).

Which issue(s) this PR fixes:
Part of #2906

Special notes for your reviewer:
/cc @ScheererJ

Release note:

NONE

@gardener-prow gardener-prow bot requested a review from ScheererJ February 11, 2025 14:53
@gardener-prow gardener-prow bot added area/ipcei IPCEI (Important Project of Common European Interest) kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 11, 2025
@rfranzke rfranzke force-pushed the gep28/static-pod-translator branch from e4f015b to 3fa2fb8 Compare February 11, 2025 14:55
@ScheererJ
Copy link
Member

/assign

@rfranzke rfranzke force-pushed the gep28/static-pod-translator branch from 3fa2fb8 to 8eb0835 Compare February 11, 2025 16:08
Copy link
Member

@ScheererJ ScheererJ left a comment

Choose a reason for hiding this comment

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

Thanks a lot for implementing this useful tool for autonomous clusters.

I have some concerns regarding the default access mode of secrets, though.

func translateVolumes(ctx context.Context, c client.Client, pod *corev1.Pod) ([]extensionsv1alpha1.File, error) {
var (
files []extensionsv1alpha1.File
addFileWithHostPath = func(hostPath, fileName, content string, permissions *int32, desiredItems []corev1.KeyToPath) {
Copy link
Member

Choose a reason for hiding this comment

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

Why not use an ordinary function instead of specifying it here in line? There is no variance. Hence, a static function call could be sufficient.

Copy link
Member Author

Choose a reason for hiding this comment

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

This adds directly to the files list if certain conditions are met. Making this a "regular" function outside would result in more complexity IMO. While I'm generally a fan of "regular" functions when applicable, I think here it's a benefit to define it this way.

@rfranzke
Copy link
Member Author

/cc @timebertt

@gardener-prow gardener-prow bot requested a review from timebertt February 12, 2025 08:21
@rfranzke rfranzke force-pushed the gep28/static-pod-translator branch from 8eb0835 to 0de8ecd Compare February 12, 2025 15:06
@gardener-prow gardener-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 12, 2025
Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

Very nice PR!

Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my suggestions :)

@rfranzke rfranzke force-pushed the gep28/static-pod-translator branch from c6ac4f5 to a2794d2 Compare February 13, 2025 11:43
@rfranzke rfranzke requested a review from timebertt February 13, 2025 11:43
Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

Looks great!

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2025
Copy link
Contributor

gardener-prow bot commented Feb 13, 2025

LGTM label has been added.

Git tree hash: 1b5191ea6c0110fc9a440be9b0a2c6b1a7cd0279

Copy link
Contributor

gardener-prow bot commented Feb 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: timebertt

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 13, 2025
@timebertt
Copy link
Member

/retest

Copy link
Contributor

gardener-prow bot commented Feb 13, 2025

@rfranzke: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gardener-apidiff a2794d2 link false /test pull-gardener-apidiff

Full PR test history. Your PR dashboard. Command help for this repository.
Please help us cut down on flakes by linking this test failure to an open flake report or filing a new flake report if you can't find an existing one. Also see our testing guideline for how to avoid and hunt flakes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@gardener-prow gardener-prow bot merged commit 778012a into gardener:master Feb 13, 2025
18 of 19 checks passed
@rfranzke rfranzke deleted the gep28/static-pod-translator branch February 13, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/ipcei IPCEI (Important Project of Common European Interest) cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. 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.

3 participants