-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes ingress controller samples need improvement #2250
Comments
I build the same code today. Although I agree on better documentation, the combined dockerfile did work and the restore worked succesfully. |
@BasLijten can you share your terminal output from the build? |
i would have to rerun the build at a later moment, but having read your comment I was ready for failure. I think it took about (max) 1 minute. I am running a dell Legion 7: Windows 11, i9-13900HX. if i recall correctly, I ran the build on WSL2 (ubuntu 22), that might be a difference. |
@BasLijten I tried building the dockerfile on my windows laptop and indeed it works there without issues. Either way I still think it would be beter to just use dotnet publish for building container images since this works consistetly across platfroms. |
We should fix the broken docs/links. The build issue is interesting; we do build this in our CI successfully so perhaps there's an environmental problem involved here. |
@adityamandaleeka would you except a PR adding the conatainer publishing properties to the .csproj file and adding detailed steps for using them? Maybe under a MacOS specific section? |
Some details
I recently tried the kubernetes ingress samples and although i got it working. The documentation in the docs folder could use some improvement. I ran into two concrete issues.
Firsts it talks about a dockerfile you can build in
.\src\Kubernetes.Controller\Dockerfile
but this file does not seem to exist, not even in the main branch. Can you give clarification on this?Second I tried to build the dockerfile from the ingress sample
.\samples\KuberenetesIngress.Sample\Combined\Dockerfile
. But this kept getting stuck on step 12/16 trying to do a dotnet restore.This can go on exceeding 600 seconds at wich point i just give up.
The way to fix this for me was by introducing container properties in the
./samples/KuberenetesIngress.Sample/Combined/Yarp.Kubernetes.IngressController.csproj
file and leveraging Microsoft.NET.Build.Containers (Buillt into net7 sdk) to publish the project as a dockerfile.dotnet publish --os linux --arch x64 /t:PublishContainer -f net7.0 -c Release
This worked great and built image
yarp-controller:1.0.0
locally.Next I used
docker tag yarp-controller:1.0.0 my-container-registry.azurecr.io/yarp-controller:1.0.0
to tag it for the our Azure container registry.Then i used
docker push my-container-registry.azurecr.io/yarp-controller:1.0.0
to push it to our container registry.So my suggstion is to update the doc to
.\src\Kubernetes.Controller\Dockerfile
which does not existI am using a M2 Macbook Pro with .NET 7 and dockerdesktop 4.22.1
I would also like to ask if you would except a PR from me to improve this?
How many backends are in your application?
How do you host your application?
What did you think of YARP?
I am really impressed with the project so far but it lacks documentation. Especially in the route vs cluster concepts department.
The text was updated successfully, but these errors were encountered: