Skip to content

feat: toggle service links in deployments#187

Merged
Tom Bojer (tombojer) merged 1 commit intomainfrom
toggle-service-links
Apr 7, 2026
Merged

feat: toggle service links in deployments#187
Tom Bojer (tombojer) merged 1 commit intomainfrom
toggle-service-links

Conversation

@tombojer
Copy link
Copy Markdown
Contributor

This pull request adds support for configuring the enableServiceLinks field in container specifications throughout the codebase. This allows users to control whether Kubernetes injects service environment variables into containers. The changes ensure that this field is properly handled in the API, merged correctly, propagated to all relevant Kubernetes workload specs, and thoroughly tested.

API and Spec Updates:

  • Added an optional EnableServiceLinks field to ContainerSpec and ContainerMergeSpec, with appropriate defaulting and deepcopy logic for safe copying. [1] [2] [3] [4]

Merging Logic:

  • Updated the Merge method for ContainerSpec to correctly merge the EnableServiceLinks field from ContainerMergeSpec.

Propagation to Workloads:

  • Updated all workload constructors (AdminDeployment, StorefrontDeployment, WorkerDeployment, ScheduledTaskJob, SetupJob, MigrationJob, snapshotJob, getJobSpec, DebugPod) to set EnableServiceLinks from the container spec. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Testing:

  • Added and updated tests to verify correct merging and propagation of EnableServiceLinks in container specs and workload generation. [1] [2] [3]

Helper Functions:

  • Introduced a boolPtr helper in test files to simplify pointer creation for boolean fields. [1] [2] [3]

@tombojer Tom Bojer (tombojer) merged commit aa2bdfc into main Apr 7, 2026
4 checks passed
@tombojer Tom Bojer (tombojer) deleted the toggle-service-links branch April 7, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants