Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-60163

siteconfig to clusterinstance tool does not also automate conversion of extra manifests in conjunction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • 4.20
    • GitOps ZTP
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Important
    • None
    • None
    • Proposed
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      The siteconfig to clusterinstance tool does not convert extra-manifests to
      corresponding configmaps that reference the target manifests, thus the current
      solution is only partially automated and will not scale.
          

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

      
          

      How reproducible:

      Always
          

      Steps to Reproduce:

          1. Download ZTP container
          2. Run the siteconfig-converter tool from the container with options on a target siteconfig YAML file 
          3. Observe output files and messages generated by tool
          

      Actual results:

      tool outputs this message:
      
      Successfully read SiteConfig: helix80/site-plan-helix80
      Converted cluster 1 (helix80) to ClusterInstance: /scin/helix80/helix80.yaml
      WARNING: extraManifestPath field 'sno-extra-manifest/' is not supported in ClusterInstance and will be ignored. Create one or more configmaps with the exact desired set of CRs for the cluster and include them in the extraManifestsRefs.
      WARNING: Added default extraManifest ConfigMap 'helix80' to extraManifestsRefs. This configmap should be created and is expected to contain the correct set of manifests for the cluster which must match the content generated by the extraManifests content from the original SiteConfig. This tool can't validate that expectation
      Successfully converted 1 cluster(s) to ClusterInstance files in /scin/helix80
      
          

      Expected results:

      Tool converts extra manifest references to a kustomize.yaml snippet for the user, example:
      
      #For extra manifests tree:
      
      extra-manifest
      ├── 01-container-mount-ns-and-kubelet-conf-master.yaml
      ├── 01-container-mount-ns-and-kubelet-conf-worker.yaml
      ├── 01-disk-encryption-pcr-rebind-master.yaml
      ├── 01-disk-encryption-pcr-rebind-worker.yaml
      ├── 03-sctp-machine-config-master.yaml
      ├── 03-sctp-machine-config-worker.yaml
      ├── 04-rh-internal-icsp.yaml
      ├── 06-kdump-master.yaml
      ├── 06-kdump-worker.yaml
      ├── 07-sriov-related-kernel-args-master.yaml
      ├── 07-sriov-related-kernel-args-worker.yaml
      ├── 08-set-rcu-normal-master.yaml
      ├── 08-set-rcu-normal-worker.yaml
      ├── 09-openshift-marketplace-ns.yaml
      ├── 99-crio-disable-wipe-master.yaml
      ├── 99-crio-disable-wipe-worker.yaml
      ├── 99-sync-time-once-master.yaml
      ├── 99-sync-time-once-worker.yaml
      ├── disk-encryption.yaml.tmpl
      ├── enable-crun-master.yaml
      ├── enable-crun-worker.yaml
      └── image-registry-partition-mc.yaml.tmpl
      
      #Given the following generated reference in the new clusterinstance YAML:
      
      spec:
        extraManifestsRefs:
          - name: extra-manifest-cm
      
      #Generate kustomize.yaml snippet like this with paths relative to the
      #clusterinstance file If the clusterinstance YAML file is generated to a
      #different directory, then the file paths will need to be relative to the
      #clusterinstance YAML file, by copying the files, or an another approach
      
      apiVersion: kustomize.config.k8s.io/v1beta1
      kind: Kustomization
      
      configMapGenerator:
        - files:
            - extra-manifest/01-container-mount-ns-and-kubelet-conf-master.yaml
            - extra-manifest/01-container-mount-ns-and-kubelet-conf-worker.yaml
            - extra-manifest/01-disk-encryption-pcr-rebind-master.yaml
            - extra-manifest/01-disk-encryption-pcr-rebind-worker.yaml
            - extra-manifest/03-sctp-machine-config-master.yaml
            - extra-manifest/03-sctp-machine-config-worker.yaml
            - extra-manifest/04-rh-internal-icsp.yaml
            - extra-manifest/06-kdump-master.yaml
            - extra-manifest/06-kdump-worker.yaml
            - extra-manifest/07-sriov-related-kernel-args-master.yaml
            - extra-manifest/07-sriov-related-kernel-args-worker.yaml
            - extra-manifest/08-set-rcu-normal-master.yaml
            - extra-manifest/08-set-rcu-normal-worker.yaml
            - extra-manifest/09-openshift-marketplace-ns.yaml
            - extra-manifest/99-crio-disable-wipe-master.yaml
            - extra-manifest/99-crio-disable-wipe-worker.yaml
            - extra-manifest/99-sync-time-once-master.yaml
            - extra-manifest/99-sync-time-once-worker.yaml
            - extra-manifest/enable-crun-master.yaml
            - extra-manifest/enable-crun-worker.yaml
          name: extra-manifest-cm
          namespace: the-cluster-ns
      
          

      Additional info:

      
          

              saskari@redhat.com Saeid Askari
              rhn-support-dgonyier Dwaine Gonyier
              None
              None
              Dwaine Gonyier Dwaine Gonyier
              None
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: