Skip to content

Fix env var conflict issues with fake-gcs-server#1298

Open
anveshreddy18 wants to merge 1 commit intogardener:masterfrom
anveshreddy18:emulators/fix-fakegcs-env-var
Open

Fix env var conflict issues with fake-gcs-server#1298
anveshreddy18 wants to merge 1 commit intogardener:masterfrom
anveshreddy18:emulators/fix-fakegcs-env-var

Conversation

@anveshreddy18
Copy link
Member

@anveshreddy18 anveshreddy18 commented Feb 25, 2026

How to categorize this PR?

/area usability
/kind bug

What this PR does / why we need it:

This PR changes the fake-gcs service name to fake-gcs-service to avoid conflicts with k8s injected env var FAKE_GCS_PORT that sets it to tcp://PodIP:4443 as it constructs this env var from the service name, The specific FAKE_GCS_PORT is important as the fsouza/fake-gcs-server refers to this env variable which resulted in the following error in the container:

2026/02/25 06:32:48 invalid value for environment variable FAKE_GCS_PORT="tcp://10.96.89.231:4443": strconv.ParseUint: parsing "tcp://10.96.89.231:4443": invalid syntax
stream closed EOF for default/fake-gcs-7d96b5f4b5-wb2d6 (fake-gcs-server)

Changing the service name to fake-gcs-service fixes this as it no longer conflicts with the k8s ways of adding env vars for endpoints.

Which issue(s) this PR fixes:
Fixes #

Checklist:

  • Update documentation in the /docs folder (if applicable)
  • Add tests that cover your changes (if applicable)
    • Unit tests
    • Integration tests
    • E2E tests

Special notes for your reviewer:

Release note:

fix env var conflict issues with fake-gcs-server container setup.

@anveshreddy18 anveshreddy18 requested a review from a team as a code owner February 25, 2026 10:21
@gardener-prow gardener-prow bot added area/usability Usability related kind/bug Bug size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 25, 2026
@anveshreddy18 anveshreddy18 self-assigned this Feb 25, 2026
@federated-github-access federated-github-access bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 25, 2026
@gardener-prow gardener-prow bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Feb 25, 2026
@anveshreddy18 anveshreddy18 added this to the v0.36.0 milestone Feb 25, 2026
@github-actions github-actions bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. and removed ok-to-test Indicates a non-member PR verified by an org member that is safe to test. labels Feb 25, 2026
Copy link
Member

@CaptainIRS CaptainIRS left a comment

Choose a reason for hiding this comment

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

Could we instead just set enableServiceLinks to false in the fake-gcs deployment's pod spec since this is just a fsouza/fake-gcs-server-specific thing? I believe that one change should be sufficient to get this to work.

@anveshreddy18
Copy link
Member Author

Thanks @CaptainIRS for the review, I did that originally and it worked, there is another way of explicitly setting FAKE_GCS_PORT to 4443 as well which also solves the problem, I tried both but they are essentially bandages to the root cause, and such issues can occur again if we don't solve the actual root of the issue which is the conflicting env var stemming from service name, so I instead chose to do that so we can solve it once and for all.

Copy link
Member

@CaptainIRS CaptainIRS left a comment

Choose a reason for hiding this comment

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

Sounds good, thanks for the explanation!

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

gardener-prow bot commented Feb 25, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: CaptainIRS
Once this PR has been reviewed and has the lgtm label, please assign shreyas-s-rao for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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
Copy link

gardener-prow bot commented Feb 25, 2026

LGTM label has been added.

DetailsGit tree hash: 2f361d08babf87ffc13580be93575e7d8e1656f8

@federated-github-access federated-github-access bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 25, 2026
@github-actions github-actions bot removed the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Feb 25, 2026
@CaptainIRS CaptainIRS assigned CaptainIRS and unassigned CaptainIRS Feb 26, 2026
@anveshreddy18 anveshreddy18 force-pushed the emulators/fix-fakegcs-env-var branch from eb14e24 to 918df3f Compare March 3, 2026 06:56
@gardener-prow gardener-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 3, 2026
@anveshreddy18
Copy link
Member Author

@ishan16696 can you take a look at this PR for approval ? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/usability Usability related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/bug Bug needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants