Description of problem: When even miltiple charts (tar.gz) in one configmap the operator is always taking the first one without using the chart name as the key for the configmap. ``` apiVersion: v1 binaryData: dpdk-kni-driver-0.0.1.tgz: ..... iavf-driver-0.0.1.tgz: ..... ice-driver-0.0.1.tgz: ..... data: index.yaml: | apiVersion: v1 entries: dpdk-kni-driver: - apiVersion: v2 appVersion: 1.0.0 created: "2021-08-31T13:21:54.255042765-04:00" description: Simple out of tree driver building using SRO digest: 74db1a39bccac21780b5aa07d1414cf74139db0b9e3c25f3ab918a3525ac1f74 icon: https://avatars.githubusercontent.com/u/55542927 name: dpdk-kni-driver type: application urls: - cm://oot-driver/charts/dpdk-kni-driver-0.0.1.tgz version: 0.0.1 iavf-driver: - apiVersion: v2 appVersion: 1.0.0 created: "2021-08-31T13:21:54.255460101-04:00" description: Simple out of tree driver building using SRO digest: 3340b764c487b0d65e99c6f3508568b90512794a409409e7b3576508c85e110b icon: https://avatars.githubusercontent.com/u/55542927 name: iavf-driver type: application urls: - cm://oot-driver/charts/iavf-driver-0.0.1.tgz version: 0.0.1 ice-driver: - apiVersion: v2 appVersion: 1.0.0 created: "2021-08-31T13:21:54.255839124-04:00" description: Simple out of tree driver building using SRO digest: be3fff26a6d96038ab2dd851789f0201515a74daec7c905097da3cba4d1ed16f icon: https://avatars.githubusercontent.com/u/55542927 name: ice-driver type: application urls: - cm://oot-driver/charts/ice-driver-0.0.1.tgz version: 0.0.1 generated: "2021-08-31T13:21:54.254398197-04:00" kind: ConfigMap metadata: creationTimestamp: "2021-08-31T17:21:54Z" name: charts namespace: oot-driver resourceVersion: "57179188" uid: 84b2bb57-4294-4fb8-920b-00450608a58f ```
Verified on OCP 4.9.0-0.nightly-2021-09-01-193941 that we can add two recipes to one chart, and deployed both from one chart, using these steps: Deploy NFD first from bundle or OperatorHub git clone https://github.com/openshift/special-resource-operator.git cd special-resource-operator Deploy SRO: TAG=master make deploy TMP=$(mktemp -d) cp charts/example/simple-kmod-0.0.1.tgz ${TMP}/. cp charts/example/ping-pong-0.0.1.tgz ${TMP}/. helm repo index ${TMP} --url=cm://simple-kmod/test-chart kubectl create ns simple-kmod --dry-run=client -o yaml | kubectl apply -f - kubectl create cm test-chart --from-file=${TMP}/index.yaml --from-file=${TMP}/simple-kmod-0.0.1.tgz --from-file=${TMP}/ping-pong-0.0.1.tgz --dry-run=client -o yaml -n simple-kmod | kubectl apply -f - then we modify the simple-kmod to use this configmap: cd charts/example/simple-kmod-0.0.1/ sed -i simple-kmod.yaml -e 's#file:///charts/example#cm://simple-kmod/test-chart#' oc apply -f ./simple-kmod.yaml Then create ping-pong from the same chart: cd ../ping-pong-0.0.1 sed -i ping-pong.yaml -e 's#file:///charts/example#cm://simple-kmod/test-chart#' oc apply -f ./ping-pong.yaml Wait a few minutes for build to complete: # oc get pods -n ping-pong NAME READY STATUS RESTARTS AGE ping-pong-client-7fd9cc6848-jnzwz 1/1 Running 0 11m ping-pong-server-7b8b5c98c4-c9vgt 1/1 Running 0 12m # oc get pods -n simple-kmod NAME READY STATUS RESTARTS AGE simple-kmod-driver-build-876ff3522a455de7-1-build 0/1 Completed 0 11m simple-kmod-driver-container-876ff3522a455de7-7xhh7 1/1 Running 0 15m simple-kmod-driver-container-876ff3522a455de7-grr22 1/1 Running 0 15m simple-kmod-driver-container-876ff3522a455de7-q856v 1/1 Running 0 15m # oc exec -it pod/simple-kmod-driver-container-876ff3522a455de7-7xhh7 -n simple-kmod -- lsmod | grep simple simple_procfs_kmod 16384 0 simple_kmod 16384 0 # oc exec -it pod/simple-kmod-driver-container-876ff3522a455de7-grr22 -n simple-kmod -- lsmod | grep simple simple_procfs_kmod 16384 0 simple_kmod 16384 0 # oc exec -it pod/simple-kmod-driver-container-876ff3522a455de7-q856v -n simple-kmod -- lsmod | grep simple simple_procfs_kmod 16384 0 simple_kmod 16384 0
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:3759