jx icon indicating copy to clipboard operation
jx copied to clipboard

Kubernetes v1.22 Ingress incompatible with `k8s-at-home/oauth2-proxy`

Open haysclark opened this issue 3 years ago • 0 comments

Summary

GKE no longer allows the creation of clusters running v1.21. Thus, if trying to follow the current docs: OAuth: How to protect Pipeline Visualizer with OAuth users will encounter a BootJob error.

error: unable to recognize "config-root/namespaces/jx/oauth2-proxy/oauth2-proxy-ingress.yaml": no matches for kind "Ingress" in version "extensions/v1beta1"

Steps to reproduce the behavior

Create (or use) a Kubernetes cluster v1.22 or greater with Jenkins-X v3 installed

Edit helmfiles/jx/helmfile.yaml to include:

repositories:
- name: k8s-at-home
  url: https://k8s-at-home.com/charts

And

- chart: k8s-at-home/oauth2-proxy
  version: 5.0.3
  name: oauth2-proxy
  values:
  - ../../versionStream/charts/k8s-at-home/oauth2-proxy/values.yaml.gotmpl
  - jx-values.yaml
  - extraArgs:
      provider: google
    ingress:
      annotations:
        kubernetes.io/ingress.class: nginx

Commit changes and push main or master branch.

Expected behavior

BootJob should not Error and crash.

Actual behavior

BootJob throws Error and halts.

error: unable to recognize "config-root/namespaces/jx/oauth2-proxy/oauth2-proxy-ingress.yaml": no matches for kind "Ingress" in version "extensions/v1beta1"

Jx version

The output of jx version is:

NAME               VERSION
version: 3.2.339

kubectl version

The output of kubectl version --short is:

Client Version: v1.24.0
Kustomize Version: v4.5.4
Server Version: v1.22.8-gke.201

Jenkins type

Serverless Jenkins X Pipelines (Tekton + Prow)

Kubernetes cluster

GKE

Operating system / Environment

MacOS

haysclark avatar Jun 10 '22 02:06 haysclark