stx-openstack: Deprecated apiVersion being used for Ingress resources

Bug #1980397 reported by Rafael Falcão
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Rafael Falcão

Bug Description

Brief Description:

Openstack ingress must comply with the common Ingress resource api version that is now being used by the nginx-ingress-controller app: "networking.k8s.io/v1" for the Ingress resources.
Update was based on Kubernetes release docs:

networking.k8s.io/v1beta1 == 1.14 to 1.18
networking.k8s.io/v1 = 1.19+

Severity:

Critical: stx-openstack will not be applied on stx master since nginx-controller is already using the new apiVersion by default.

Steps to Reproduce:

Install stx master +
Upload stx-openstack
Apply the stx-openstack app

Expected Behavior:

Application should be successfully applied.

Actual Behavior:

Application failed to apply due to a apiVersion mismatch between openstack and platform Ingress resources.

Reproducibility:

Reproducible

System Configuration:

N/A

Timestamp/Logs:

Logs for a failed apply of a test FluxCD stx-openstack app:

[sysadmin@controller-0 ~(keystone_admin)]$ kubectl get helmrelease -n openstack
NAME READY STATUS AGE
garbd False dependency 'openstack/ingress' is not ready 3m28s
ingress False install retries exhausted 3m28s
mariadb False dependency 'openstack/ingress' is not ready 3m28s
memcached False dependency 'openstack/mariadb' is not ready 3m28s
nginx-ports-control True Release reconciliation succeeded 3m28s
openstack-psp-rolebinding True Release reconciliation succeeded 3m28s
rabbitmq False dependency 'openstack/memcached' is not ready 3m28s

[sysadmin@controller-0 ~(keystone_admin)]$ kubectl -n openstack describe helmrelease ingress
Name: ingress
Namespace: openstack
Labels: chart_group=openstack-ingress
Annotations: <none>
API Version: helm.toolkit.fluxcd.io/v2beta1
Kind: HelmRelease
(...)
Status:
  Conditions:
    Last Transition Time: 2022-06-27T16:43:43Z
    Message: install retries exhausted
    Reason: InstallFailed
    Status: False
    Type: Ready
    Last Transition Time: 2022-06-27T16:43:43Z
    Message: Helm install failed: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Ingress" in version "networking.k8s.io/v1beta1"

Test Activity:

Developer Testing

Workaround:

None

Changed in starlingx:
assignee: nobody → Thales Elero Cervi (tcervi)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-armada-app (master)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Ghada Khalil (gkhalil)
tags: added: stx.distro.openstack
Revision history for this message
Ghada Khalil (gkhalil) wrote :

screening: stx.7.0 / high - this is required to enable stx-openstack to work with k8s 1.23

tags: added: stx.7.0
Changed in starlingx:
importance: Undecided → High
Revision history for this message
Thales Elero Cervi (tcervi) wrote :

Just to add some extra info to this problem: the situation is that "networking.k8s.io/v1beta1" no longer available on kubernetes 1.22+
There is a list of changes that need to be done for Ingres and IngressClass to be compatible with k8s 1.22+: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122

This is a mandatory update for stx-openstack to work on stx7.0/master that has now k8s 1.23 by default.

Ghada Khalil (gkhalil)
tags: added: stx.cherrypickneeded
Revision history for this message
Rafael Falcão (rafaelvfalc) wrote :

Currently solution (https://review.opendev.org/c/starlingx/openstack-armada-app/+/848753/24) enables the stx-openstack to be successfully applied. But the removal of the application is being blocked by the following issue: https://bugs.launchpad.net/starlingx/+bug/1982220

Changed in starlingx:
assignee: Thales Elero Cervi (tcervi) → Rafael Vieira Falcão (rafaelvfalc)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-armada-app (master)

Reviewed: https://review.opendev.org/c/starlingx/openstack-armada-app/+/848753
Committed: https://opendev.org/starlingx/openstack-armada-app/commit/b87a47d07053c56f00128d24a054a18b898fd3f6
Submitter: "Zuul (22348)"
Branch: master

commit b87a47d07053c56f00128d24a054a18b898fd3f6
Author: Thales Elero Cervi <email address hidden>
Date: Tue Jul 5 11:32:07 2022 -0300

    Update openstack Ingress for networking api v1

    This change patches the correct apiVersion for Ingress resources created
    by the openstack ingress chart to work correctly when stx-openstack is
    applied on stx with kubernetes 1.22+ running.

    Same applies to spec changes that need to be done according to
    io.k8s.api.networking.v1.IngressBackend [1] and
    rbac.authorization.k8s.io.v1 [2] documentations.

    Test Plan:
    PASS - Build stx-openstack armada tarball (CentOS)
    PASS - Upload stx-openstack on Stx7.0/master build
    PASS - Apply stx-openstck on a Stx7.0/master build
    PASS - Ensure openstack ingress pod is up

    NOTE:
    It could be done by upversioning openstack-helm-infra and
    openstack-helm to its latest commits (currently
    1147988b8eba6ab7d1e7af262843f641be6657ff and
    18fdc309615f335fe16ad27ab27bb91972aac75a respectively)
    but this upversion has a different series of complications
    that are being discussed in [3].

    [1] https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22
    [2] https://kubernetes.io/docs/reference/using-api/deprecation-guide/#rbac-resources-v122
    [3] https://review.opendev.org/c/starlingx/openstack-armada-app/+/848336

    Closes-Bug: 1980397

    Signed-off-by: Thales Elero Cervi <email address hidden>
    Co-authored-by: Rafael Falcao <email address hidden>
    Change-Id: I0bbecc097fdafdf5ebbc3a164b80ba903b5623f2

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Ghada Khalil (gkhalil) wrote :

No cherrypick required since this commit merged before the r/stx.7.0 branch creation on July 26.

tags: removed: stx.cherrypickneeded
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.