rapid-advantage-25766
08/07/2024, 9:26 PMrapid-advantage-25766
08/07/2024, 9:27 PMpanic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x103221bb8]
and
warning: Failed to get information about the plugin: failed to discover plugin requirements: error reading from server: EOF
warning: Failed to get information about the project runtime: connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:65406: connect: connection refused"
warning: Failed to get information about the Pulumi program's dependencies: connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:65406: connect: connection refused"
rapid-advantage-25766
08/07/2024, 9:29 PMrapid-advantage-25766
08/07/2024, 9:30 PMpanic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x103221bb8]
goroutine 70 [running]:
<http://github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.topologicallySortedResources.func3(0x1400038fe60)|github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.topologicallySortedResources.func3(0x1400038fe60)>
/Users/runner/work/pulumi-yaml/pulumi-yaml/pkg/pulumiyaml/sort.go:169 +0xe8
<http://github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.topologicallySortedResources.func3(0x1400038e520)|github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.topologicallySortedResources.func3(0x1400038e520)>
/Users/runner/work/pulumi-yaml/pulumi-yaml/pkg/pulumiyaml/sort.go:192 +0x488
<http://github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.topologicallySortedResources(0x14000300d00|github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.topologicallySortedResources(0x14000300d00>, {0x103f3d100, 0x0, 0x1033fe548?})
/Users/runner/work/pulumi-yaml/pulumi-yaml/pkg/pulumiyaml/sort.go:209 +0xdd0
<http://github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.(*Runner).setIntermediates(0x140002c7b80|github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.(*Runner).setIntermediates(0x140002c7b80>, {0x0?, 0x20?}, 0x14000072d80?, 0x0, 0x0)
/Users/runner/work/pulumi-yaml/pulumi-yaml/pkg/pulumiyaml/run.go:792 +0x220
<http://github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.(*Runner).ensureSetup(0x140002c7b80|github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.(*Runner).ensureSetup(0x140002c7b80>, 0x0)
/Users/runner/work/pulumi-yaml/pulumi-yaml/pkg/pulumiyaml/run.go:805 +0x3c
<http://github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.(*Runner).Run(0x140002c7b80|github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.(*Runner).Run(0x140002c7b80>, {0x1036df370?, 0x140001fc5d0})
/Users/runner/work/pulumi-yaml/pulumi-yaml/pkg/pulumiyaml/run.go:833 +0x64
<http://github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.GetReferencedPlugins(0x14000300d00)|github.com/pulumi/pulumi-yaml/pkg/pulumiyaml.GetReferencedPlugins(0x14000300d00)>
/Users/runner/work/pulumi-yaml/pulumi-yaml/pkg/pulumiyaml/packages.go:146 +0x1c8
<http://github.com/pulumi/pulumi-yaml/pkg/server.(*yamlLanguageHost).GetRequiredPlugins(0x14000427708|github.com/pulumi/pulumi-yaml/pkg/server.(*yamlLanguageHost).GetRequiredPlugins(0x14000427708>?, {0x102f45104?, 0x40?}, 0x1034e11e0?)
/Users/runner/work/pulumi-yaml/pulumi-yaml/pkg/server/server.go:94 +0xac
<http://github.com/pulumi/pulumi/sdk/v3/proto/go._LanguageRuntime_GetRequiredPlugins_Handler.func1({0x1036dc9e8|github.com/pulumi/pulumi/sdk/v3/proto/go._LanguageRuntime_GetRequiredPlugins_Handler.func1({0x1036dc9e8>, 0x1400048fa70}, {0x10361acc0?, 0x140005aa1e0})
/Users/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.123.1-0.20240711160144-b8226b705890/proto/go/language_grpc.pb.go:311 +0x74
<http://github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x1036dc9e8|github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x1036dc9e8>, 0x1400048e810}, {0x10361acc0, 0x140005aa1e0}, 0x140003064c0, 0x140002f4b10)
/Users/runner/go/pkg/mod/github.com/grpc-ecosystem/grpc-opentracing@v0.0.0-20180507213350-8e809c8a8645/go/otgrpc/server.go:57 +0x2e8
<http://github.com/pulumi/pulumi/sdk/v3/proto/go._LanguageRuntime_GetRequiredPlugins_Handler({0x1036541c0|github.com/pulumi/pulumi/sdk/v3/proto/go._LanguageRuntime_GetRequiredPlugins_Handler({0x1036541c0>?, 0x14000558000}, {0x1036dc9e8, 0x1400048e810}, 0x140002c6200, 0x14000306300)
/Users/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/v3@v3.123.1-0.20240711160144-b8226b705890/proto/go/language_grpc.pb.go:313 +0x12c
<http://google.golang.org/grpc.(*Server).processUnaryRPC(0x14000552000|google.golang.org/grpc.(*Server).processUnaryRPC(0x14000552000>, {0x1036dc9e8, 0x1400048e750}, {0x1036e8440, 0x140001da000}, 0x1400002c000, 0x1400051c240, 0x103ef6d00, 0x0)
/Users/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1369 +0xba0
<http://google.golang.org/grpc.(*Server).handleStream(0x14000552000|google.golang.org/grpc.(*Server).handleStream(0x14000552000>, {0x1036e8440, 0x140001da000}, 0x1400002c000)
/Users/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1780 +0xc80
<http://google.golang.org/grpc.(*Server).serveStreams.func2.1()|google.golang.org/grpc.(*Server).serveStreams.func2.1()>
/Users/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1019 +0x8c
created by <http://google.golang.org/grpc.(*Server).serveStreams.func2|google.golang.org/grpc.(*Server).serveStreams.func2> in goroutine 14
/Users/runner/go/pkg/mod/google.golang.org/grpc@v1.63.2/server.go:1030 +0x150
rapid-advantage-25766
08/07/2024, 9:31 PMfuture-hairdresser-70637
08/07/2024, 9:35 PMrapid-advantage-25766
08/07/2024, 9:36 PMfuture-hairdresser-70637
08/07/2024, 9:37 PMfuture-hairdresser-70637
08/07/2024, 9:38 PMrapid-advantage-25766
08/07/2024, 9:38 PMCLI
Version 3.128.0
Go Version go1.22.5
Go Compiler gc
Host
OS darwin
Version 14.4
Arch arm64
Backend
Name ***********
URL file://~
User ************
Organizations
Token type personal
rapid-advantage-25766
08/07/2024, 9:39 PMfuture-hairdresser-70637
08/07/2024, 9:43 PMfuture-hairdresser-70637
08/07/2024, 9:44 PMpulumi-yaml
? example: https://github.com/pulumi/pulumi-yaml/issues/465rapid-advantage-25766
08/07/2024, 9:45 PMfuture-hairdresser-70637
08/07/2024, 9:46 PMrapid-advantage-25766
08/07/2024, 9:46 PMrapid-advantage-25766
08/07/2024, 10:20 PMpulumi about
, so my code must be faulty.
That’s progress already - I know where to look. I’ll keep digging a few hours before opening an issue. Once again, thank you for that.future-hairdresser-70637
08/07/2024, 10:25 PMrapid-advantage-25766
08/07/2024, 10:26 PMPulumi.yaml
file:
name: pulumi-tryout-k8s
description: pulumi tryout
runtime:
name: yaml
options:
compiler: "sh ./bin/merge_yaml.sh"
As you can see, I’m not actually using a yaml file straight-away, but rather using a posix-shell script to generate one by merging several yaml files.
And by doing so, for some reason I don’t get yet, my mistakes do not raise proper logs anymore, though it does with the tutorial’s way.
For instance, I had the following spawn after I manually generated an updated Pulumi.yaml
file to avoid the compiler part:
error: an unhandled error occurred: 1 error occurred:
* Pulumi.yaml:105,21-82: resource, variable, or config value "some--var" not found;
future-hairdresser-70637
08/07/2024, 10:31 PMrapid-advantage-25766
08/07/2024, 10:39 PMfuture-hairdresser-70637
08/07/2024, 11:20 PMfuture-hairdresser-70637
08/07/2024, 11:22 PMrapid-advantage-25766
08/07/2024, 11:38 PMpulumi-yaml
?
It looks like this currently, in the resources
field of the Pulumi.yaml
file:
resources:
traefikTlsOption:
type: kubernetes:<http://traefik.containo.us/v1alpha1:TLSOption|traefik.containo.us/v1alpha1:TLSOption>
properties: ...
whoamiHttpIngressRoute:
type: kubernetes:<http://traefik.containo.us/v1alpha1:IngressRoute|traefik.containo.us/v1alpha1:IngressRoute>
properties: ...
traefikDeployment:
type: kubernetes:apps/v1:Deployment
properties: ...
and so on.
The CRDs are already installed on my cluster, but I guess they must not be part of `pulumi-yaml`’s packages (or whatever it’s called, I still have to master the vocabulary!).rapid-advantage-25766
08/07/2024, 11:40 PMconfig
part - one base and its environment-related override):
name: debug-merged-yaml
runtime: yaml
resources:
whoamiDeployment:
type: kubernetes:apps/v1:Deployment
properties:
metadata:
namespace: ${namespace}
name: whoami
labels:
app: whoami
spec:
replicas: 2
selector:
matchLabels:
app: whoami
template:
metadata:
labels:
app: whoami
spec:
containers:
- name: whoami
image: ${images--whoami}
ports:
- name: http
containerPort: 80
whoamiService:
type: kubernetes:core/v1:Service
properties:
metadata:
namespace: ${namespace}
name: whoami
spec:
ports:
- protocol: TCP
name: web
port: 80
selector:
app: whoami
whoamiHttpIngressRoute:
type: kubernetes:<http://traefik.containo.us/v1alpha1:IngressRoute|traefik.containo.us/v1alpha1:IngressRoute>
properties:
metadata:
namespace: ${namespace}
name: http--who-am-i
spec:
entryPoints:
- http
routes:
- match: Host(`who-am-i.infraberry.ovh`) && PathPrefix(`/notls`)
kind: Rule
services:
- name: whoami
port: 80
whoamiHttpsIngressRoute:
type: kubernetes:<http://traefik.containo.us/v1alpha1:IngressRoute|traefik.containo.us/v1alpha1:IngressRoute>
properties:
metadata:
namespace: ${namespace}
name: https--who-am-i
spec:
entryPoints:
- https
routes:
- match: Host(`who-am-i.infraberry.ovh`) && PathPrefix(`/tls`)
kind: Rule
services:
- name: whoami
port: 80
tls:
certResolver: letsencrypt
traefikDeployment:
type: kubernetes:apps/v1:Deployment
properties:
metadata:
namespace: ${namespace}
name: traefik
labels:
app: traefik
spec:
replicas: 1
selector:
matchLabels:
app: traefik
template:
metadata:
labels:
app: traefik
spec:
serviceAccountName: traefik-ingress-controller
containers:
- name: traefik
image: ${images--traefik}
args:
- --providers.kubernetescrd
- --api.insecure
# logging
- --log.level=${traefik--logging--level}
- --log.format=${traefik--logging--format}
- --accesslog
# letsencrypt resolver
- --certificatesresolvers.letsencrypt.acme.tlschallenge
- --certificatesresolvers.letsencrypt.acme.email=${acme--email}
- --certificatesresolvers.letsencrypt.acme.storage=${acme--storage}
- --certificatesresolvers.letsencrypt.acme.caserver=${acme--endpoint}
# entrypoints
- --entryPoints.http.address=:80
- --entryPoints.https.address=:443
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
- name: admin
containerPort: 8080
traefikTlsOption:
type: kubernetes:<http://traefik.containo.us/v1alpha1:TLSOption|traefik.containo.us/v1alpha1:TLSOption>
properties:
metadata:
name: default
namespace: ${namespace}
spec:
minVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 # TLS 1.2
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 # TLS 1.2
- TLS_AES_256_GCM_SHA384 # TLS 1.3
- TLS_CHACHA20_POLY1305_SHA256 # TLS 1.3
curvePreferences:
- CurveP521
- CurveP384
sniStrict: true
traefikService:
type: kubernetes:core/v1:Service
properties:
metadata:
namespace: ${namespace}
name: traefik
spec:
type: LoadBalancer
ports:
- protocol: TCP
name: http
port: 80
- protocol: TCP
name: admin
port: 8080
- protocol: TCP
name: https
port: 443
selector:
app: traefik
traefikServiceAccount:
type: kubernetes:core/v1:ServiceAccount
properties:
metadata:
namespace: ${namespace}
name: traefik-ingress-controller
config:
# global
domain: aaaaaa.aaa
namespace:
type: string
default: n4m35p4c3
# acme
acme--email: <mailto:aaaa.aaaaaaa@aaa.com|aaaa.aaaaaaa@aaa.com>
acme--endpoint:
type: string
default: <https://acme-staging-v02.api.letsencrypt.org/directory>
acme--storage:
type: string
default: acme.json
# images
images--traefik: traefik:v3.1
images--whoami: traefik/whoami
# traefik
traefik--logging--format: common
traefik--logging--level: INFO
sparse-forest-27046
08/08/2024, 7:06 AMgo clean -modcache
rapid-advantage-25766
08/08/2024, 12:07 PMpulumi-cli
nor pulumi-yaml
, if I’m not mistaken). Therefore, I get sh: go: command not found
when trying go clean -modcache
.
Was it installed somewhere behind my back but not added to PATH, is it plainly missing, or is it packaged with pulumi and can I find that go
binary somewhere?rapid-advantage-25766
08/08/2024, 2:05 PMpulumi about
screams as it does, and why logging is fumbled with the compiler option).hallowed-photographer-31251
08/08/2024, 8:13 PMname: debug-merged-yaml
runtime:
name: yaml
options:
compiler: "cat resources.yaml"
hallowed-photographer-31251
08/08/2024, 8:20 PMrapid-advantage-25766
08/09/2024, 8:19 AMsteep-pager-59220
08/09/2024, 10:12 AMpulumi-yaml
runtime expects the complete yaml, including the name
and runtime
options to be returned by the compiler. So updating your merge_yaml.sh
script to include the contents of the Pulumi.yaml
in the output should work for now. We should still not panic here and at least give a better error message, so I'm working on that now as well.rapid-advantage-25766
08/09/2024, 10:50 AMfuture-hairdresser-70637
08/09/2024, 1:45 PMrapid-advantage-25766
08/09/2024, 1:59 PMrapid-advantage-25766
08/09/2024, 2:16 PMrapid-advantage-25766
08/09/2024, 2:18 PMsteep-pager-59220
08/09/2024, 2:29 PM