Skip to content

Conversation

pooknull
Copy link
Contributor

@pooknull pooknull commented Sep 26, 2025

K8SPS-550 Powered by Pull Request Badge

https://perconadev.atlassian.net/browse/K8SPS-550

DESCRIPTION

Problem:
serviceAccountName is not applied to the HAProxy statefulset.

Solution:
This is a common bug where some fields from the PodSpec are not applied to statefulsets. To fix this, the (s *PodSpec) Core method was created to return a corev1.PodSpec with all fields populated.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PS version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added the size/L 100-499 lines label Sep 26, 2025
@hors hors added this to the v1.0.0 milestone Sep 26, 2025
egegunes
egegunes previously approved these changes Sep 30, 2025
@pooknull pooknull marked this pull request as ready for review September 30, 2025 10:02
@pooknull pooknull requested a review from egegunes September 30, 2025 10:17
Comment on lines 119 to 120
var e string
assert.Equal(t, e, sts.Spec.Template.Spec.ServiceAccountName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we can do assert.Empty(t, sts.Spec.Template.Spec.ServiceAccountName) instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines 125 to 126
var e string
assert.Equal(t, e, sts.Spec.Template.Spec.ServiceAccountName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Here we can do assert.Empty(t, sts.Spec.Template.Spec.ServiceAccountName) instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Copilot Copilot AI review requested due to automatic review settings October 1, 2025 17:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 14:49
@pooknull pooknull requested a review from gkech October 3, 2025 14:49
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JNKPercona
Copy link
Collaborator

Test Name Result Time
version-service-8-4 passed 00:00:00
async-ignore-annotations-8-4 passed 00:00:00
async-global-metadata-8-4 passed 00:00:00
auto-config-8-4 passed 00:00:00
config-8-4 passed 00:00:00
config-router-8-0 passed 00:00:00
config-router-8-4 passed 00:00:00
demand-backup-minio-8-0 passed 00:00:00
demand-backup-minio-8-4 passed 00:00:00
demand-backup-cloud-8-4 passed 00:00:00
async-data-at-rest-encryption-8-0 passed 00:00:00
async-data-at-rest-encryption-8-4 passed 00:00:00
gr-global-metadata-8-4 passed 00:00:00
gr-data-at-rest-encryption-8-0 passed 00:00:00
gr-data-at-rest-encryption-8-4 passed 00:00:00
gr-demand-backup-minio-8-4 passed 00:00:00
gr-demand-backup-cloud-8-4 passed 00:00:00
gr-demand-backup-haproxy-8-4 passed 00:00:00
gr-finalizer-8-4 passed 00:00:00
gr-haproxy-8-0 passed 00:00:00
gr-haproxy-8-4 passed 00:00:00
gr-ignore-annotations-8-4 passed 00:00:00
gr-init-deploy-8-0 passed 00:00:00
gr-init-deploy-8-4 passed 00:00:00
gr-one-pod-8-4 passed 00:00:00
gr-recreate-8-4 passed 00:00:00
gr-scaling-8-4 passed 00:00:00
gr-scheduled-backup-8-4 passed 00:00:00
gr-security-context-8-4 passed 00:00:00
gr-self-healing-8-4 passed 00:00:00
gr-tls-cert-manager-8-4 passed 00:00:00
gr-users-8-4 passed 00:00:00
haproxy-8-0 passed 00:00:00
haproxy-8-4 passed 00:00:00
init-deploy-8-0 passed 00:00:00
init-deploy-8-4 passed 00:00:00
limits-8-4 passed 00:00:00
monitoring-8-4 passed 00:00:00
one-pod-8-0 passed 00:00:00
one-pod-8-4 passed 00:00:00
operator-self-healing-8-4 passed 00:00:00
pvc-resize-8-4 passed 00:00:00
recreate-8-4 passed 00:00:00
scaling-8-4 passed 00:00:00
scheduled-backup-8-0 passed 00:00:00
scheduled-backup-8-4 passed 00:18:38
service-per-pod-8-4 passed 00:00:00
sidecars-8-4 passed 00:00:00
smart-update-8-4 passed 00:00:00
storage-8-4 passed 00:00:00
telemetry-8-4 passed 00:00:00
tls-cert-manager-8-4 passed 00:00:00
users-8-0 passed 00:00:00
users-8-4 passed 00:00:00
Summary Value
Tests Run 54/54
Job Duration 01:02:52
Total Test Time 00:18:38

commit: 8877131
image: perconalab/percona-server-mysql-operator:PR-1098-88771311

@hors hors merged commit cb4b8e8 into main Oct 6, 2025
10 of 12 checks passed
@hors hors deleted the K8SPS-550 branch October 6, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L 100-499 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants