https://pulumi.com logo
Title
f

freezing-activity-93019

12/01/2022, 4:48 PM
So I'm trying to set up a new Kubernetes install with Flux, but it seems that there's a problem with the generated yaml manifests? Or with the ConfigGroup type in the Go SDK?
Diagnostics:
  pulumi:pulumi:Stack (pulumi-kubernetes-pulumi-kubernetes):
    error: an unhandled error occurred: program exited with non-zero exit code: 2

    panic: fatal: An assertion has failed: {<nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> flux-system flux-system <nil> <nil> <nil> <nil>}: cannot assign v1.objectMetaPtrType to v1.ObjectMeta
    goroutine 42 [running]:
Source code: https://gist.github.com/hbjydev/ba680822b8652812b1c4d238ce5f14f6
m

many-telephone-49025

12/01/2022, 5:19 PM
Hi Hayden, I will have a look into
f

freezing-activity-93019

12/01/2022, 5:19 PM
Awesome 🙂
The repo with all the code is private but that's all the stuff that's actually relevant to the issue
m

many-telephone-49025

12/01/2022, 5:20 PM
I will do this in docker-desktop instead of symbiosis
or kind/rancher desktop
f

freezing-activity-93019

12/01/2022, 5:20 PM
Yeah, sounds like it should work fine
m

many-telephone-49025

12/01/2022, 8:58 PM
Hi Hayden, it works for me: here is my code (I use GITHUB_TOKEN instead the deploy key) https://gist.github.com/dirien/7090994de83f063c68795d6d273f8ab6 And here is my flux deployment repo: https://github.com/dirien/my-flux-demo-deployments
The only part what differs is that i don't use the DeployKey code:
_, err = github.NewRepositoryDeployKey(ctx, args.Name+"-flux-depkey", &github.RepositoryDeployKeyArgs{
  Title:      pulumi.String("flux deploy key " + args.Name),
  Key:        privkey.PrivateKeyOpenssh,
  Repository: pulumi.String("gitops"),
  ReadOnly:   pulumi.Bool(true),
 })
 if err != nil {
  return err
 }
Talk to you 2morrow!
f

freezing-activity-93019

12/02/2022, 7:09 AM
@many-telephone-49025 okay. Wondering if this could be an issue with my version of Pulumi now. I’ve got a small amount of time to test the problem again this evening so I’ll take a look then.
m

many-telephone-49025

12/02/2022, 8:09 AM
Looking forward!
f

freezing-activity-93019

12/03/2022, 6:16 PM
@many-telephone-49025 Still doesn't work, sadly...
m

many-telephone-49025

12/03/2022, 8:25 PM
I will run your gist on my side, at least the flux part!
and using deploykey instead PAT
f

freezing-activity-93019

12/03/2022, 8:26 PM
👍
I think it might be a problem with the manifests that it’s generating
Or how ConfigGroup parses them
m

many-telephone-49025

12/03/2022, 8:29 PM
one thing! can u use
Metadata: &metav1.ObjectMetaArgs
instead of your
v1.ObjectMetaPtr
f

freezing-activity-93019

12/03/2022, 8:29 PM
I’ll give that a try , thanks :)
m

many-telephone-49025

12/03/2022, 8:30 PM
the v1 or metav1 is not relevant.
f

freezing-activity-93019

12/03/2022, 8:30 PM
Yeah
m

many-telephone-49025

12/03/2022, 8:30 PM
I saw you point to the same lib
f

freezing-activity-93019

12/03/2022, 8:31 PM
Wait have I imported it twice?
Thought I did corev1 and metav1
m

many-telephone-49025

12/03/2022, 8:31 PM
not what i see in your gist
corev1 and metav1 are different packages
f

freezing-activity-93019

12/03/2022, 8:32 PM
I know