cdk8s-team / cdk8s-plus

A software development framework that provides high level abstractions for authoring Kubernetes applications.
https://cdk8s.io/docs/latest/plus/
Apache License 2.0
133 stars 33 forks source link

Support `enableServiceLinks` in Pod Specs. #3873

Open HamishWHC opened 6 months ago

HamishWHC commented 6 months ago

Description of the feature or enhancement:

Pods and workloads that define pods (e.g. Deployments, StatefulSets, etc) should have the enableServiceLinks property that defines whether the pod has service discovery environment variables defined.

Use Case:

I need to be able to disable this option across many workloads, and would prefer to have a better way than applying JSON patches.

Proposed Solution:

Addition of enableServiceLinks: boolean to AbstractPodProps. I haven't played with the CDK8s-plus internels yet so there may also be runtime manipulation needed.

Other:

Documentation: https://kubernetes.io/docs/tutorials/services/connect-applications-service/#accessing-the-service

Pod Spec Reference: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#pod-v1-core


This is a :rocket: Feature Request

iliapolo commented 3 months ago

@HamishWHC This is a good first issue for contribution, if you feel up for it :)