rough-arm-38844
03/10/2021, 9:48 AMworried-knife-31967
03/10/2021, 12:21 PMhelpful-van-82564
03/10/2021, 2:23 PMminiature-leather-70472
03/10/2021, 3:52 PMworried-knife-31967
03/10/2021, 3:56 PMworried-knife-31967
03/10/2021, 4:16 PMbig-apartment-95438
03/10/2021, 4:48 PMbig-potato-91793
03/10/2021, 9:08 PMstocky-france-59380
03/11/2021, 1:29 AMexport const ymml = new k8s.yaml.ConfigFile('yamlfile', {
file: 'foo.yaml',
});
and a test like this
describe('yaml', function () {
it('reads', function (done) {
pulumi.all([infra.ymml.urn, infra.ymml]).apply(([urn, thefile]) => {
console.log(urn);
var val = thefile.getResource('v1/Service', 'my-service');
console.log(val);
done();
});
});
});
in a unit test is there away to see the output of the file? At the moment I get this
yaml
urn:pulumi:stack::project::kubernetes:yaml:ConfigFile::yamlfile
OutputImpl {
__pulumiOutput: true,
resources: [Function (anonymous)],
allResources: [Function (anonymous)],
isKnown: Promise { <pending> },
isSecret: Promise { <pending> },
promise: [Function (anonymous)],
toString: [Function (anonymous)],
toJSON: [Function (anonymous)]
}
✓ reads
(node:58505) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:58505) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 4)
I am trying to understand an error that looks like this when running that deploys a blackbox exporter. I can apply it using kubectl apply
but it's failing as below in pulumi
Error: invocation of kubernetes:yaml:decode returned an error: error converting YAML to JSON: yaml control characters are not allowed
worried-knife-31967
03/11/2021, 11:24 AMbulky-continent-73012
03/11/2021, 11:28 AMearly-intern-90238
03/11/2021, 2:29 PMworried-knife-31967
03/11/2021, 2:53 PMhelpful-van-82564
03/11/2021, 3:44 PMcreamy-iron-5034
03/11/2021, 4:22 PMNEXTAUTH_URL
which should be the URL used on deployed instance, however, for my staging environment this is dynamic and not known e.g.
const app = new gcp.cloudrun.Service(`app`, {
location,
template: {
spec: {
containers: [
{
// Use pushed image from CI (assume local if not)
image: pulumi.interpolate`<http://gcr.io/${gcp.config.project}/app:${prNumber}|gcr.io/${gcp.config.project}/app:${prNumber}>`,
ports: [{ containerPort: 3000 }],
resources: {
limits: {
memory: `1Gi`,
},
},
},
],
containerConcurrency: 50,
},
},
metadata: {
annotations: {
"<http://run.googleapis.com/cloudsql-instances|run.googleapis.com/cloudsql-instances>": pgInstance.connectionName,
},
},
});
e.g. yields https://some-chars.a.run.app
and is available as
// Export the URL
export const appUrl = app.statuses[0].url;
But I am not sure you can include setting this back to the cloud run env variable?creamy-iron-5034
03/11/2021, 4:25 PMapp.template.get()?.spec.containers[0].envs?.push({
name: "NEXTAUTH_URL",
value: app.statuses[0].url.get(),
});
Was thinking I might be able to do something like this, but obviously get()
is documented that it will throw if ran during deploymentbig-apartment-95438
03/11/2021, 5:16 PMconst currentLoadBalancer = pulumi.all([service.status.loadBalancer.ingress[0].hostname]).apply(([hostname]) => {
return aws.lb.getLoadBalancer({
name: hostname.split("-")[0] // Get the name part from the hostname (before the first hyphen)
});
});
but hostname is undefined 😞
Is there a better way to find a load balancer created from a helm chart?straight-cartoon-24485
03/12/2021, 1:31 AM--set-file key=myfile
install requirement correctly into pulumi speak?
const linkerdName = 'mesh'
const linkerdNamespaceName = 'linkerd'
const linkerdNamespace = new k8s.core.v1.Namespace(linkerdNamespaceName, {
metadata: { name: linkerdNamespaceName, labels: { name: linkerdName } }
})
let aYearFromNow = new Date()
aYearFromNow.setFullYear(aYearFromNow.getFullYear() + 1)
const identityTrustAnchorsPEM: string = fs.readFileSync('ca/ca.crt', { encoding: 'utf8', flag: 'r' }).toString().trim()
const crtPEM: string = fs.readFileSync('ca/issuer.crt', { encoding: 'utf8', flag: 'r' }).toString().trim()
const keyPEM: string = fs.readFileSync('ca/issuer.key', { encoding: 'utf8', flag: 'r' }).toString().trim()
const linkerd = new k8s.helm.v3.Chart(linkerdName, {
repo: "linkerd",
chart: "linkerd2",
namespace: linkerdNamespace.metadata.name, values: {
global: {
identityTrustAnchorsPEM
},
identity: {
issuer: {
tls: { crtPEM, keyPEM },
crtExpiry: aYearFromNow.toDateString()
}
}
}
})
On https://linkerd.io/2/tasks/install-helm/ they're asking for:
helm install linkerd2 \
--set-file global.identityTrustAnchorsPEM=ca.crt \
--set-file identity.issuer.tls.crtPEM=issuer.crt \
--set-file identity.issuer.tls.keyPEM=issuer.key \
--set identity.issuer.crtExpiry=$exp \
linkerd/linkerd2
I'm getting this error from within the helm chart on pulumi up
error: Running program '/home/paul/code/deposition/infra/haze' failed with an unhandled exception:
Error: invocation of kubernetes:helm:template returned an error: failed to generate YAML for specified Helm chart: failed to create chart from template: execution error at (linkerd2/templates/sp-validator.yaml:129:12): Please provide the identity trust anchors
salmon-australia-89174
03/12/2021, 8:44 AMmammoth-caravan-51104
03/12/2021, 11:07 AMpulumi up
execution times. Preview phase and update phase are excruciately slow. stack has ~200 resources. is there a way to speed it up?steep-beard-51215
03/12/2021, 2:35 PMpanic: fatal: An assertion has failed
goroutine 51 [running]:
<http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.failfast(...)>
/private/tmp/pulumi-20210303-16507-1fj5hzn/sdk/go/common/util/contract/failfast.go:23
<http://github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assert(...)|github.com/pulumi/pulumi/sdk/v2/go/common/util/contract.Assert(...)>
/private/tmp/pulumi-20210303-16507-1fj5hzn/sdk/go/common/util/contract/assert.go:26
<http://github.com/pulumi/pulumi/pkg/v2/engine.printPropertyValue|github.com/pulumi/pulumi/pkg/v2/engine.printPropertyValue>(0xc001d10570, 0x5718b60, 0xc0022a2c30, 0x1, 0x1, 0x587150a, 0x6, 0xc001d10001)
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/engine/diff.go:511 +0x1485
<http://github.com/pulumi/pulumi/pkg/v2/engine.printAdd(0xc001d10570|github.com/pulumi/pulumi/pkg/v2/engine.printAdd(0xc001d10570>, 0x5718b60, 0xc0022a2c30, 0xc001b6f828, 0xc001d18101, 0x1, 0xc001b6f800)
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/engine/diff.go:730 +0x9f
<http://github.com/pulumi/pulumi/pkg/v2/engine.printObjectPropertyDiff(0xc001d10570|github.com/pulumi/pulumi/pkg/v2/engine.printObjectPropertyDiff(0xc001d10570>, 0xc000a90ea0, 0x8, 0x22, 0xc001d10480, 0xc001d104b0, 0xc001d104e0, 0xc001d10510, 0xc001d12b01, 0x1, ...)
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/engine/diff.go:600 +0x130
<http://github.com/pulumi/pulumi/pkg/v2/engine.GetResourceOutputsPropertiesString(0x586e7bf|github.com/pulumi/pulumi/pkg/v2/engine.GetResourceOutputsPropertiesString(0x586e7bf>, 0x4, 0xc001603d10, 0x41, 0xc0007e0720, 0x13, 0xc0019c0990, 0xc0019c0a20, 0xc0019c0ab0, 0x0, ...)
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/engine/diff.go:405 +0x3e8
<http://github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).printOutputs(0xc000a00780)|github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).printOutputs(0xc000a00780)>
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:901 +0x146
<http://github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).processEndSteps(0xc000a00780)|github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).processEndSteps(0xc000a00780)>
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:739 +0x32e
<http://github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).processEvents(0xc000a00780|github.com/pulumi/pulumi/pkg/v2/backend/display.(*ProgressDisplay).processEvents(0xc000a00780>, 0xc0001501e0, 0xc0015a46c0)
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:1199 +0x11f
<http://github.com/pulumi/pulumi/pkg/v2/backend/display.ShowProgressEvents.func1(0xc000a00780|github.com/pulumi/pulumi/pkg/v2/backend/display.ShowProgressEvents.func1(0xc000a00780>, 0xc0001501e0, 0xc0015a46c0, 0xc000e7e300)
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:343 +0x3f
created by <http://github.com/pulumi/pulumi/pkg/v2/backend/display.ShowProgressEvents|github.com/pulumi/pulumi/pkg/v2/backend/display.ShowProgressEvents>
/private/tmp/pulumi-20210303-16507-1fj5hzn/pkg/backend/display/progress.go:342 +0x529
Has anybody seen anything like this before? I checked https://pulumi-community.slack.com/archives/C84L4E3N1/p1614118830150300 but it doesn’t seem related. I am not using Apply anywhere in the codechilly-analyst-14900
03/12/2021, 3:02 PMlemon-machine-35564
03/12/2021, 3:51 PMType 'Output<string>' is not assignable to type 'string'.
every single day? 😄helpful-van-82564
03/12/2021, 5:04 PMadamant-translator-31969
03/12/2021, 5:21 PMerror: could not deserialize deployment: unexpected end of JSON input
when I run pulumi stack import --file <stack>.<number>.json
breezy-apartment-46543
03/12/2021, 7:29 PMworried-knife-31967
03/12/2021, 7:43 PMbreezy-apartment-46543
03/12/2021, 7:46 PMbreezy-apartment-46543
03/12/2021, 7:47 PMloud-battery-37784
03/12/2021, 7:52 PMloud-battery-37784
03/12/2021, 7:52 PM