Last active
August 29, 2015 14:07
-
-
Save markround/9b35ab09593a191bb87f to your computer and use it in GitHub Desktop.
Tiller override datasource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Environment override datasource for Tiller (github.com/markround/tiller). | |
# This extracts all environment variables, and makes them available to templates | |
# by converting to lowercase. Note that it doesn't prefix them with env_ so they | |
# will potentially clash/override any other values you have defined in other | |
# datasources! | |
# Install into /usr/local/lib/tiller/data/override.rb | |
# And add to your list of data_sources in /etc/tiller/common.yaml | |
class EnvironmentOverrideDataSource < Tiller::DataSource | |
def global_values | |
values = Hash.new | |
ENV.each { |k, v| values[k.downcase] = v } | |
values | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment