Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1796970: Replaced env with envFrom #4682

Merged
merged 1 commit into from
Mar 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const AttachDeploymentToOBCModal = withHandlePromise((props: AttachDeploymentToO
[],
);
const patches = containers.reduce((patch, container, i) => {
if (_.isEmpty(container.env)) {
if (_.isEmpty(container.envFrom)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Line 82
path: /spec/template/spec/containers/${i}/envFrom/- => path: /spec/template/spec/containers/${i}/envFrom
Line 77
value: [configMapRef], => value: configMapRef
WDYT @afreen23 @gnehapk ?

Copy link
Contributor

Choose a reason for hiding this comment

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

The reason for this check is if envForm is present then we should add it to the existing array of secrets otherwise create a new array.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I know that I wrote it. I am talking about lines 82 and 77. Where we are having that extra -. Please read the whole comment @afreen23

Copy link
Contributor

Choose a reason for hiding this comment

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

my bad /lgtm

patch.push({
op: 'add',
path: `/spec/template/spec/containers/${i}/envFrom`,
Expand Down