ceph: upgrade test uses rbac v1 instead of v1beta1
The upgrade tests can safely use the rbac.authorization.k8s.io/v1 instead of rbac.authorization.k8s.io/v1beta1. In K8s 1.19, the upgrade test was failing because v1beta1 has been deprecated. Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
This commit is contained in:
1 file changed
+29
-29
@@ -448,7 +448,7 @@ spec:
|
||||
// GetRookOperator returns rook Operator manifest
|
||||
func (m *CephManifestsV1_2) GetRookOperator(namespace string) string {
|
||||
return `
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: rook-ceph-system
|
||||
@@ -483,7 +483,7 @@ rules:
|
||||
verbs:
|
||||
- get
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: rook-ceph-cluster-mgmt
|
||||
@@ -496,7 +496,7 @@ aggregationRule:
|
||||
rbac.ceph.rook.io/aggregate-to-rook-ceph-cluster-mgmt: "true"
|
||||
rules: []
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: rook-ceph-cluster-mgmt-rules
|
||||
@@ -535,7 +535,7 @@ rules:
|
||||
- update
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: rook-ceph-global
|
||||
@@ -548,7 +548,7 @@ aggregationRule:
|
||||
rbac.ceph.rook.io/aggregate-to-rook-ceph-global: "true"
|
||||
rules: []
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: rook-ceph-global-rules
|
||||
@@ -660,7 +660,7 @@ rules:
|
||||
- delete
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-mgr-cluster
|
||||
aggregationRule:
|
||||
@@ -670,7 +670,7 @@ aggregationRule:
|
||||
rules: []
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-mgr-cluster-rules
|
||||
labels:
|
||||
@@ -698,7 +698,7 @@ rules:
|
||||
- watch
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-osd
|
||||
rules:
|
||||
@@ -711,7 +711,7 @@ rules:
|
||||
- list
|
||||
---
|
||||
# Aspects of Rook Ceph Agent that require access to secrets
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: rook-ceph-agent-mount
|
||||
@@ -725,7 +725,7 @@ aggregationRule:
|
||||
rules: []
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-agent-mount-rules
|
||||
labels:
|
||||
@@ -742,7 +742,7 @@ rules:
|
||||
---
|
||||
# Aspects of ceph-mgr that require access to the system namespace
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-mgr-system
|
||||
aggregationRule:
|
||||
@@ -752,7 +752,7 @@ aggregationRule:
|
||||
rules: []
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-mgr-system-rules
|
||||
labels:
|
||||
@@ -768,7 +768,7 @@ rules:
|
||||
- watch
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-object-bucket
|
||||
labels:
|
||||
@@ -799,7 +799,7 @@ rules:
|
||||
- "*"
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-object-bucket
|
||||
roleRef:
|
||||
@@ -821,7 +821,7 @@ metadata:
|
||||
storage-backend: ceph
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-system
|
||||
namespace: ` + namespace + `
|
||||
@@ -838,7 +838,7 @@ subjects:
|
||||
namespace: ` + namespace + `
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-global
|
||||
labels:
|
||||
@@ -1383,7 +1383,7 @@ metadata:
|
||||
namespace: ` + namespace + `
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-osd
|
||||
namespace: ` + namespace + `
|
||||
@@ -1397,7 +1397,7 @@ rules:
|
||||
---
|
||||
# Aspects of ceph-mgr that operate within the cluster's namespace
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-mgr
|
||||
namespace: ` + namespace + `
|
||||
@@ -1433,7 +1433,7 @@ rules:
|
||||
---
|
||||
# Allow the ceph osd to access cluster-wide resources necessary for determining their topology location
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-osd-` + namespace + `
|
||||
roleRef:
|
||||
@@ -1447,7 +1447,7 @@ subjects:
|
||||
---
|
||||
# Allow the ceph mgr to access cluster-wide resources necessary for the mgr modules
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-mgr-cluster-` + namespace + `
|
||||
roleRef:
|
||||
@@ -1460,7 +1460,7 @@ subjects:
|
||||
namespace: ` + namespace + `
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-cmd-reporter
|
||||
namespace: ` + namespace + `
|
||||
@@ -1480,7 +1480,7 @@ rules:
|
||||
---
|
||||
# Allow the operator to create resources in this cluster's namespace
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-cluster-mgmt
|
||||
namespace: ` + namespace + `
|
||||
@@ -1495,7 +1495,7 @@ subjects:
|
||||
---
|
||||
# Allow the osd pods in this namespace to work with configmaps
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-osd
|
||||
namespace: ` + namespace + `
|
||||
@@ -1510,7 +1510,7 @@ subjects:
|
||||
---
|
||||
# Allow the ceph mgr to access the cluster-specific resources necessary for the mgr modules
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-mgr
|
||||
namespace: ` + namespace + `
|
||||
@@ -1525,7 +1525,7 @@ subjects:
|
||||
---
|
||||
# Allow the ceph mgr to access the rook system resources necessary for the mgr modules
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-mgr-system ` + namespace + `
|
||||
namespace: ` + systemNamespace + `
|
||||
@@ -1539,7 +1539,7 @@ subjects:
|
||||
namespace: ` + namespace + `
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-cmd-reporter
|
||||
namespace: ` + namespace + `
|
||||
@@ -1939,7 +1939,7 @@ spec:
|
||||
func (m *CephManifestsV1_2) GetClusterExternalRoles(namespace, firstClusterNamespace string) string {
|
||||
return `apiVersion: v1
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-cluster-mgmt
|
||||
namespace: ` + namespace + `
|
||||
@@ -1953,7 +1953,7 @@ subjects:
|
||||
namespace: ` + firstClusterNamespace + `
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-cmd-reporter
|
||||
namespace: ` + namespace + `
|
||||
@@ -1973,7 +1973,7 @@ metadata:
|
||||
namespace: ` + namespace + `
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: rook-ceph-cmd-reporter
|
||||
namespace: ` + namespace + `
|
||||
|
||||
Reference in new issue
Block a user