Skip to content

Conversation

cccfs
Copy link

@cccfs cccfs commented Jun 30, 2025

CHANGE DESCRIPTION

Problem:
My log-agent generates index configuration by scanning container env and ultimately collects container logs for remote storage, so it needs to support custom pod env configuration

Solution:
Ensure that replica sets and shard mongos support containers env configuration

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?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

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 MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

@hors hors added the community label Jul 1, 2025
@egegunes egegunes added this to the v1.21.0 milestone Jul 28, 2025
@egegunes
Copy link
Contributor

@cccfs implementation LGTM, please add a case for this new field into TestReconcileStatefulSet in pkg/controller/perconaservermongodb/statefulset_test.go

Comment on lines +231 to +233
for _, env := range cr.Spec.Sharding.Mongos.ContainerEnv {
container.Env = append(container.Env, env)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We can simplify this by using golang's unfurl feature

container.Env = append(container.Env, cr.Spec.Sharding.Mongos.ContainerEnv...)

Copy link
Contributor

Choose a reason for hiding this comment

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

we can do the same for all the related diff changes

@gkech
Copy link
Contributor

gkech commented Aug 20, 2025

hello @cccfs , any updates on the comments shared in this PR?

@egegunes egegunes modified the milestones: v1.21.0, v1.22.0 Sep 22, 2025
@egegunes
Copy link
Contributor

@hors @gkech we should take this over, I changed the milestone to v1.22.0

@JNKPercona
Copy link
Collaborator

Test name Status
arbiter passed
balancer passed
cross-site-sharded passed
custom-replset-name passed
custom-tls passed
custom-users-roles passed
custom-users-roles-sharded passed
data-at-rest-encryption passed
data-sharded passed
demand-backup passed
demand-backup-eks-credentials-irsa passed
demand-backup-fs passed
demand-backup-incremental passed
demand-backup-incremental-sharded failure
demand-backup-physical-parallel passed
demand-backup-physical-aws passed
demand-backup-physical-azure passed
demand-backup-physical-gcp passed
demand-backup-physical-minio passed
demand-backup-physical-sharded-parallel passed
demand-backup-physical-sharded-aws passed
demand-backup-physical-sharded-azure passed
demand-backup-physical-sharded-gcp passed
demand-backup-physical-sharded-minio passed
demand-backup-sharded passed
expose-sharded passed
finalizer passed
ignore-labels-annotations passed
init-deploy passed
ldap passed
ldap-tls passed
limits passed
liveness passed
mongod-major-upgrade passed
mongod-major-upgrade-sharded passed
monitoring-2-0 passed
monitoring-pmm3 failure
multi-cluster-service passed
multi-storage passed
non-voting-and-hidden passed
one-pod passed
operator-self-healing-chaos passed
pitr failure
pitr-physical passed
pitr-sharded passed
pitr-physical-backup-source failure
preinit-updates passed
pvc-resize passed
recover-no-primary passed
replset-overrides passed
rs-shard-migration passed
scaling failure
scheduled-backup passed
security-context passed
self-healing-chaos passed
service-per-pod passed
serviceless-external-nodes passed
smart-update passed
split-horizon passed
stable-resource-version passed
storage passed
tls-issue-cert-manager passed
upgrade passed
upgrade-consistency passed
upgrade-consistency-sharded-tls failure
upgrade-sharded passed
users passed
version-service passed
We run 68 out of 68

commit: d120637
image: perconalab/percona-server-mongodb-operator:PR-1987-d120637a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants