From 4a6ec3c1cd5b95653e5e65fc4d99852bcd9baa5b Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Wed, 14 Dec 2016 12:45:13 -0500 Subject: WIP: Service Injection Policy --- .../design-proposals/service_injection_policy.md | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 contributors/design-proposals/service_injection_policy.md diff --git a/contributors/design-proposals/service_injection_policy.md b/contributors/design-proposals/service_injection_policy.md new file mode 100644 index 00000000..3b2bbed8 --- /dev/null +++ b/contributors/design-proposals/service_injection_policy.md @@ -0,0 +1,65 @@ +# Service Injection Policy + +## Abstract + +Describes a policy resource that allows loose coupling from services to the pods +that consume them. + +## Motivation + +Consuming a service involves more than just connectivity. In addition to +coordinates to reach the service, credentials and non-secret configuration +parameters are typically needed to use the service. The primitives for this +already exist, but a gap exists where loose coupling is desired: it should be +possible to inject pods with the information they need to use a service on a +service-by-service basis, without the pod authors having to incorporate the +information into every pod spec where it is needed. + +## Constraints and Assumptions + +1. New mechanisms must be made to work with controllers such as deployments and + replicasets that create pods + +## Use Cases + +1. As a user, I want to be able to describe a way that pods should be injected + with the information to consume a particular service in a loosely-coupled + way, so that I can concisely model the information about how the service + should be consumed without altering every consuming pod spec + + + +### Loose coupling between services and their consumers + + + +## Proposed Changes + +### ServiceInjectionPolicy API object + +```go +type ServiceInjectionPolicy struct { + unversioned.TypeMeta + ObjectMeta + + Spec ServiceInjectionPolicySpec +} + +type ServiceInjectionPolicySpec struct { + LabelSelector *unversioned.LabelSelector + Env []EnvVar + EnvFrom []EnvVarFrom + Volumes []Volume + VolumeMounts []VolumeMount +} +``` + +## Examples + +```yaml + +``` \ No newline at end of file -- cgit v1.2.3