Skip to content

Commit

Permalink
Merge branch 'hotfix-0.1.2' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandGouny committed Oct 23, 2015
2 parents c6782ce + 3dc9213 commit bedb142
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.2
- Load env.yaml file from /container/environment directory
to make the image more friendly with kubernetes secrets :)

## 0.1.1
- Fix remove-service #1
- Add python and PyYAML
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = osixia/light-baseimage
VERSION = 0.1.1
VERSION = 0.1.2

.PHONY: all build test tag_latest release build-tool

Expand Down
8 changes: 4 additions & 4 deletions image/tool/my_init
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def decode_python_envvars():
for name, value in _environ.items():
python_to_bash_envvar(name, value)

def import_etc_yaml_envvars():
if os.path.isfile("/etc/env.yaml"):
with open("/etc/env.yaml", "r") as f:
def import_yaml_envvars():
if os.path.isfile("/container/environment/env.yaml"):
with open("/container/environment/env.yaml", "r") as f:
etc_env_vars_yaml = f.read()
etc_env_vars = yaml.load(etc_env_vars_yaml)

Expand All @@ -134,7 +134,7 @@ def import_envvars(clear_existing_environment = True, override_existing_environm
if override_existing_environment or not name in os.environ:
os.environ[name] = value

import_etc_yaml_envvars()
import_yaml_envvars()
decode_python_envvars()

def export_envvars(to_dir = True):
Expand Down

0 comments on commit bedb142

Please sign in to comment.