eficode-academy / kubernetes-katas

Deliberate exercises for Kubernetes
265 stars 275 forks source link

fix: outdated k8s resources #47

Closed Addono closed 4 years ago

Addono commented 4 years ago

Addresses two issues:

If desired only a part of the changes could be cherry-picked.

Automatic Linting

Outdated K8s resources

Merely focussed on the deployment types extensions/v1beta1, as their removal in K8s v1.16 is causing issues.

The other outdated K8s resources are all deprecated Ingress version extensions/v1beta1. Briefly scanned the Kubernetes docs to check what changed for the ingress move from extensions/v1beta1 to networking.k8s.io/v1beta1 but couldn't find an elaborate list. Does it require more than changing the API version? I tried that for one of the resources and kubeval didn't show any linting errors. Anyhow, no need to do it now per-se, as this one will only be removed in K8s v1.22.

Fixes #44 Fixes #34 Fixes #28

(W.r.t. testing these changes, merely went on the results from the linters, didn't try to apply the changed config files to a K8s cluster. Albeit the changes are quite minor.)

Addono commented 4 years ago

The .gitignore is completely generated, except the last line, as it gives a higher level method to constructing ignore. When excluding the OSes I normally also include Windows, because I do not know who will clone the repo from what OS.

Removing Windows from the .gitignore is no problem, so if that's preferred then I can remove it.