NO-JIRA: update preflight pod manifest#2350
Conversation
to facilitate static pods, this is a spin-off from openshift#2345. Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
|
@tjungblu: This pull request explicitly references no jira issue. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Caution Review failedAn error occurred during the review process. Please try again later. WalkthroughThe KMS preflight pod generation now supports a static pod mode via a new ChangesKMS Preflight Static Pod Support
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Deployer
participant generatePodTemplate
participant generateStaticPodTemplate
participant renderPreflightPodTemplate
participant renderPodTemplate
Deployer->>generatePodTemplate: operatorImage, operatorCommand, kmsCallTimeout
generatePodTemplate->>renderPreflightPodTemplate: staticPod=false
renderPreflightPodTemplate->>renderPodTemplate: parse/execute template, build Pod
Deployer->>generateStaticPodTemplate: operatorImage, operatorCommand, kmsCallTimeout
generateStaticPodTemplate->>renderPreflightPodTemplate: staticPod=true
renderPreflightPodTemplate->>renderPodTemplate: parse/execute template, build Pod
Related Issues: None provided. Related PRs: None provided. Suggested labels: None provided. Suggested reviewers: None provided. Poem: ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Comment |
| {{- if not .StaticPod}} | ||
| serviceAccountName: kms-preflight | ||
| {{- end}} |
There was a problem hiding this comment.
not possible to use a service account anymore due to:
https://github.com/kubernetes/kubernetes/blob/cbe5e3096ec29950198ed0b77ed9c611f3183c14/pkg/kubelet/config/common.go#L151-L159
| return renderPodTemplate("kms-preflight", string(rawManifest), tmplVal) | ||
| } | ||
|
|
||
| func renderPodTemplate(name, rawManifest string, tmplVal any) (*corev1.Pod, error) { |
There was a problem hiding this comment.
just fyi, this is going to be reused for the installer pod, before you ask why there are three different functions now doing the same
|
@tjungblu: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: p0lyn0mial, tjungblu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
to facilitate static pods, this is a spin-off from #2345.
Summary by CodeRabbit
New Features
Bug Fixes