From fc63d6d26e46148c9c05a39ca19f2f65fe2dbd47 Mon Sep 17 00:00:00 2001 From: John Delivuk Date: Tue, 28 Jun 2022 19:30:11 -0400 Subject: [PATCH] Fix: Match Ingress API Version correctly. (#1541) * Updating conditional to match the api version and kind mend * Updating conditional to match the api version and kind mend --- .../templates/githubwebhook.ingress.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/actions-runner-controller/templates/githubwebhook.ingress.yaml b/charts/actions-runner-controller/templates/githubwebhook.ingress.yaml index 0ca81bad..922267c5 100644 --- a/charts/actions-runner-controller/templates/githubwebhook.ingress.yaml +++ b/charts/actions-runner-controller/templates/githubwebhook.ingress.yaml @@ -1,11 +1,11 @@ {{- if .Values.githubWebhookServer.ingress.enabled -}} {{- $fullName := include "actions-runner-controller-github-webhook-server.fullname" . -}} {{- $svcPort := (index .Values.githubWebhookServer.service.ports 0).port -}} -{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }} +{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} apiVersion: networking.k8s.io/v1 -{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} +{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" }} apiVersion: networking.k8s.io/v1beta1 -{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1" }} +{{- else if .Capabilities.APIVersions.Has "extensions/v1beta1/Ingress" }} apiVersion: extensions/v1beta1 {{- end }} kind: Ingress @@ -42,11 +42,11 @@ spec: {{- end }} {{- range .paths }} - path: {{ .path }} - {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} pathType: {{ .pathType }} {{- end }} backend: - {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }} service: name: {{ $fullName }} port: