api icon indicating copy to clipboard operation
api copied to clipboard

ClusterServiceVersionValidator is not raising errors when the annotations are duplicated

Open camilamacedo86 opened this issue 2 years ago • 3 comments

Description ClusterServiceVersionValidator is not raising errors when the annotations are duplicated The e.g scenario can be found in: https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/1121/files#diff-c0ad3966e15bf1757f16f02b664a3093ebf00f0e74956753ee48de223996268c

See that community is calling the bundle to validate and it does not fail when the CSV defined the annotations twice:

apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  annotations:
    alm-examples: '[]'
    capabilities: Basic Install
    categories: Application Runtime, Monitoring, Security
    certified: "false"
    containerImage: quay.io/deployment-validation-operator/dv-operator:0.2.2
    createdAt: 12/14/2021
    description: The deployment validation operator
    repository: https://github.com/app-sre/deployment-validation-operator
    support: Best Effort
  name: deployment-validation-operator.v0.2.2
  annotations:
    ignore-check.kube-linter.io/minimum-three-replicas: "This deployment uses 1 pod as currently replicating does not replicate metric data causing installation issues"
spec:

camilamacedo86 avatar Apr 27 '22 09:04 camilamacedo86

@ryantking this issue was reported by the Community CVP and we need to check this scenario to fix it on the checks. c/c @mvalarh @jozzi

camilamacedo86 avatar Apr 27 '22 09:04 camilamacedo86

I suppose sdk should check if yaml is valid and also if csv is valid so can be correctly displayed in catalog

J0zi avatar Apr 27 '22 10:04 J0zi

@ryantking do you think that you could give us a hand with this one?

camilamacedo86 avatar May 19 '22 11:05 camilamacedo86