Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ingress for k8s v1.19 #13173

Merged
merged 2 commits into from
Dec 20, 2021
Merged

fix ingress for k8s v1.19 #13173

merged 2 commits into from
Dec 20, 2021

Conversation

prezha
Copy link
Contributor

@prezha prezha commented Dec 14, 2021

fixes #13172

bonus: upgrades ingress-nginx/controller to the latest v1.1.0

example output:

❯ minikube start --kubernetes-version=v1.19.6
😄  minikube v1.24.0 on Opensuse-Tumbleweed
✨  Automatically selected the docker driver. Other choices: kvm2, ssh
💨  For improved Docker performance, enable the overlay Linux kernel module using 'modprobe overlay'
❗  docker is currently using the btrfs storage driver, consider switching to overlay2 for better performance
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🔥  Creating docker container (CPUs=2, Memory=16000MB) ...
🐳  Preparing Kubernetes v1.19.6 on Docker 20.10.11 ...
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
    ▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass

❗  /home/prezha/bin/k8s/kubectl is version 1.23.0, which may have incompatibilites with Kubernetes 1.19.6.
    ▪ Want kubectl v1.19.6? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
❯ minikube addons enable ingress
    ▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1
    ▪ Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1
    ▪ Using image k8s.gcr.io/ingress-nginx/controller:v1.1.0
🔎  Verifying ingress addon...
🌟  The 'ingress' addon is enabled
❯ kubectl get ns
NAME              STATUS   AGE
default           Active   39s
ingress-nginx     Active   25s
kube-node-lease   Active   41s
kube-public       Active   41s
kube-system       Active   41s

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 14, 2021

CLA Signed

The committers are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 14, 2021
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 14, 2021
@@ -299,7 +299,7 @@ metadata:
namespace: ingress-nginx
spec:
type: NodePort
{{- if eq .IngressAPIVersion "v1"}}
{{- if and (eq .IngressAPIVersion "v1") (not .LegacyKubernetesVersion)}}
Copy link
Member

@medyagh medyagh Dec 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could choose a better future-proof than "legacyKubernetesVersion)" , since this field is used by all other addons and in future we might have other issues with other addons , these two legacies could conflict

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer any other name than legacyKubernetesVersion.
even something as preOneTwentyKuberentes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it makes sense (and i like it!) - renamed accordingly

@medyagh
Copy link
Member

medyagh commented Dec 14, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Dec 14, 2021
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 14, 2021

CLA Signed

The committers are authorized under a signed CLA.

@medyagh
Copy link
Member

medyagh commented Dec 14, 2021

Thanks @prezha looks like u might need to redo the CLA https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/18706487/56353740/13173/#/?version=2

@prezha
Copy link
Contributor Author

prezha commented Dec 14, 2021

Thanks @prezha looks like u might need to redo the CLA https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/18706487/56353740/13173/#/?version=2

just did (2nd time!)

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13173) |
+----------------+----------+---------------------+
| minikube start | 45.5s    | 45.5s               |
| enable ingress | 28.7s    | 29.2s               |
+----------------+----------+---------------------+

Times for minikube (PR 13173) start: 45.8s 45.6s 45.2s 46.1s 44.8s
Times for minikube start: 48.7s 44.3s 44.5s 45.1s 44.9s

Times for minikube ingress: 29.1s 29.6s 27.1s 29.6s 28.1s
Times for minikube (PR 13173) ingress: 29.2s 30.6s 30.1s 30.1s 26.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13173) |
+----------------+----------+---------------------+
| minikube start | 26.7s    | 27.1s               |
| enable ingress | 22.9s    | 22.3s               |
+----------------+----------+---------------------+

Times for minikube ingress: 23.4s 23.9s 21.9s 22.9s 22.4s
Times for minikube (PR 13173) ingress: 22.9s 22.4s 21.4s 22.4s 22.4s

Times for minikube start: 26.4s 27.0s 26.8s 27.2s 26.1s
Times for minikube (PR 13173) start: 26.9s 27.0s 26.7s 28.1s 26.9s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13173) |
+----------------+----------+---------------------+
| minikube start | 44.9s    | 46.2s               |
| enable ingress | 30.2s    | 31.1s               |
+----------------+----------+---------------------+

Times for minikube ingress: 33.4s 29.9s 29.9s 28.9s 28.9s
Times for minikube (PR 13173) ingress: 29.9s 28.9s 33.4s 33.4s 29.9s

Times for minikube start: 36.4s 46.9s 46.7s 47.3s 47.4s
Times for minikube (PR 13173) start: 47.1s 48.6s 43.5s 43.6s 48.0s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
KVM_Linux TestFunctional/parallel/MountCmd/specific-port (gopogh) 0.92 (chart)
KVM_Linux TestStoppedBinaryUpgrade/MinikubeLogs (gopogh) 6.42 (chart)
KVM_Linux TestStoppedBinaryUpgrade/Upgrade (gopogh) 6.42 (chart)
Hyperkit_macOS TestMultiNode/serial/AddNode (gopogh) 7.69 (chart)
Hyperkit_macOS TestMultiNode/serial/StartAfterStop (gopogh) 7.69 (chart)
Docker_Linux_containerd TestFunctional/serial/LogsFileCmd (gopogh) 8.13 (chart)
Hyperkit_macOS TestSkaffold (gopogh) 14.29 (chart)
Hyperkit_macOS TestNetworkPlugins/group/calico/ControllerPod (gopogh) 14.61 (chart)
Hyperkit_macOS TestMountStart/serial/VerifyMountPostDelete (gopogh) 27.47 (chart)
Docker_macOS TestFunctional/serial/ComponentHealth (gopogh) 40.68 (chart)
Docker_macOS TestFunctional/serial/ExtraConfig (gopogh) 40.68 (chart)
Docker_macOS TestNetworkPlugins/group/kubenet/DNS (gopogh) 67.50 (chart)
Docker_macOS TestNetworkPlugins/group/kindnet/Start (gopogh) 73.86 (chart)
Docker_macOS TestNetworkPlugins/group/calico/Start (gopogh) 75.00 (chart)
Docker_macOS TestNetworkPlugins/group/bridge/DNS (gopogh) 78.33 (chart)
Docker_macOS TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 81.16 (chart)
Docker_macOS TestDownloadOnly/v1.16.0/preload-exists (gopogh) 99.15 (chart)

To see the flake rates of all tests by environment, click here.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: prezha, sharifelgamal

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [prezha,sharifelgamal]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dytyniuk
Copy link

Thanks @prezha
Confirmed working with K8S v1.19.6 and the most recent one 1.22.4 🙇

@prezha
Copy link
Contributor Author

prezha commented Dec 18, 2021

Thanks @prezha Confirmed working with K8S v1.19.6 and the most recent one 1.22.4 bow

excellent!
thank you, @dytyniuk for taking the time to test both old(er) and the latest versions and confirming it working!

@medyagh medyagh merged commit 8a6bf68 into kubernetes:master Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ingress: unknown field "ipFamilies" in io.k8s.api.core.v1.ServiceSpec with k8s v1.19
6 participants