@rancher/shell 0.3.9 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/assets/translations/en-us.yaml +19 -24
  2. package/assets/translations/zh-hans.yaml +82 -16
  3. package/chart/istio.vue +11 -11
  4. package/chart/rancher-backup/S3.vue +1 -1
  5. package/components/AsyncButton.vue +2 -2
  6. package/components/ButtonGroup.vue +1 -1
  7. package/components/CompoundStatusBadge.vue +1 -1
  8. package/components/CopyCode.vue +1 -1
  9. package/components/DetailText.vue +1 -0
  10. package/components/DetailTop.vue +1 -1
  11. package/components/ExplorerProjectsNamespaces.vue +3 -3
  12. package/components/GlobalRoleBindings.vue +1 -1
  13. package/components/HarvesterServiceAddOnConfig.vue +2 -117
  14. package/components/ResourceDetail/Masthead.vue +1 -1
  15. package/components/ResourceList/Masthead.vue +0 -6
  16. package/components/ResourceList/ResourceLoadingIndicator.vue +1 -9
  17. package/components/ResourceList/index.vue +7 -6
  18. package/components/ResourceTable.vue +13 -3
  19. package/components/SortableTable/THead.vue +4 -3
  20. package/components/SortableTable/index.vue +3 -3
  21. package/components/Tabbed/Tab.vue +1 -1
  22. package/components/Tabbed/index.vue +1 -1
  23. package/components/Wizard.vue +9 -6
  24. package/components/__tests__/NamespaceFilter.test.ts +26 -7
  25. package/components/auth/RoleDetailEdit.vue +1 -1
  26. package/components/auth/SelectPrincipal.vue +1 -1
  27. package/components/fleet/FleetRepos.vue +1 -1
  28. package/components/form/ArrayList.vue +1 -1
  29. package/components/form/ChangePassword.vue +3 -0
  30. package/components/form/KeyValue.vue +3 -2
  31. package/components/form/Labels.vue +34 -14
  32. package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
  33. package/components/form/NameNsDescription.vue +1 -1
  34. package/components/form/PlusMinus.vue +2 -2
  35. package/components/form/Probe.vue +1 -1
  36. package/components/form/ProjectMemberEditor.vue +8 -4
  37. package/components/form/ResourceQuota/NamespaceRow.vue +1 -1
  38. package/components/form/ServicePorts.vue +2 -2
  39. package/components/form/Tolerations.vue +30 -3
  40. package/components/form/WorkloadPorts.vue +2 -1
  41. package/components/form/__tests__/KeyValue.test.ts +17 -0
  42. package/components/formatter/ClusterLink.vue +3 -3
  43. package/components/formatter/LiveDate.vue +1 -1
  44. package/components/formatter/PodImages.vue +1 -1
  45. package/components/formatter/RKETemplateName.vue +1 -1
  46. package/components/formatter/Shortened.vue +1 -1
  47. package/components/nav/Header.vue +7 -7
  48. package/components/nav/NamespaceFilter.vue +103 -54
  49. package/config/labels-annotations.js +8 -5
  50. package/config/settings.ts +2 -5
  51. package/config/types.js +6 -4
  52. package/core/plugin-routes.ts +26 -7
  53. package/core/plugins-loader.js +2 -0
  54. package/detail/helm.cattle.io.projecthelmchart.vue +2 -2
  55. package/detail/provisioning.cattle.io.cluster.vue +4 -4
  56. package/edit/cis.cattle.io.clusterscan.vue +1 -1
  57. package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +19 -149
  58. package/edit/logging-flow/index.vue +2 -2
  59. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +12 -0
  60. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +12 -0
  61. package/edit/management.cattle.io.project.vue +7 -0
  62. package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -1
  63. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +2 -2
  64. package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +11 -8
  65. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +2 -2
  66. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -4
  67. package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.spec.ts +140 -0
  68. package/edit/networking.k8s.io.networkpolicy/__tests__/utils/mock.json +158 -0
  69. package/edit/networking.k8s.io.networkpolicy/__tests__/utils/selectors.ts +45 -0
  70. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  71. package/edit/provisioning.cattle.io.cluster/AgentConfiguration.vue +1 -1
  72. package/edit/provisioning.cattle.io.cluster/MachinePool.vue +1 -1
  73. package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +1 -1
  74. package/edit/provisioning.cattle.io.cluster/RegistryMirrors.vue +2 -2
  75. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +143 -169
  76. package/edit/provisioning.cattle.io.cluster/rke2.vue +15 -6
  77. package/edit/resources.cattle.io.restore.vue +2 -2
  78. package/edit/service.vue +22 -3
  79. package/edit/storage.k8s.io.storageclass/index.vue +1 -1
  80. package/edit/token.vue +1 -0
  81. package/edit/workload/Job.vue +2 -2
  82. package/edit/workload/index.vue +1 -1
  83. package/edit/workload/mixins/workload.js +7 -1
  84. package/edit/workload/storage/__tests__/Storage.test.ts +84 -5
  85. package/initialize/index.js +1 -0
  86. package/layouts/default.vue +1 -1
  87. package/mixins/resource-fetch-namespaced.js +19 -27
  88. package/mixins/resource-fetch.js +0 -5
  89. package/models/__tests__/namespace.test.ts +125 -0
  90. package/models/management.cattle.io.project.js +6 -1
  91. package/models/persistentvolume.js +1 -1
  92. package/models/workload.service.js +22 -7
  93. package/package.json +17 -5
  94. package/pages/account/index.vue +3 -0
  95. package/pages/auth/login.vue +46 -49
  96. package/pages/c/_cluster/apps/charts/chart.vue +1 -1
  97. package/pages/c/_cluster/apps/charts/install.vue +42 -51
  98. package/pages/c/_cluster/explorer/index.vue +1 -1
  99. package/pages/c/_cluster/monitoring/index.vue +1 -1
  100. package/pages/c/_cluster/settings/performance.vue +53 -18
  101. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +1 -1
  102. package/pages/c/_cluster/uiplugins/index.vue +16 -5
  103. package/pages/home.vue +1 -1
  104. package/pkg/vue.config.js +1 -0
  105. package/plugins/clean-html-directive.js +1 -1
  106. package/plugins/clean-tooltip-directive.js +33 -0
  107. package/plugins/dashboard-store/actions.js +4 -2
  108. package/plugins/dashboard-store/getters.js +6 -0
  109. package/plugins/dashboard-store/mutations.js +2 -2
  110. package/plugins/plugin.js +6 -1
  111. package/plugins/steve/actions.js +1 -1
  112. package/plugins/steve/getters.js +14 -3
  113. package/plugins/steve/resourceWatcher.js +36 -62
  114. package/plugins/steve/subscribe.js +164 -21
  115. package/plugins/steve/worker/index.js +8 -1
  116. package/plugins/steve/worker/web-worker.advanced.js +26 -8
  117. package/plugins/steve/worker/web-worker.basic.js +23 -4
  118. package/rancher-components/components/Form/Checkbox/Checkbox.vue +2 -2
  119. package/rancher-components/components/Form/Radio/RadioGroup.vue +2 -2
  120. package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +1 -1
  121. package/store/index.js +16 -61
  122. package/store/store-types.js +5 -0
  123. package/store/type-map.js +1 -1
  124. package/types/shell/index.d.ts +23 -7
  125. package/utils/__tests__/create-yaml.test.ts +63 -0
  126. package/utils/array.ts +4 -0
  127. package/utils/create-yaml.js +5 -5
  128. package/utils/namespace-filter.js +17 -5
  129. package/utils/projectAndNamespaceFiltering.utils.ts +62 -0
  130. package/utils/selector.js +6 -5
  131. package/utils/settings.ts +5 -7
  132. package/models/k8s.cni.cncf.io.networkattachmentdefinition.js +0 -93
@@ -1,8 +1,80 @@
1
1
  import { mount } from '@vue/test-utils';
2
2
  import rke2 from '@shell/edit/provisioning.cattle.io.cluster/rke2.vue';
3
3
 
4
+ /**
5
+ * DISCLAIMER ***************************************************************************************
6
+ * Declarations should not be done outside the tests!!
7
+ * This component is overwhelming for test and requires too much initialization.
8
+ * In this way the tests are more readable and we can avoid annoying repetitions.
9
+ ****************************************************************************************************
10
+ */
11
+ const defaultStubs = {
12
+ CruResource: { template: '<div><slot></slot></div>' }, // Required to render the slot content
13
+ Banner: true,
14
+ LabeledSelect: true,
15
+ ACE: true,
16
+ AgentEnv: true,
17
+ ArrayList: true,
18
+ ArrayListGrouped: true,
19
+ BadgeState: true,
20
+ Checkbox: true,
21
+ ClusterMembershipEditor: true,
22
+ DrainOptions: true,
23
+ LabeledInput: true,
24
+ Labels: true,
25
+ Loading: true,
26
+ MachinePool: true,
27
+ MatchExpressions: true,
28
+ NameNsDescription: true,
29
+ Questions: true,
30
+ RadioGroup: true,
31
+ RegistryConfigs: true,
32
+ RegistryMirrors: true,
33
+ S3Config: true,
34
+ SelectCredential: true,
35
+ SelectOrCreateAuthSecret: true,
36
+ Tab: true,
37
+ Tabbed: true,
38
+ UnitInput: true,
39
+ YamlEditor: true,
40
+ };
41
+
42
+ const defaultComputed = {
43
+ showForm() {
44
+ return true;
45
+ },
46
+ showk8s21LegacyWarning() {
47
+ return false;
48
+ },
49
+ };
50
+
51
+ const defaultGetters = {
52
+ currentStore: () => 'current_store',
53
+ 'management/schemaFor': jest.fn(),
54
+ 'current_store/all': jest.fn(),
55
+ 'i18n/t': jest.fn(),
56
+ 'i18n/withFallback': jest.fn(),
57
+ };
58
+
59
+ const defaultMocks = {
60
+ $fetchState: { pending: false },
61
+ $route: {
62
+ name: 'anything',
63
+ query: { AS: 'yaml' },
64
+ },
65
+ };
66
+
67
+ const defaultSpec = {
68
+ rkeConfig: { etcd: { disableSnapshots: false } },
69
+ chartValues: {},
70
+ };
71
+
4
72
  describe('component: rke2', () => {
5
- // Disable existing log to avoid pollution
73
+ /**
74
+ * DISCLAIMER ***************************************************************************************
75
+ * Logs are prevented to avoid polluting the test output.
76
+ ****************************************************************************************************
77
+ */
6
78
  // eslint-disable-next-line jest/no-hooks
7
79
  beforeEach(() => {
8
80
  jest.spyOn(console, 'log').mockImplementation(() => {});
@@ -23,76 +95,25 @@ describe('component: rke2', () => {
23
95
  mode: 'create',
24
96
  value: {
25
97
  spec: {
26
- rkeConfig: { etcd: { disableSnapshots: false } },
27
- chartValues: {},
98
+ ...defaultSpec,
28
99
  defaultPodSecurityAdmissionConfigurationTemplateName: label,
29
100
  kubernetesVersion: k8s
30
101
  }
31
102
  },
32
103
  provider: 'whatever',
33
- resource: {}
34
104
  },
35
- computed: {
36
- showForm() {
37
- return true;
38
- },
39
- hasMachinePools() {
40
- return false;
41
- },
42
- showk8s21LegacyWarning() {
43
- return false;
44
- },
45
- },
46
- mocks: {
47
- $fetchState: { pending: false },
48
- $route: {
49
- name: 'anything',
50
- query: { AS: 'yaml' },
51
- },
105
+ computed: defaultComputed,
106
+ mocks: {
107
+ ...defaultMocks,
52
108
  $store: {
53
- getters: {
54
- currentStore: () => 'current_store',
55
- 'management/schemaFor': jest.fn(),
56
- 'current_store/all': jest.fn(),
57
- 'i18n/t': jest.fn(),
58
- 'i18n/withFallback': jest.fn(),
59
- },
109
+ getters: defaultGetters,
60
110
  dispatch: {
61
111
  'management/find': jest.fn(),
62
112
  'management/findAll': () => ([option]),
63
113
  }
64
114
  },
65
115
  },
66
- stubs: {
67
- CruResource: { template: '<div><slot></slot></div>' }, // Required to render the slot content
68
- Banner: true,
69
- LabeledSelect: true,
70
- ACE: true,
71
- AgentEnv: true,
72
- ArrayList: true,
73
- ArrayListGrouped: true,
74
- BadgeState: true,
75
- Checkbox: true,
76
- ClusterMembershipEditor: true,
77
- DrainOptions: true,
78
- LabeledInput: true,
79
- Labels: true,
80
- Loading: true,
81
- MachinePool: true,
82
- MatchExpressions: true,
83
- NameNsDescription: true,
84
- Questions: true,
85
- RadioGroup: true,
86
- RegistryConfigs: true,
87
- RegistryMirrors: true,
88
- S3Config: true,
89
- SelectCredential: true,
90
- SelectOrCreateAuthSecret: true,
91
- Tab: true,
92
- Tabbed: true,
93
- UnitInput: true,
94
- YamlEditor: true,
95
- }
116
+ stubs: defaultStubs
96
117
  });
97
118
 
98
119
  const select = wrapper.find('[data-testid="rke2-custom-edit-psa"]');
@@ -115,76 +136,25 @@ describe('component: rke2', () => {
115
136
  mode: 'create',
116
137
  value: {
117
138
  spec: {
118
- rkeConfig: { etcd: { disableSnapshots: false } },
119
- chartValues: {},
139
+ ...defaultSpec,
120
140
  defaultPodSecurityAdmissionConfigurationTemplateName: label,
121
141
  kubernetesVersion: k8s
122
142
  }
123
143
  },
124
144
  provider: 'whatever',
125
- resource: {}
126
- },
127
- computed: {
128
- showForm() {
129
- return true;
130
- },
131
- hasMachinePools() {
132
- return false;
133
- },
134
- showk8s21LegacyWarning() {
135
- return false;
136
- },
137
145
  },
138
- mocks: {
139
- $fetchState: { pending: false },
140
- $route: {
141
- name: 'anything',
142
- query: { AS: 'yaml' },
143
- },
146
+ computed: defaultComputed,
147
+ mocks: {
148
+ ...defaultMocks,
144
149
  $store: {
145
- getters: {
146
- currentStore: () => 'current_store',
147
- 'management/schemaFor': jest.fn(),
148
- 'current_store/all': jest.fn(),
149
- 'i18n/t': jest.fn(),
150
- 'i18n/withFallback': jest.fn(),
151
- },
150
+ getters: defaultGetters,
152
151
  dispatch: {
153
152
  'management/find': jest.fn(),
154
153
  'management/findAll': () => ([option]),
155
154
  }
156
155
  },
157
156
  },
158
- stubs: {
159
- CruResource: { template: '<div><slot></slot></div>' }, // Required to render the slot content
160
- Banner: true,
161
- LabeledSelect: true,
162
- ACE: true,
163
- AgentEnv: true,
164
- ArrayList: true,
165
- ArrayListGrouped: true,
166
- BadgeState: true,
167
- Checkbox: true,
168
- ClusterMembershipEditor: true,
169
- DrainOptions: true,
170
- LabeledInput: true,
171
- Labels: true,
172
- Loading: true,
173
- MachinePool: true,
174
- MatchExpressions: true,
175
- NameNsDescription: true,
176
- Questions: true,
177
- RadioGroup: true,
178
- RegistryConfigs: true,
179
- RegistryMirrors: true,
180
- S3Config: true,
181
- SelectCredential: true,
182
- SelectOrCreateAuthSecret: true,
183
- Tab: true,
184
- Tabbed: true,
185
- UnitInput: true,
186
- YamlEditor: true,
187
- }
157
+ stubs: defaultStubs
188
158
  });
189
159
 
190
160
  const select = wrapper.find('[data-testid="rke2-custom-edit-psa"]');
@@ -206,25 +176,15 @@ describe('component: rke2', () => {
206
176
  value: {
207
177
  agentConfig: { profile: cis },
208
178
  spec: {
209
- rkeConfig: { etcd: { disableSnapshots: false } },
210
- chartValues: {},
179
+ ...defaultSpec,
211
180
  defaultPodSecurityAdmissionConfigurationTemplateName: label,
212
181
  kubernetesVersion: k8s
213
182
  }
214
183
  },
215
184
  provider: 'custom',
216
- resource: {}
217
185
  },
218
186
  computed: {
219
- showForm() {
220
- return true;
221
- },
222
- hasMachinePools() {
223
- return false;
224
- },
225
- showk8s21LegacyWarning() {
226
- return false;
227
- },
187
+ ...defaultComputed,
228
188
  agentArgs: () => ({ profile: { options: [cis] } }),
229
189
  versionOptions: () => [
230
190
  {
@@ -236,55 +196,16 @@ describe('component: rke2', () => {
236
196
  ]
237
197
  },
238
198
  mocks: {
239
- $fetchState: { pending: false },
240
- $route: {
241
- name: 'anything',
242
- query: { AS: 'yaml' },
243
- },
199
+ ...defaultMocks,
244
200
  $store: {
245
- getters: {
246
- currentStore: () => 'current_store',
247
- 'management/schemaFor': jest.fn(),
248
- 'current_store/all': jest.fn(),
249
- 'i18n/t': jest.fn(),
250
- 'i18n/withFallback': jest.fn(),
251
- },
201
+ getters: defaultGetters,
252
202
  dispatch: {
253
203
  'management/find': jest.fn(),
254
204
  'management/findAll': () => ([option]),
255
205
  }
256
206
  },
257
207
  },
258
- stubs: {
259
- CruResource: { template: '<div><slot></slot></div>' }, // Required to render the slot content
260
- Banner: true,
261
- LabeledSelect: true,
262
- ACE: true,
263
- AgentEnv: true,
264
- ArrayList: true,
265
- ArrayListGrouped: true,
266
- BadgeState: true,
267
- Checkbox: true,
268
- ClusterMembershipEditor: true,
269
- DrainOptions: true,
270
- LabeledInput: true,
271
- Labels: true,
272
- Loading: true,
273
- MachinePool: true,
274
- MatchExpressions: true,
275
- NameNsDescription: true,
276
- Questions: true,
277
- RadioGroup: true,
278
- RegistryConfigs: true,
279
- RegistryMirrors: true,
280
- S3Config: true,
281
- SelectCredential: true,
282
- SelectOrCreateAuthSecret: true,
283
- Tab: true,
284
- Tabbed: true,
285
- UnitInput: true,
286
- YamlEditor: true,
287
- }
208
+ stubs: defaultStubs
288
209
  });
289
210
 
290
211
  wrapper.setData({ cisOverride: override });
@@ -293,4 +214,57 @@ describe('component: rke2', () => {
293
214
 
294
215
  expect((select.vm as unknown as any).disabled).toBe(disabled);
295
216
  });
217
+
218
+ it.each([
219
+ ['custom', true],
220
+ ['anything else', false] // without proper data, machine pool is always not present
221
+ ])('should allow creation of RKE2 cluster with provider %p if pool machines are missing (%p)', (provider, result) => {
222
+ const k8s = 'v1.25.0+rke2r1';
223
+ const wrapper = mount(rke2, {
224
+ propsData: {
225
+ mode: 'create',
226
+ value: {
227
+ spec: {
228
+ ...defaultSpec,
229
+ kubernetesVersion: k8s,
230
+
231
+ }
232
+ },
233
+ provider,
234
+ },
235
+ computed: defaultComputed,
236
+ mocks: {
237
+ ...defaultMocks,
238
+ $store: { getters: defaultGetters },
239
+ },
240
+ stubs: defaultStubs
241
+ });
242
+
243
+ expect(wrapper.vm.validationPassed()).toBe(result);
244
+ });
245
+
246
+ it('should allow creation of K3 clusters if pool machines are missing', () => {
247
+ const k8s = 'v1.25.0+k3s1';
248
+ const wrapper = mount(rke2, {
249
+ propsData: {
250
+ mode: 'create',
251
+ value: {
252
+ spec: {
253
+ ...defaultSpec,
254
+ kubernetesVersion: k8s
255
+ }
256
+ },
257
+ provider: 'custom'
258
+ },
259
+ data: () => ({ credentialId: 'I am authenticated' }),
260
+ computed: defaultComputed,
261
+ mocks: {
262
+ ...defaultMocks,
263
+ $store: { getters: defaultGetters },
264
+ },
265
+ stubs: defaultStubs
266
+ });
267
+
268
+ expect(wrapper.vm.validationPassed()).toBe(true);
269
+ });
296
270
  });
@@ -718,7 +718,7 @@ export default {
718
718
  },
719
719
 
720
720
  unremovedMachinePools() {
721
- return this.machinePools.filter(x => !x.remove);
721
+ return (this.machinePools || []).filter(x => !x.remove);
722
722
  },
723
723
 
724
724
  machineConfigSchema() {
@@ -1133,6 +1133,10 @@ export default {
1133
1133
  return isRequiredVersion;
1134
1134
  },
1135
1135
 
1136
+ /**
1137
+ * Get machine pools from the cluster configuration
1138
+ * this.value.spec.rkeConfig.machinePools
1139
+ */
1136
1140
  async initMachinePools(existing) {
1137
1141
  const out = [];
1138
1142
 
@@ -2029,6 +2033,11 @@ export default {
2029
2033
 
2030
2034
  this.previousKubernetesVersion = value;
2031
2035
  }
2036
+
2037
+ // If Harvester driver, reset cloud provider if not compatible
2038
+ if (this.isHarvesterDriver && this.mode === _CREATE && this.isHarvesterIncompatible) {
2039
+ this.setHarvesterDefaultCloudProvider();
2040
+ }
2032
2041
  }
2033
2042
  },
2034
2043
 
@@ -2120,21 +2129,21 @@ export default {
2120
2129
  class="pull-right"
2121
2130
  >
2122
2131
  <BadgeState
2123
- v-tooltip="nodeTotals.tooltip.etcd"
2132
+ v-clean-tooltip="nodeTotals.tooltip.etcd"
2124
2133
  :color="nodeTotals.color.etcd"
2125
2134
  :icon="nodeTotals.icon.etcd"
2126
2135
  :label="nodeTotals.label.etcd"
2127
2136
  class="mr-10"
2128
2137
  />
2129
2138
  <BadgeState
2130
- v-tooltip="nodeTotals.tooltip.controlPlane"
2139
+ v-clean-tooltip="nodeTotals.tooltip.controlPlane"
2131
2140
  :color="nodeTotals.color.controlPlane"
2132
2141
  :icon="nodeTotals.icon.controlPlane"
2133
2142
  :label="nodeTotals.label.controlPlane"
2134
2143
  class="mr-10"
2135
2144
  />
2136
2145
  <BadgeState
2137
- v-tooltip="nodeTotals.tooltip.worker"
2146
+ v-clean-tooltip="nodeTotals.tooltip.worker"
2138
2147
  :color="nodeTotals.color.worker"
2139
2148
  :icon="nodeTotals.icon.worker"
2140
2149
  :label="nodeTotals.label.worker"
@@ -2551,7 +2560,7 @@ export default {
2551
2560
  <h3>
2552
2561
  {{ t('cluster.rke2.address.header') }}
2553
2562
  <i
2554
- v-tooltip="t('cluster.rke2.address.tooltip')"
2563
+ v-clean-tooltip="t('cluster.rke2.address.tooltip')"
2555
2564
  class="icon icon-info"
2556
2565
  />
2557
2566
  </h3>
@@ -2843,7 +2852,7 @@ export default {
2843
2852
  <h3>
2844
2853
  {{ t('cluster.addOns.additionalManifest.title') }}
2845
2854
  <i
2846
- v-tooltip="t('cluster.addOns.additionalManifest.tooltip')"
2855
+ v-clean-tooltip="t('cluster.addOns.additionalManifest.tooltip')"
2847
2856
  class="icon icon-info"
2848
2857
  />
2849
2858
  </h3>
@@ -274,7 +274,7 @@ export default {
274
274
  >
275
275
  <template #label>
276
276
  <span
277
- v-tooltip="t('backupRestoreOperator.prune.tip')"
277
+ v-clean-tooltip="t('backupRestoreOperator.prune.tip')"
278
278
  class="text-label"
279
279
  >
280
280
  {{ t('backupRestoreOperator.prune.label') }} <i class="icon icon-info" />
@@ -290,7 +290,7 @@ export default {
290
290
  >
291
291
  <template #label>
292
292
  <label
293
- v-tooltip="t('backupRestoreOperator.deleteTimeout.tip')"
293
+ v-clean-tooltip="t('backupRestoreOperator.deleteTimeout.tip')"
294
294
  class="has-tooltip"
295
295
  >
296
296
  {{ t('backupRestoreOperator.deleteTimeout.label') }} <i class="icon icon-info" />
package/edit/service.vue CHANGED
@@ -20,12 +20,13 @@ import { Banner } from '@components/Banner';
20
20
  import Labels from '@shell/components/form/Labels';
21
21
  import HarvesterServiceAddOnConfig from '@shell/components/HarvesterServiceAddOnConfig';
22
22
  import { clone } from '@shell/utils/object';
23
- import { POD, CAPI } from '@shell/config/types';
23
+ import { POD, CAPI, HCI } from '@shell/config/types';
24
24
  import { matching } from '@shell/utils/selector';
25
25
  import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
26
26
  import { allHash } from '@shell/utils/promise';
27
27
  import { isHarvesterSatisfiesVersion } from '@shell/utils/cluster';
28
28
  import { Port } from '@shell/utils/validators/formRules';
29
+ import { HCI as HCI_LABELS_ANNOTATIONS } from '@shell/config/labels-annotations';
29
30
 
30
31
  const SESSION_AFFINITY_ACTION_VALUES = {
31
32
  NONE: 'None',
@@ -268,8 +269,9 @@ export default {
268
269
  const inStore = this.$store.getters['currentStore'](POD);
269
270
 
270
271
  const hash = {
271
- provClusters: this.$store.dispatch('management/findAll', { type: CAPI.RANCHER_CLUSTER }),
272
- pods: this.$store.dispatch(`${ inStore }/findAll`, { type: POD }),
272
+ provClusters: this.$store.dispatch('management/findAll', { type: CAPI.RANCHER_CLUSTER }),
273
+ pods: this.$store.dispatch(`${ inStore }/findAll`, { type: POD }),
274
+ harvesterConfigs: this.$store.dispatch(`management/findAll`, { type: HCI.HARVESTER_CONFIG }),
273
275
  };
274
276
 
275
277
  const res = await allHash(hash);
@@ -313,6 +315,23 @@ export default {
313
315
  if (ports && ports.length > 0) {
314
316
  this.value.spec.ports = this.targetPortsStrOrInt(this.value.spec.ports);
315
317
  }
318
+
319
+ if (this.showHarvesterAddOnConfig) {
320
+ const clusters = this.$store.getters['management/all'](CAPI.RANCHER_CLUSTER);
321
+ const configs = this.$store.getters['management/all'](HCI.HARVESTER_CONFIG);
322
+ const cluster = clusters.find(c => c.status.clusterName === this.currentCluster.id);
323
+
324
+ const machinePools = cluster?.spec?.rkeConfig?.machinePools || [];
325
+ const machineConfigName = machinePools[0]?.machineConfigRef?.name;
326
+ const config = configs.find(c => c.id === `fleet-default/${ machineConfigName }`);
327
+
328
+ if (config) {
329
+ const { vmNamespace, networkName } = config;
330
+
331
+ this.value.metadata.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_NAMESPACE] = vmNamespace;
332
+ this.value.metadata.annotations[HCI_LABELS_ANNOTATIONS.CLOUD_PROVIDER_NETWORK] = networkName;
333
+ }
334
+ }
316
335
  },
317
336
  },
318
337
  };
@@ -125,7 +125,7 @@ export default {
125
125
  if (driver.metadata.name === LONGHORN_DRIVER || provisionerOptionsDrivers.includes(driver.metadata.name)) {
126
126
  return;
127
127
  }
128
- const fallback = `${ driver.metadata.name } ${ this.t('persistentVolume.csi.drivers.suffix') }`;
128
+ const fallback = `${ driver.metadata.name } ${ this.t('persistentVolume.csi.suffix') }`;
129
129
 
130
130
  dropdownOptions.push({
131
131
  value: driver.metadata.name,
package/edit/token.vue CHANGED
@@ -273,6 +273,7 @@ export default {
273
273
  <div class="right">
274
274
  <button
275
275
  type="button"
276
+ data-testid="token_done_create_button"
276
277
  class="btn role-primary"
277
278
  @click="doneCreate"
278
279
  >
@@ -265,7 +265,7 @@ export default {
265
265
  >
266
266
  {{ t('workload.upgrading.terminationGracePeriodSeconds.label') }}
267
267
  <i
268
- v-tooltip="t('workload.upgrading.terminationGracePeriodSeconds.tip')"
268
+ v-clean-tooltip="t('workload.upgrading.terminationGracePeriodSeconds.tip')"
269
269
  class="icon icon-info"
270
270
  />
271
271
  </label>
@@ -326,7 +326,7 @@ export default {
326
326
  >
327
327
  {{ t('workload.upgrading.terminationGracePeriodSeconds.label') }}
328
328
  <i
329
- v-tooltip="t('workload.upgrading.terminationGracePeriodSeconds.tip')"
329
+ v-clean-tooltip="t('workload.upgrading.terminationGracePeriodSeconds.tip')"
330
330
  class="icon icon-info"
331
331
  />
332
332
  </label>
@@ -252,7 +252,7 @@ export default {
252
252
  <h3>
253
253
  {{ t('workload.container.ports.expose') }}
254
254
  <i
255
- v-tooltip="t('workload.container.ports.toolTip')"
255
+ v-clean-tooltip="t('workload.container.ports.toolTip')"
256
256
  class="icon icon-info"
257
257
  />
258
258
  </h3>
@@ -12,6 +12,7 @@ import {
12
12
  CAPI,
13
13
  POD,
14
14
  LIST_WORKLOAD_TYPES,
15
+ HCI,
15
16
  } from '@shell/config/types';
16
17
  import Tab from '@shell/components/Tabbed/Tab';
17
18
  import CreateEditView from '@shell/mixins/create-edit-view';
@@ -49,6 +50,7 @@ import NameNsDescription from '@shell/components/form/NameNsDescription';
49
50
  import formRulesGenerator from '@shell/utils/validators/formRules';
50
51
  import { TYPES as SECRET_TYPES } from '@shell/models/secret';
51
52
  import { defaultContainer } from '@shell/models/workload';
53
+ import { allHash } from '@shell/utils/promise';
52
54
 
53
55
  const TAB_WEIGHT_MAP = {
54
56
  general: 99,
@@ -143,7 +145,11 @@ export default {
143
145
  },
144
146
 
145
147
  async fetch() {
146
- await this.$store.dispatch('management/findAll', { type: CAPI.RANCHER_CLUSTER });
148
+ // TODO Should remove these lines
149
+ await allHash({
150
+ rancherClusters: this.$store.dispatch('management/findAll', { type: CAPI.RANCHER_CLUSTER }),
151
+ harvesterConfigs: this.$store.dispatch('management/findAll', { type: HCI.HARVESTER_CONFIG }),
152
+ });
147
153
 
148
154
  // don't block UI for these resources
149
155
  this.resourceManagerFetchSecondaryResources(this.secondaryResourceData);