openstack-armada-app/openstack-helm/files/0016-Update-RBAC-authorization-api-to-v1.patch
Thales Elero Cervi 541ba72c88 Partial FluxCD version of stx-openstack: compute
This is continuing previous work [1] of the openstack app
migration to FluxCD, adding compute-kit related charts.
This change includes the following charts:
libvirt, nova, nova-api-proxy, pci-irq-affinity-agent, neutron,
placement and openvswitch.

In order to complete the fluxcd migration it was also necessary to
remove the openstack-helm Patch0016, made to fix an intermttent issue
and only compatible to Armada (helmv2 and old operators). It does not
fix a major issue and should be safe to be removed for a while during
this migration. Its FluxCD version will be tracked by Task 46426,
probably implemented using the current cinder-clean job as an example.

Test Plan:
PASS - build-helm-charts.sh builds a basic FluxCD app tarball
PASS - application upload and overrides generated
PASS - application apply/remove/delete

[1] https://review.opendev.org/c/starlingx/openstack-armada-app/+/848166

Story: 2009138
Task: 45462

Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: I78b78058e874d9eae7051ca0cb5a1fe09b2726a3
2022-09-27 09:45:26 -03:00

50 lines
1.8 KiB
Diff

From 9d324a8f04154ad5f2a5f0271b62d6a6f6f5686b Mon Sep 17 00:00:00 2001
From: Rafael Falcao <rafael.vieirafalcao@windriver.com>
Date: Mon, 18 Jul 2022 11:26:46 -0300
Subject: [PATCH] Update RBAC authorization api to v1
This change patches the correct apiVersion for RBAC authorization resources
to work correctly when stx-openstack is applied on stx with kubernetes 1.22+
running [1]. This fix is part of the solution of the problem described in [2].
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 that nova related pods are up
[1] https://kubernetes.io/docs/reference/using-api/deprecation-guide/#rbac-resources-v122
[2] https://bugs.launchpad.net/starlingx/+bug/1980397
Signed-off-by: Rafael Falcao <rafael.vieirafalcao@windriver.com>
Change-Id: I1c62e24d6baf34953770336f18b4f185cdf33139
---
nova/templates/job-storage-init.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nova/templates/job-storage-init.yaml b/nova/templates/job-storage-init.yaml
index f3850b4b..e79b05ea 100644
--- a/nova/templates/job-storage-init.yaml
+++ b/nova/templates/job-storage-init.yaml
@@ -18,7 +18,7 @@ limitations under the License.
{{- $serviceAccountName := "nova-storage-init" }}
{{ tuple $envAll "storage_init" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
---
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ $serviceAccountName }}
@@ -33,7 +33,7 @@ rules:
- update
- patch
---
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ $serviceAccountName }}
--
2.25.1