OCPBUGS-70354: add serviceAccount to global-pull-secret-syncer#7439
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughReconcile now creates/updates a ServiceAccount for the GlobalPullSecret before syncing the DaemonSet; the DaemonSet PodSpec sets the ServiceAccountName. An e2e test change allows partial node presence for the OpenshiftOVNKubeDaemonSet readiness check. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
@ehearne-redhat: This pull request references Jira Issue OCPBUGS-70354, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. 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. |
|
/jira refresh |
|
@ehearne-redhat: This pull request references Jira Issue OCPBUGS-70354, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (yli2@redhat.com), skipping review request. 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. |
72691f1 to
f18dcd4
Compare
|
/retest |
1 similar comment
|
/retest |
f18dcd4 to
d769440
Compare
c4cee48 to
a661ff1
Compare
|
/retest |
a661ff1 to
684e4b1
Compare
|
/test verify-deps |
|
/test all |
|
/retest |
|
/test e2e-aks |
5da5668 to
7ac24b9
Compare
|
/test e2e-aks |
|
/retest |
|
/test e2e-aws |
|
/retest |
|
/test e2e-aws |
1 similar comment
|
/test e2e-aws |
This fix adds a service account to global-pull-secret-syncer pod so it does not use default service account.
Add comprehensive unit test coverage for reconcileGlobalPullSecret() function with test cases covering: - Secret creation and merging when additional pull secret exists - Error handling for missing secrets and invalid JSON - InPlace NodePool handling - DaemonSet and ServiceAccount creation and configuration Set AllowPartialNodes to true for OVN daemonset in E2E validation to fix test failures when checking for ready daemonsets.
7ac24b9 to
95dcbb0
Compare
|
/test e2e-aks |
|
/test e2e-v2-aws |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, ehearne-redhat 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 |
|
---
apiVersion: v1
kind: Pod
metadata:
...
name: global-pull-secret-syncer-n84zk
namespace: kube-system
...
serviceAccount: global-pull-secret-syncer
serviceAccountName: global-pull-secret-syncer
...
...
phase: Running
.../verified by ehearne-redhat |
|
@ehearne-redhat: This PR has been marked as verified by 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. |
everettraven
left a comment
There was a problem hiding this comment.
Aside from a minor comment on test structure, this LGTM.
If the HyperShift folks are happy with this PR, ship it :).
| expectGlobalSecretExists bool | ||
| expectOriginalSecretExists bool | ||
| expectDaemonSetExists bool | ||
| expectServiceAccountExists bool | ||
| expectError bool | ||
| validateDaemonSet func(*testing.T, *appsv1.DaemonSet) | ||
| validateGlobalSecret func(*testing.T, *corev1.Secret) | ||
| validateOriginalSecret func(*testing.T, *corev1.Secret) | ||
| validateServiceAccount func(*testing.T, *corev1.ServiceAccount) |
There was a problem hiding this comment.
I generally find that using the validate* pattern makes table-driven tests much harder to read because each test may end up with slightly different ways to validate something which is more logic overhead to have to follow when trying to understand if there are any testing gaps.
I prefer taking a more declarative approach where expect* and validate* fields here (aside from maybe expectError) becomes something like:
expectedDaemonSet *appsv1.DaemonSet
// and so on ...|
Not blocking this PR on test changes and HCP folks seem happy with the changes. Code changes LGTM. /lgtm |
|
Scheduling tests matching the |
|
/retest |
|
@ehearne-redhat: 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. |
|
/retest |
|
@ehearne-redhat: Jira Issue Verification Checks: Jira Issue OCPBUGS-70354 Jira Issue OCPBUGS-70354 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes https://issues.redhat.com/browse/OCPBUGS-70354 .
Special notes for your reviewer:
Checklist: