rapid-advantage-25766
10/24/2024, 8:17 AMvariables:
registry-ip: ${resource-name.status.loadBalancer.ingress[0].ip}
push: true
But I get the following error, and I don’t know what to try. Any hint, anyone? 🙇♂️hallowed-photographer-31251
10/24/2024, 4:53 PMpush
is being consumed.
total shot in the dark - try push: "true"
, i wouldn’t be surprised if yaml isn’t expecting a bool there.rapid-advantage-25766
10/24/2024, 5:06 PMhallowed-photographer-31251
10/24/2024, 5:20 PM${resource-name}
parses with the hyphen, you might try ${resourceName}
rapid-advantage-25766
10/24/2024, 5:57 PMrapid-advantage-25766
10/24/2024, 5:58 PMrapid-advantage-25766
10/25/2024, 11:51 AMhallowed-photographer-31251
10/25/2024, 5:03 PMpulumi convert --from yaml --language nodejs --out ts
) and then check if that has the same problem. if it does, that tells me the issue is likely with the provider. if it doesn’t, that tells me it’s probably pulumi-yaml. i suspect the issue in this case is with yaml.
i made some small tweaks to get your repro working locally.
diff --git a/Pulumi.yaml b/Pulumi.yaml
index cb964db..1f9cbcd 100644
--- a/Pulumi.yaml
+++ b/Pulumi.yaml
@@ -1,7 +1,6 @@
name: pulumi-k8s-issue
description: Replicate an issue when retrieving status from k8s.
runtime: yaml
-config: {'pulumi:tags': {value: {'pulumi:template': yaml}}}
variables:
namespace: dev
@@ -87,6 +86,6 @@ resources:
push: ${docker.push}
registries: ${docker.registries}
tags:
- - ${docker.build.registry}/namespace/repository:tag
+ - ${docker.registries[0].address}/namespace/repository:tag
outputs: {}
diff --git a/ts/index.ts b/ts/index.ts
index 6dc6e9b..1a3b9cf 100644
--- a/ts/index.ts
+++ b/ts/index.ts
@@ -95,7 +95,7 @@ const dockerImageBuilder = new docker_build.Image("docker-image-builder", {
RUN echo "buildingbuildingbuilding"
`,
},
- platforms: docker.platforms,
+ platforms: docker.platforms as docker_build.Platform[],
push: docker.push,
registries: docker.registries,
tags: [docker.registries[0].address.apply(address => `${address}/namespace/repository:tag`)],
yaml and ts both fail for me but in different ways. i don’t have a load balancer setup right now, and i think ts is getting further and dying due to a lack of an ip. (you should probably give the service type: LoadBalancer
so pulumi will wait for it to get an ip)
anyway let me know if ts works for your lb.
yaml
error: receiver must be a list or object, not nil
on Pulumi.yaml line 13:
13: - address: ${docker-registry-service.status.loadBalancer.ingress[0].ip}
error: an unhandled error occurred: waiting for RPCs: marshaling properties: awaiting input property "push": runtime error
ts
docker-build:index:Image (docker-image-builder):
error: docker-build:index:Image resource 'docker-image-builder': property registries[0] value {<nil>} has a problem: An error occurred decoding 'ImageArgs.registries[0]': 1 failures decoding:
address: Missing required field 'address' on 'internal.Registry'
rapid-advantage-25766
10/25/2024, 5:14 PMrapid-advantage-25766
10/25/2024, 5:18 PMrapid-advantage-25766
10/25/2024, 5:20 PMkubectl get services
.
I do have some trouble finding the documentation on that, to be honest. I guess I should be able to from here (https://www.pulumi.com/registry/packages/kubernetes/api-docs/core/v1/service/#servicestatus), but I fail to do so, at least so far.hallowed-photographer-31251
10/25/2024, 5:33 PMrapid-advantage-25766
10/25/2024, 8:06 PM${docker-registry-service.spec.clusterIP}
works just fine.
Many, many thanks. I was at a total loss about what to do, and thanks to your help, I’m back in the saddle, and I feel like I get the documentation better as well.
I owe you one more!rapid-advantage-25766
10/25/2024, 8:10 PMunhandled error occured: waiting for RPCs: etc.
anyways 😄.