Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-18678

[2091309] While disabling a golden image via HCO, user should not be required to enter the whole spec.

XMLWordPrintable

    • CNV I/U Operators Sprint 220
    • No

      Description of problem: As per upstream documentation: https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/docs/cluster-configuration.md#disabling-a-common-golden-image, while disabling a data import cron, user should not have to enter the whole spec of the dataimportcrontemplate. But currently the validation fails if the whole spec is not provided

      Version-Release number of selected component (if applicable):
      4.11.0

      How reproducible:
      100%

      Steps to Reproduce:
      1. Edit hco and attempt to disable any golden image with only metadata section with annotation and name.
      2. HCO rejects the update
      3.

      Actual results:
      ==========

      1. Please edit the object below. Lines beginning with a '#' will be ignored,
      2. and an empty file will abort the edit. If an error occurs while saving this file will be
      3. reopened with the relevant failures.
        #
      4. hyperconvergeds.hco.kubevirt.io "kubevirt-hyperconverged" was not valid:
      5. * <nil>: Invalid value: "The edited file failed validation": ValidationError(HyperConverged.spec.dataImportCronTemplates[0]): missing required field "spec" in io.kubevirt.hco.v1beta1.HyperConverged.spec.dataImportCronTemplates
        #
        apiVersion: hco.kubevirt.io/v1beta1
        kind: HyperConverged
        metadata:
        creationTimestamp: "2022-05-20T01:42:08Z"
        finalizers:
      • kubevirt.io/hyperconverged
        generation: 38
        labels:
        app: kubevirt-hyperconverged
        name: kubevirt-hyperconverged
        namespace: openshift-cnv
        resourceVersion: "23952285"
        uid: fc316af2-13e5-48c0-990d-24d2cda71b7c
        spec:
        dataImportCronTemplates:
      • metadata:
        annotations:
        cdi.kubevirt.io/storage.bind.immediate.requested: "true"
        dataimportcrontemplate.kubevirt.io/enable: 'false'
        name: centos-7-image-cron
        certConfig:
        ca:
        duration: 48h0m0s
        renewBefore: 24h0m0s
        server:
        duration: 24h0m0s
        renewBefore: 12h0m0s
        featureGates:
        deployTektonTaskResources: false
        enableCommonBootImageImport: true
        nonRoot: true
        sriovLiveMigration: true
        withHostPassthroughCPU: false
        liveMigrationConfig:
        ======================

      Expected results:
      User should not have to provide the whole spec and metadata section of a golden image while disabling it

      Additional info:

              nunnatsa Nahshon Unna Tsameret
              rhn-support-dbasunag Debarati Basu-Nag
              Debarati Basu-Nag Debarati Basu-Nag
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: