turbonomic / orm

Operator Resource Mapping
Apache License 2.0
5 stars 13 forks source link

Change apiVersion from v1beta to v1 #8

Closed kevinwangcn closed 2 years ago

kevinwangcn commented 2 years ago

PR Template

Intent

To adapt to the new Kubernetes/OCP version

Background

Starting from Kubernetes v1.22 (Kubernetes API and Feature Removals In 1.22: Here’s What You Need To Know ) and OCP 4.9 (Kubernetes API and Feature Removals In 1.22: Here’s What You Need To Know ), v1beta1 version for CRDs is removed and not supported anymore.

Implementation

Change the apiVersion of the CRD and add the necessary description to follow the openAPIV3Schema syntax requirement.

Test Done

Case 1

1. Create the CRD with the new v1 version yaml file

k create -f turbo_operator_resource_mapping_crd_v1.yaml

2. Recreate all of the old ORM CR

[root@localvm ~]# k create -f oldcr.yaml 
operatorresourcemapping.turbonomic.com/authentications.operator.ibm.com created
operatorresourcemapping.turbonomic.com/certmanagers.operator.ibm.com created
operatorresourcemapping.turbonomic.com/clusterserviceversions.operators.coreos.com created
operatorresourcemapping.turbonomic.com/grafanas.operator.ibm.com created
operatorresourcemapping.turbonomic.com/mongodbs.operator.ibm.com created
operatorresourcemapping.turbonomic.com/paps.operator.ibm.com created
operatorresourcemapping.turbonomic.com/policydecisions.operator.ibm.com created

image

3. Test resizing action on the auth-pdp which is managed by the CR example-policydecision with the kind policydecisions.operator.ibm.com and then check the result

image