Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Deprecate Env and add Environment field to lrp and task #19

Merged
merged 2 commits into from
May 18, 2022

Conversation

kieron-dev
Copy link
Contributor

Env is a map[string]string which is translated to a slice of corev1.EnvVar with values set literally on the statefulset or job.
This potentially exposes secrets, so a better approach is to simply accept a slice of corev1.EnvVar on the LRP or Task resource.

This PR does that on LRP and Task in a new field called Environment (environment in the JSON). The Env field is marked as deprecated.

Kieron Browne added 2 commits May 13, 2022 16:24
This is a slice of `corev1.EnvVar`s so people can set env vars however
k8s supports it. In particular, the secret key ref is supported so that
secret values need not be exposed in the spec.

This also deprecates the LRP `Env` field. `Environment` supports the
plain text env vars that `Env` allows so `Env` can eventually be
removed.

Issue: cloudfoundry/korifi#917
This reproduces the LRP change on the task resource. It deprecates the
`env` field, replacing it with the full functionality enabled by using a
slice of corev1.EnvVars

Issue: cloudfoundry/korifi#917
@danail-branekov danail-branekov merged commit 9112d06 into master May 18, 2022
@danail-branekov danail-branekov deleted the issues/917-corev1-envvars branch May 18, 2022 14:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants