Replies: 1 comment 4 replies
-
|
Hey Jonathan @jmezach - thanks for reaching out and raising this issue. I have to admit I am not familiar with Aspire and didn't built much parts of the initial integration. I think I understood where the problems are and tried to give you a better support for the k3s. If you could give that pull request a try and give me some feedback that would be more than awesome. it should work something like that: var k3s = builder.AddK3sCluster("k3s");
builder.AddKubeOps<Projects.MyOperator>("operator").RunWithKubernetes(k3s);Thanks, |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The Aspire CommunityToolkit recently gained a K3s hosting integration, see https://github.com/CommunityToolkit/Aspire/tree/main/src/CommunityToolkit.Aspire.Hosting.K3s. This allows you to spin up a local Kubernetes cluster which is ideal for testing an operator locally. While trying this out though I found some incompatibilities with the current KubeOps Aspire integration. Specifically the
RunWithKubernetes()extension method requires aKubernetesEnvironmentResourceas the parameter, but the K3s integration has a customK3sClusterResourcewhich does not inherit from that.I have worked around this for now by doing a
WithReference(k3sCluster)on the result ofAddKubeOps<T>()which injects aKUBECONFIGenvironment variable pointing at the correct kubernetes config file so that the operator talks to the correct cluster. But that requires me to manually start the operator and it also doesn't deploy the CRD's automatically.Now I realise both of these are fairly new, but it would be great if these two things could be working together so I just wanted to get the ball rolling here ;).
Beta Was this translation helpful? Give feedback.
All reactions