local secretEnvs = [
{
name: x.name,
valueFrom: {
secretKeyRef: { key: x.key, name: 'demo-deploy' },
},
}
for x in [
{ name: 'S3_BUCKET', key: 's3Bucket' },
{ name: 'S3_URL', key: 's3URL' },
{ name: 'S3_ACCESS_KEY', key: 's3AccessKey' },
{ name: 'S3_SECRET_KEY', key: 's3SecretKey' },
]
];
[
{
apiVersion: 'apps/v1',
kind: 'Deployment',
metadata: {
name: 'demo-deploy',
labels: {
app: 'demo-deploy',
},
},
spec: {
replicas: 1,
selector: {
matchLabels: {
app: 'demo-deploy',
},
},
template: {
metadata: {
labels: {
app: 'demo-deploy',
},
},
spec: {
containers: [
{
name: 'main',
image: 'nginx:stable',
env: secretEnvs,
},
],
},
},
},
},
]
jsonnet --version
Jsonnet commandline interpreter v0.13.0
qbec version
qbec version: 0.7.5
jsonnet version: v0.13.0
go version: 1.12.5
commit: e4d3f78
✘ evaluate 'hello': INTERNAL ERROR: (CRASH) Desugaring desugared object
goroutine 7 [running]:
runtime/debug.Stack(0xc00075a6d8, 0x120f7e0, 0x15ba5d0)
/usr/local/go/src/runtime/debug/stack.go:24 +0x9d
github.com/google/go-jsonnet.(*VM).evaluateSnippet.func1(0xc00075baf0)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/vm.go:129 +0x60
panic(0x120f7e0, 0x15ba5d0)
/usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/google/go-jsonnet.desugar(0xc00021c880, 0x0, 0x0, 0x0)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/desugarer.go:541 +0x8db
github.com/google/go-jsonnet.desugar(0xc000237590, 0x0, 0x0, 0x0)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/desugarer.go:358 +0xe3c
github.com/google/go-jsonnet.desugar(0xc00003b5a0, 0x0, 0x1606620, 0xc000478e60)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/desugarer.go:328 +0x1c54
github.com/google/go-jsonnet.desugar(0xc00003b5a0, 0x0, 0x1, 0x1b)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/desugarer.go:370 +0x24b8
github.com/google/go-jsonnet.desugarLocalBinds(0xc00003b590, 0x1, 0x1, 0x0, 0x5, 0xc0002fbee0)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/desugarer.go:295 +0xd7
github.com/google/go-jsonnet.desugar(0xc0003369a0, 0x0, 0xc000116480, 0x420)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/desugarer.go:504 +0xa85
github.com/google/go-jsonnet.desugarFile(...)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/desugarer.go:587
github.com/google/go-jsonnet.snippetToAST(0xc0002fbbe0, 0x18, 0xc000116480, 0x420, 0x40b899, 0x7f4d305d2008, 0xc0000c3841, 0xc000116480)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/vm.go:207 +0xb0
github.com/google/go-jsonnet.(*VM).evaluateSnippet(0xc0000c4f00, 0xc0002fbbe0, 0x18, 0xc000116480, 0x420, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/vm.go:132 +0x9c
github.com/google/go-jsonnet.(*VM).EvaluateSnippet(0xc0000c4f00, 0xc0002fbbe0, 0x18, 0xc000116480, 0x420, 0x420, 0x0, 0x7, 0xc0002dec30)
/Users/kanantheswaran/go/pkg/mod/github.com/google/[email protected]/vm.go:160 +0x69
github.com/splunk/qbec/internal/eval.evalComponent(0xc0003502b4, 0x4, 0x0, 0x0, 0x7ffef1d58b01, 0x7, 0xc0003502b8, 0x7, 0xc0002dec30, 0x0, ...)
/Users/kanantheswaran/go/qbec/internal/eval/eval.go:203 +0x1ea
github.com/splunk/qbec/internal/eval.evalComponents.func1(0xc000293140, 0xc0000c37a0, 0xc0003502b4, 0x4, 0x0, 0x0, 0x7ffef1d58b01, 0x7, 0xc0003502b8, 0x7, ...)
/Users/kanantheswaran/go/qbec/internal/eval/eval.go:257 +0x1cc
created by github.com/splunk/qbec/internal/eval.evalComponents
/Users/kanantheswaran/go/qbec/internal/eval/eval.go:254 +0x2f0
Please report a bug here: https://github.com/google/go-jsonnet/issues