Fix Ingress #70

Merged
lunny merged 2 commits from fix-ingress into master 2020-11-26 09:01:17 +00:00
Member

Since there was a little mess up with ingress
I've reworked the api check for which version we're running.

Also added pathType to ingress, since it is required in v1 and optional in v1beta1.

Tested on my clusters with ingress running. Both versions, v1beta1 and v1.

Since there was a little mess up with ingress I've reworked the api check for which version we're running. Also added pathType to ingress, since it is required in v1 and optional in v1beta1. Tested on my clusters with ingress running. Both versions, v1beta1 and v1.
luhahn added 2 commits 2020-11-26 08:23:15 +00:00
60e9d8ce34 Fix Ingress
- Ingress uses now .Capabilities.APIVersions.Has to compare the api version available
- Added pathType since it is required in v1 and optional in v1beta1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
39faf8dc0d
Bump chart version to 2.0.7
zeripath approved these changes 2020-11-26 08:37:17 +00:00
Dismissed
lunny approved these changes 2020-11-26 09:00:57 +00:00
Dismissed
lunny merged commit 63bc10e393 into master 2020-11-26 09:01:17 +00:00
lunny referenced this issue from a commit 2020-11-26 09:01:17 +00:00
mjanser reviewed 2020-12-01 19:50:24 +00:00
Dismissed
@ -2,3 +2,3 @@
{{- $fullName := include "gitea.fullname" . -}}
{{- $httpPort := .Values.service.http.port -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
First-time contributor

Shouldn't these checks be more explicit, something like .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress"?

I currently get the following error on my cluster:

no matches for kind "Ingress" in version "networking.k8s.io/v1"

It seems I have networkpolicies in v1 but not ingress:

$ kubectl get networkpolicies.v1.networking.k8s.io
No resources found.

$ kubectl get ingress.v1.networking.k8s.io
error: the server doesn't have a resource type "ingress"

$ kubectl get ingress.v1beta1.networking.k8s.io
No resources found.
Shouldn't these checks be more explicit, something like `.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress"`? I currently get the following error on my cluster: > no matches for kind "Ingress" in version "networking.k8s.io/v1" It seems I have networkpolicies in v1 but not ingress: ``` $ kubectl get networkpolicies.v1.networking.k8s.io No resources found. $ kubectl get ingress.v1.networking.k8s.io error: the server doesn't have a resource type "ingress" $ kubectl get ingress.v1beta1.networking.k8s.io No resources found. ```
First-time contributor

Encountered the same issue. That's because ingress has been moved to /v1 with Kubernetes 1.19+ but still in /v1beta1 in 1.18 (which I am running).

Still need to check the cluster version I guess.

Encountered the same issue. That's because ingress has been moved to /v1 with Kubernetes 1.19+ but still in /v1beta1 in 1.18 (which I am running). Still need to check the cluster version I guess.
Author
Member

will have a look at it tomorrow, thanks for finding this.

will have a look at it tomorrow, thanks for finding this.
Sign in to join this conversation.
No description provided.