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: