Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Namespaces for kubevirt-storage-class-defaults and v2v-vmware #545

Merged
merged 4 commits into from
Aug 23, 2019

Conversation

mareklibra
Copy link
Contributor

@mareklibra mareklibra commented Aug 23, 2019

Fixes issue with changing location of ConfigMaps in different releases.

The kubevirt-storage-class-defaults ConfigMap is attempted to be retrieved from the openshift-cnv first, then from openshift in case of error.

The v2v-vmware ConfigMap is read from openshift-cnv namespace first, then from kubevirt-hyperconverged.

The KubevirtVmwareConfigMap was supposed to be well-named and present
in a single namespace only.

As this requirement has changed, this patch introduces searching for the
ConfigMap in a list of namespaces while respecting their order.
The `kubevirt-storage-class-defaults` config map was supposed to be
well-named and present in a single namespace only.

As this requirement has changed, this patch introduces searching for the
ConfigMap in a list of namespaces while respecting their order.
@mareklibra mareklibra changed the title Config maps in multiple ns Namespaces for kubevirt-storage-class-defaults and v2v-vmware Aug 23, 2019
@coveralls
Copy link

coveralls commented Aug 23, 2019

Pull Request Test Coverage Report for Build 2278

  • 20 of 33 (60.61%) changed or added relevant lines in 7 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.05%) to 82.802%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/k8s/requests/storageClass/storageClassConfigMap.js 12 13 92.31%
src/k8s/requests/v2v/importVmware.js 0 1 0.0%
src/k8s/requests/v2v/startV2VvmwareController.js 0 1 0.0%
src/k8s/requests/v2v/vmwareConfigMap.js 3 13 23.08%
Files with Coverage Reduction New Missed Lines %
src/k8s/requests/v2v/startV2VvmwareController.js 1 11.86%
Totals Coverage Status
Change from base Build 2275: -0.05%
Covered Lines: 4187
Relevant Lines: 4842

💛 - Coveralls


export const getVmwareConfigMap = async props => {
// query namespaces sequentially to respect order
for (let index = 0; index < VMWARE_KUBEVIRT_VMWARE_CONFIG_MAP_NAMESPACES.length; index++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get that the warns are different, but can we make at least this part generic? and add the comment from getVmwareConfigMapInNamespace to this function?

@atiratree atiratree merged commit ebde69b into kubevirt:master Aug 23, 2019
@fabiand
Copy link
Member

fabiand commented Aug 23, 2019

The best way to find the config map is to look for the namespace of the HCO CR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants