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

update generated artifacts for k8s and openshift so that env variables are loaded in a particular order #596

Merged
merged 1 commit into from
Jun 17, 2017

Conversation

procrypt
Copy link
Contributor

Fixes: #595
cc: @surajssd

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 10, 2017
@cdrage
Copy link
Member

cdrage commented May 10, 2017

Although this sucks in terms of order, having ${FOOBAR} would be against what's promised in the spec file :( https://docs.docker.com/compose/compose-file/#args having $FOOBAR would help in terms of testing to make sure environment variables work.

@surajnarwade
Copy link
Contributor

@cdrage , I didn't get what you said

@procrypt procrypt force-pushed the envs branch 2 times, most recently from df33f4e to 6e0085b Compare May 10, 2017 18:25
@cdrage
Copy link
Member

cdrage commented May 10, 2017

@surajnarwade

@procrypt Changed the variables to ${FOOBAR} from $FOOBAR. They should stay $FOOBAR

@surajssd
Copy link
Member

@procrypt yes that should not make any difference, keeping it without brackets { or } should be okay.

Copy link
Member

@surajssd surajssd left a comment

Choose a reason for hiding this comment

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

@procrypt
Copy link
Contributor Author

@surajssd Updated.

"name": "DB_DBID",
"value": "openshift"
"name": "DB_HOST",
"value": "kubernetes"
Copy link
Member

Choose a reason for hiding this comment

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

The value should remain the same right? I mean the value should still be openshift right?

@@ -255,19 +275,35 @@
],
"env": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "kubernetes"
Copy link
Member

Choose a reason for hiding this comment

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

Is this config correct? Because same env is created twice? Will this run on a k8s cluster?

Seems like something libcompose is not handling?

MYSQL_DATABASE: $DB_NAME
MYSQL_PASSWORD: $DB_PASS
MYSQL_USER: $DB_USER
- "MYSQL_ROOT_PASSWORD=$ROOT_PASS"
Copy link
Member

Choose a reason for hiding this comment

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

You're still changing these values!

Leave them be please, no quotes, no editing them. They should stay the same as before.

@@ -5,5 +5,5 @@ services:
image: "foobar"
restart: "no"
environment:
GITHUB: surajssd
- "GITHUB=surajssd"
Copy link
Member

Choose a reason for hiding this comment

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

Again.. quotes everywhere. Leave them the same as before.

@procrypt
Copy link
Contributor Author

Ping @surajssd @cdrage @surajnarwade need review.

@kadel
Copy link
Member

kadel commented May 23, 2017

This means that we are no longer testing doceker-compose files with evn variables in map?

@cdrage
Copy link
Member

cdrage commented May 23, 2017

Tests are failing :( Isn't this PR only re-organizing the env variables in the tests? I don't believe it's removing them? @kadel

@kadel
Copy link
Member

kadel commented May 24, 2017

If I'm looking correctly this PR changes env vars. in all docker-compose files from map to array no?

@procrypt
Copy link
Contributor Author

@kadel Yes.

@procrypt procrypt force-pushed the envs branch 2 times, most recently from 3f7c8ca to da1723b Compare May 29, 2017 06:27
@procrypt
Copy link
Contributor Author

@kadel Some file 1 and 2 has not been changed.

@procrypt procrypt changed the title update docker compose file to load env variables in a particular order. update docker compose file to load env variables in a particular order Jun 7, 2017
@procrypt
Copy link
Contributor Author

ping @cdrage @surajssd updated PR

@cdrage
Copy link
Member

cdrage commented Jun 12, 2017

LGTM

kadel
kadel previously approved these changes Jun 13, 2017
- RACK_ENV=development
- SHOW=true
- SESSION_SECRET
GET_HOSTS_FROM: dns
Copy link
Member

Choose a reason for hiding this comment

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

why is this changed from list to map?

@procrypt
Copy link
Contributor Author

@kadel I might have dome it by mistake, updated the PR.

@surajssd
Copy link
Member

@procrypt this change is done on basis of what code now? Also how is this sorting being done? Also if this sorting is done on basis of env's name then I see bunch of them not sorted!

screenshot from 2017-06-14 12-20-53

See the screenshot above, like DB_HOST is before DB_DBID which wrong sorting!

@procrypt
Copy link
Contributor Author

@surajssd I'm checking it.

@procrypt
Copy link
Contributor Author

@surajssd once #631 gets merged this issue will be solved. I have updated #631 and it already have 2 LGTM can you PTAL and merge it soon.

@procrypt
Copy link
Contributor Author

@surajssd Ping

@surajssd
Copy link
Member

@procrypt please rebase on current master, lot of new changes have been added since morning, and also update the commit message since we are just updating the fixtures/configs and not changing the docker-compose!

For me lot of tests fail, not sure why!

@procrypt
Copy link
Contributor Author

@surajssd rebased

@surajssd
Copy link
Member

@procrypt tests pass for me, please update the commit message since we are not changing docker-compose file?

@procrypt procrypt changed the title update docker compose file to load env variables in a particular order update generated artifacts for k8s and openshift so that env variables are loaded in a particular order Jun 15, 2017
@procrypt
Copy link
Contributor Author

@surajssd Done.

@procrypt procrypt force-pushed the envs branch 2 times, most recently from 9c5c82d to d4886a5 Compare June 15, 2017 09:38
@surajssd
Copy link
Member

@procrypt but seems like it needs rebase now

update created artifacts for kubernetes and openshift so that env variables are populated in a particular order
@procrypt
Copy link
Contributor Author

@surajssd Rebased.

@surajnarwade
Copy link
Contributor

LGTM :)

@surajssd surajssd merged commit 1c4fe84 into kubernetes:master Jun 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants