-
Bug
-
Resolution: Done
-
Blocker
-
ACM 2.9.2
-
None
-
False
-
None
-
False
-
-
-
Critical
-
No
Description of problem:
When deploying an helm chart with this version pattern such as "1.7", the helm chart deployment is blocked due to the version regex validation defined in subscription CRD
The version regex validation pattern:
([0-9])((\.[0-9])(\.[0-9])|(\.[0-9])?(\.[xX]))$
With this pattern, only the following version patterns are matched
4.0.0
4.0.x
4.0.X
4.x
4.X
Since this doesn't follow the semVer guideline, we have decided to remove the validation check from subscription CRD since ACM 2.10
The Jira issue is created to backport the fix to 2.9.Z
Impact:
The customer helm chart with version 1.7 is blocked to be deployed by ACM appsub model.
Version-Release number of selected component (if applicable):
ACM 2.9.Z
How reproducible:
1. deploy the following ACM subscription yaml. The subscription is to deploy a mortgage helm chart with version 1.7 to a remote cluster
apiVersion: v1 kind: Namespace metadata: name: ns-sub-1 --- apiVersion: v1 kind: Namespace metadata: name: ns-ch --- apiVersion: apps.open-cluster-management.io/v1 kind: PlacementRule metadata: name: towhichcluster namespace: ns-sub-1 spec: clusterSelector: matchExpressions: - key: name operator: In values: - ruici210-10050-mc ====> change to your remote cluster name --- apiVersion: apps.open-cluster-management.io/v1 kind: Channel metadata: name: predev-ch namespace: ns-ch labels: app: mortgage spec: type: HelmRepo pathname: https://raw.githubusercontent.com/xiangjingli/test-helm-charts/main/ --- apiVersion: apps.open-cluster-management.io/v1 kind: Subscription metadata: name: mortgage namespace: ns-sub-1 labels: app: mortgage spec: channel: ns-ch/predev-ch name: mortgage packageFilter: version: "1.7" placement: placementRef: kind: PlacementRule name: towhichcluster
Actual results:
Without the fix, the subscription CR is not allowed to be applied
Expected results:
With the fix, the subscription CR is allowed to be applied. And 3 resources bundled in the mortgage app (configmap, service, deployment) are expected to be deployed to the given remote cluster.
% kubectl get appsubstatus -n ns-sub-1 mortgage -o yaml apiVersion: apps.open-cluster-management.io/v1alpha1 kind: SubscriptionStatus metadata: creationTimestamp: "2024-03-11T03:21:55Z" generation: 3 labels: apps.open-cluster-management.io/cluster: ruici210-10050-mc apps.open-cluster-management.io/hosting-subscription: ns-sub-1.mortgage name: mortgage namespace: ns-sub-1 resourceVersion: "4075750" uid: a3d82e81-6ccd-46b2-8f45-fc5032397b6a statuses: packages: - apiVersion: v1 kind: ConfigMap lastUpdateTime: "2024-03-11T03:21:56Z" name: mortgage-3df88-configmap namespace: ns-sub-1 phase: Deployed - apiVersion: v1 kind: Service lastUpdateTime: "2024-03-11T03:21:56Z" name: mortgage namespace: ns-sub-1 phase: Deployed - apiVersion: apps/v1 kind: Deployment lastUpdateTime: "2024-03-11T03:21:56Z" name: mortgage namespace: ns-sub-1 phase: Deployed