724c0d3eb0
This is helpful for us, amongst other users, because we want to enable "debug"
logging whenever we deploy components for testing.
See a5643e3
for addition of log level.
Signed-off-by: Andrew Keesler <akeesler@vmware.com>
39 lines
949 B
YAML
39 lines
949 B
YAML
#! Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
|
#! SPDX-License-Identifier: Apache-2.0
|
|
|
|
#@ load("@ytt:data", "data")
|
|
#@ load("@ytt:template", "template")
|
|
|
|
#@ def defaultResourceName():
|
|
#@ return data.values.app_name
|
|
#@ end
|
|
|
|
#@ def defaultResourceNameWithSuffix(suffix):
|
|
#@ return data.values.app_name + "-" + suffix
|
|
#@ end
|
|
|
|
#@ def namespace():
|
|
#@ if data.values.into_namespace:
|
|
#@ return data.values.into_namespace
|
|
#@ else:
|
|
#@ return data.values.namespace
|
|
#@ end
|
|
#@ end
|
|
|
|
#@ def defaultLabel():
|
|
app: #@ data.values.app_name
|
|
#@ end
|
|
|
|
#@ def labels():
|
|
_: #@ template.replace(defaultLabel())
|
|
_: #@ template.replace(data.values.custom_labels)
|
|
#@ end
|
|
|
|
#@ def getAndValidateLogLevel():
|
|
#@ log_level = data.values.log_level
|
|
#@ if log_level != "info" and log_level != "debug" and log_level != "trace" and log_level != "all":
|
|
#@ fail("log_level '" + log_level + "' is invalid")
|
|
#@ end
|
|
#@ return log_level
|
|
#@ end
|