Last active
April 5, 2019 22:42
-
-
Save timmyers/374d10424de427ea9fd664ef97f4614d to your computer and use it in GitHub Desktop.
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
const entrypointString = fs.readFileSync(path.relative(process.cwd(), `${__dirname}/entrypoint.sh`)).toString(); | |
const configMap = new k8s.core.v1.ConfigMap(name, { | |
metadata: { | |
name, | |
namespace, | |
}, | |
data: { | |
'entrypoint.sh': entrypointString, | |
}, | |
}, defaultOpts); | |
configMap.data.apply(data => { | |
// const entrypoint = data['entrypoint.sh']; // Does not compile, thinks it is Output<string> | |
const entrypoint = data['entrypoint.sh'] as unknown as string; // At runtime, it appears to just be a string | |
console.log(sha1hash(entrypoint)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment