dotnet / tye

Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with minimal configuration.
MIT License
5.29k stars 520 forks source link

Update Ingress to v1 #737

Open jongio opened 3 years ago

jongio commented 3 years ago

What should we add or change to make your life better?

tye currently uses v1beta1, v1 is out. Let's upgrade:

apiVersion: networking.k8s.io/v1

Why is this important to you?

Because v1 is now ready and I want to use the latest.

azsdke2e azsdke2e2

tebeco commented 3 years ago

@jongio could you take a look at the PR, I feel like I'm missing something

tebeco commented 3 years ago

Dropping here links so that there's more context about the implication of the changes: (In case I can't manage to do the PR for other contributor)

As of today Ingress yaml manifest if generated in code by KubernetesManifestGenerator.CreateIngress It is generated for the apiVersion: extensions/v1beta1 when ingress went GA, some changes were done to make it apiVersion: networking.k8s.io/v1 which also have impact of that manifest syntax (api) being used CreateIngress needs to be changed to emit the manifest to that new apiVersion: networking.k8s.io/v1

Here is a list of resource that can be usefull: Tye recipe for Ingress syntax in tye.yaml Kubernetes docs on Ingress ingress GA version (new / introduced in 1.14) previous ingress version (used by tye) Deprecated APIs Removed In 1.16 Improvements to the Ingress API in Kubernetes 1.18 PR for Ingress v1 - ingress: Add Ingress to v1 API and update backend to defaultBackend Graduate Ingress to GA Markdown

ghost commented 3 years ago

I think we should add a parameter to specify tatget k8s version and store some maps between different values for different k8s artefacts in these versions. Not everybody will have their cluster in a latest version.

What do you think?

tebeco commented 3 years ago

exactly ! I ask a similar question to @jkotalik yesterday on twitch.

I think this will need a separate PR for that. A sort of Handshake that checks Kube cluster version, and various Kind <=> apiVersion available Then each ManifestGenerator in tye could be versionned (as you said in a Map/Dictionary<ApiVersion>)

So that way it would be possible to generate a compliant manifest and possibly

jongio commented 3 years ago

Here's a link to the K8S v1.22 project. https://github.com/kubernetes/kubernetes/milestone/50

They don't have a date yet, but we should keep an eye on that because that is the v1beta1 will be deprecated.