@rancher/shell 3.0.7 → 3.0.8-rc.2
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.
- package/assets/images/vendor/githubapp.svg +13 -0
- package/assets/styles/base/_typography.scss +1 -1
- package/assets/styles/global/_layout.scss +21 -35
- package/assets/styles/themes/_modern.scss +5 -5
- package/assets/translations/en-us.yaml +102 -17
- package/assets/translations/zh-hans.yaml +0 -4
- package/components/EmberPage.vue +1 -1
- package/components/Inactivity.vue +222 -106
- package/components/InstallHelmCharts.vue +2 -2
- package/components/Resource/Detail/CopyToClipboard.vue +1 -1
- package/components/Resource/Detail/TitleBar/__tests__/index.test.ts +0 -2
- package/components/Resource/Detail/TitleBar/index.vue +10 -6
- package/components/ResourceDetail/index.vue +4 -1
- package/components/SortableTable/index.vue +18 -2
- package/components/{nav/WindowManager → Window}/ContainerLogs.vue +1 -1
- package/components/{nav/WindowManager → Window}/ContainerLogsActions.vue +1 -0
- package/components/{nav/WindowManager → Window}/__tests__/ContainerLogs.test.ts +1 -1
- package/components/{nav/WindowManager → Window}/__tests__/ContainerShell.test.ts +2 -2
- package/components/fleet/FleetConfigMapSelector.vue +117 -0
- package/components/fleet/FleetSecretSelector.vue +127 -0
- package/components/fleet/__tests__/FleetConfigMapSelector.test.ts +125 -0
- package/components/fleet/__tests__/FleetSecretSelector.test.ts +82 -0
- package/components/form/FileImageSelector.vue +13 -4
- package/components/form/FileSelector.vue +11 -2
- package/components/form/ResourceLabeledSelect.vue +1 -0
- package/components/form/__tests__/ResourceLabeledSelect.test.ts +90 -0
- package/components/nav/Header.vue +34 -13
- package/components/{DraggableZone.vue → nav/WindowManager/PinArea.vue} +47 -80
- package/components/nav/WindowManager/composables/useComponentsMount.ts +70 -0
- package/components/nav/WindowManager/composables/useDimensionsHandler.ts +105 -0
- package/components/nav/WindowManager/composables/useDragHandler.ts +99 -0
- package/components/nav/WindowManager/composables/usePanelHandler.ts +72 -0
- package/components/nav/WindowManager/composables/usePanelsHandler.ts +14 -0
- package/components/nav/WindowManager/composables/useResizeHandler.ts +167 -0
- package/components/nav/WindowManager/composables/useTabsHandler.ts +51 -0
- package/components/nav/WindowManager/constants.ts +23 -0
- package/components/nav/WindowManager/index.vue +61 -575
- package/components/nav/WindowManager/panels/HorizontalPanel.vue +265 -0
- package/components/nav/WindowManager/panels/TabBodyContainer.vue +39 -0
- package/components/nav/WindowManager/panels/VerticalPanel.vue +308 -0
- package/components/templates/default.vue +4 -40
- package/components/templates/home.vue +31 -5
- package/config/product/auth.js +1 -0
- package/config/query-params.js +1 -0
- package/config/settings.ts +8 -1
- package/config/store.js +4 -2
- package/config/types.js +2 -0
- package/detail/pod.vue +1 -0
- package/dialog/AddonConfigConfirmationDialog.vue +45 -1
- package/directives/ui-context.ts +97 -0
- package/edit/__tests__/fleet.cattle.io.helmop.test.ts +52 -11
- package/edit/auth/AuthProviderWarningBanners.vue +14 -1
- package/edit/auth/github-app-steps.vue +97 -0
- package/edit/auth/github-steps.vue +75 -0
- package/edit/auth/github.vue +94 -65
- package/edit/fleet.cattle.io.helmop.vue +51 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +15 -5
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +11 -9
- package/edit/provisioning.cattle.io.cluster/rke2.vue +56 -9
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +28 -2
- package/initialize/install-directives.js +2 -0
- package/list/projectsecret.vue +1 -1
- package/machine-config/azure.vue +1 -1
- package/mixins/chart.js +1 -1
- package/models/__tests__/chart.test.ts +17 -9
- package/models/__tests__/compliance.cattle.io.clusterscanprofile.spec.js +30 -0
- package/models/catalog.cattle.io.app.js +1 -1
- package/models/chart.js +3 -1
- package/models/compliance.cattle.io.clusterscanprofile.js +1 -1
- package/models/management.cattle.io.authconfig.js +1 -0
- package/package.json +2 -2
- package/pages/auth/login.vue +5 -2
- package/pages/auth/verify.vue +1 -1
- package/pages/c/_cluster/apps/charts/AppChartCardSubHeader.vue +3 -2
- package/pages/c/_cluster/apps/charts/chart.vue +2 -2
- package/pages/c/_cluster/explorer/EventsTable.vue +89 -3
- package/pages/c/_cluster/explorer/tools/index.vue +3 -3
- package/pages/c/_cluster/settings/performance.vue +12 -25
- package/pages/home.vue +313 -12
- package/plugins/axios.js +2 -1
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/resource-class.js +17 -2
- package/plugins/steve/steve-pagination-utils.ts +2 -2
- package/rancher-components/RcDropdown/RcDropdownItemSelect.vue +5 -1
- package/scripts/extension/publish +1 -1
- package/store/auth.js +8 -3
- package/store/aws.js +8 -6
- package/store/features.js +1 -0
- package/store/index.js +9 -3
- package/store/prefs.js +6 -0
- package/store/ui-context.ts +86 -0
- package/store/wm.ts +244 -0
- package/types/kube/kube-api.ts +2 -1
- package/types/rancher/index.d.ts +1 -0
- package/types/resources/settings.d.ts +29 -7
- package/types/shell/index.d.ts +59 -0
- package/types/window-manager.ts +22 -0
- package/utils/__tests__/cluster.test.ts +379 -1
- package/utils/cluster.js +157 -3
- package/utils/dynamic-content/__tests__/config.test.ts +187 -0
- package/utils/dynamic-content/__tests__/index.test.ts +390 -0
- package/utils/dynamic-content/__tests__/info.test.ts +263 -0
- package/utils/dynamic-content/__tests__/new-release.test.ts +216 -0
- package/utils/dynamic-content/__tests__/support-notice.test.ts +262 -0
- package/utils/dynamic-content/__tests__/util.test.ts +235 -0
- package/utils/dynamic-content/config.ts +55 -0
- package/utils/dynamic-content/index.ts +273 -0
- package/utils/dynamic-content/info.ts +219 -0
- package/utils/dynamic-content/new-release.ts +126 -0
- package/utils/dynamic-content/support-notice.ts +169 -0
- package/utils/dynamic-content/types.d.ts +101 -0
- package/utils/dynamic-content/util.ts +122 -0
- package/utils/dynamic-importer.js +2 -2
- package/utils/inactivity.ts +104 -0
- package/utils/pagination-utils.ts +19 -4
- package/utils/release-notes.ts +1 -1
- package/assets/images/icons/document.svg +0 -3
- package/store/wm.js +0 -95
- /package/components/{nav/WindowManager → Window}/ChartReadme.vue +0 -0
- /package/components/{nav/WindowManager → Window}/ContainerShell.vue +0 -0
- /package/components/{nav/WindowManager → Window}/KubectlShell.vue +0 -0
- /package/components/{nav/WindowManager → Window}/MachineSsh.vue +0 -0
- /package/components/{nav/WindowManager → Window}/Window.vue +0 -0
package/edit/auth/github.vue
CHANGED
|
@@ -4,16 +4,15 @@ import CreateEditView from '@shell/mixins/create-edit-view';
|
|
|
4
4
|
import CruResource from '@shell/components/CruResource';
|
|
5
5
|
import { RadioGroup } from '@components/Form/Radio';
|
|
6
6
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
7
|
-
import CopyToClipboard from '@shell/components/CopyToClipboard';
|
|
8
7
|
import AllowedPrincipals from '@shell/components/auth/AllowedPrincipals';
|
|
9
8
|
import { MANAGEMENT } from '@shell/config/types';
|
|
10
9
|
import { findBy } from '@shell/utils/array';
|
|
11
10
|
import AuthConfig from '@shell/mixins/auth-config';
|
|
12
11
|
import AuthBanner from '@shell/components/auth/AuthBanner';
|
|
13
|
-
import InfoBox from '@shell/components/InfoBox';
|
|
14
12
|
import AuthProviderWarningBanners from '@shell/edit/auth/AuthProviderWarningBanners';
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
import FileSelector from '@shell/components/form/FileSelector';
|
|
14
|
+
import GithubSteps from '@shell/edit/auth/github-steps.vue';
|
|
15
|
+
import GithubAppSteps from '@shell/edit/auth/github-app-steps.vue';
|
|
17
16
|
|
|
18
17
|
export default {
|
|
19
18
|
components: {
|
|
@@ -21,11 +20,12 @@ export default {
|
|
|
21
20
|
CruResource,
|
|
22
21
|
RadioGroup,
|
|
23
22
|
LabeledInput,
|
|
24
|
-
CopyToClipboard,
|
|
25
23
|
AllowedPrincipals,
|
|
26
24
|
AuthBanner,
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
AuthProviderWarningBanners,
|
|
26
|
+
FileSelector,
|
|
27
|
+
GithubSteps,
|
|
28
|
+
GithubAppSteps,
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
mixins: [CreateEditView, AuthConfig],
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
},
|
|
61
61
|
|
|
62
62
|
displayName() {
|
|
63
|
-
return this.t(`model.authConfig.provider.${ NAME }`);
|
|
63
|
+
return this.t(`model.authConfig.provider.${ this.NAME }`);
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
tArgs() {
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
},
|
|
74
74
|
|
|
75
75
|
NAME() {
|
|
76
|
-
return
|
|
76
|
+
return this.isGithubApp ? 'githubapp' : 'github';
|
|
77
77
|
},
|
|
78
78
|
|
|
79
79
|
AUTH_CONFIG() {
|
|
@@ -86,7 +86,27 @@ export default {
|
|
|
86
86
|
githubConfig: this.model,
|
|
87
87
|
description: 'Enable GitHub',
|
|
88
88
|
};
|
|
89
|
-
}
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
isGithubApp() {
|
|
92
|
+
return this.model?.id === 'githubapp';
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
steps() {
|
|
96
|
+
return this.isGithubApp ? GithubAppSteps : GithubSteps;
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
validationPassed() {
|
|
100
|
+
if (!this.model.clientId || !this.model.clientSecret) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (this.isGithubApp && (!this.model.appId || !this.model.privateKey)) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return true;
|
|
109
|
+
},
|
|
90
110
|
|
|
91
111
|
},
|
|
92
112
|
|
|
@@ -109,6 +129,10 @@ export default {
|
|
|
109
129
|
this.model.hostname = match[4] || 'github.com';
|
|
110
130
|
}
|
|
111
131
|
},
|
|
132
|
+
|
|
133
|
+
updatePrivateKey(content) {
|
|
134
|
+
this.model.privateKey = content;
|
|
135
|
+
},
|
|
112
136
|
},
|
|
113
137
|
};
|
|
114
138
|
</script>
|
|
@@ -122,7 +146,7 @@ export default {
|
|
|
122
146
|
:mode="mode"
|
|
123
147
|
:resource="model"
|
|
124
148
|
:subtypes="[]"
|
|
125
|
-
:validation-passed="
|
|
149
|
+
:validation-passed="validationPassed"
|
|
126
150
|
:finish-button-mode="model.enabled ? 'edit' : 'enable'"
|
|
127
151
|
:can-yaml="false"
|
|
128
152
|
:errors="errors"
|
|
@@ -139,7 +163,7 @@ export default {
|
|
|
139
163
|
>
|
|
140
164
|
<template #rows>
|
|
141
165
|
<tr><td>{{ t(`authConfig.${ NAME }.table.server`) }}: </td><td>{{ baseUrl }}</td></tr>
|
|
142
|
-
<tr><td>{{ t(`authConfig.${ NAME }.table.clientId`) }}: </td><td>{{
|
|
166
|
+
<tr><td>{{ t(`authConfig.${ NAME }.table.clientId`) }}: </td><td>{{ model.clientId }}</td></tr>
|
|
143
167
|
</template>
|
|
144
168
|
</AuthBanner>
|
|
145
169
|
|
|
@@ -156,7 +180,17 @@ export default {
|
|
|
156
180
|
<AuthProviderWarningBanners
|
|
157
181
|
v-if="!model.enabled"
|
|
158
182
|
:t-args="tArgs"
|
|
159
|
-
|
|
183
|
+
>
|
|
184
|
+
<template
|
|
185
|
+
v-if="isGithubApp"
|
|
186
|
+
#additional-warning
|
|
187
|
+
>
|
|
188
|
+
<span
|
|
189
|
+
v-clean-html="t(`authConfig.${NAME}.warning`, {}, true)"
|
|
190
|
+
data-testid="github-app-banner"
|
|
191
|
+
/>
|
|
192
|
+
</template>
|
|
193
|
+
</AuthProviderWarningBanners>
|
|
160
194
|
|
|
161
195
|
<h3 v-t="`authConfig.${NAME}.target.label`" />
|
|
162
196
|
<RadioGroup
|
|
@@ -182,60 +216,18 @@ export default {
|
|
|
182
216
|
</div>
|
|
183
217
|
</div>
|
|
184
218
|
|
|
185
|
-
<
|
|
186
|
-
:
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.1`, tArgs, true)" />
|
|
191
|
-
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.2`, tArgs, true)" />
|
|
192
|
-
<li v-clean-html="t(`authConfig.${NAME}.form.prefix.3`, tArgs, true)" />
|
|
193
|
-
</ul>
|
|
194
|
-
</InfoBox>
|
|
195
|
-
<InfoBox
|
|
196
|
-
:step="2"
|
|
197
|
-
class="step-box"
|
|
198
|
-
>
|
|
199
|
-
<ul class="step-list">
|
|
200
|
-
<li>
|
|
201
|
-
{{ t(`authConfig.${NAME}.form.instruction`, tArgs, true) }}
|
|
202
|
-
<ul class="mt-10">
|
|
203
|
-
<li><b>{{ t(`authConfig.${NAME}.form.app.label`) }}</b>: <span v-clean-html="t(`authConfig.${NAME}.form.app.value`, tArgs, true)" /></li>
|
|
204
|
-
<li>
|
|
205
|
-
<b>{{ t(`authConfig.${NAME}.form.homepage.label`) }}</b>: {{ serverUrl }} <CopyToClipboard
|
|
206
|
-
label-as="tooltip"
|
|
207
|
-
:text="serverUrl"
|
|
208
|
-
class="icon-btn"
|
|
209
|
-
action-color="bg-transparent"
|
|
210
|
-
/>
|
|
211
|
-
</li>
|
|
212
|
-
<li><b>{{ t(`authConfig.${NAME}.form.description.label`) }}</b>: <span v-clean-html="t(`authConfig.${NAME}.form.description.value`, tArgs, true)" /></li>
|
|
213
|
-
<li>
|
|
214
|
-
<b>{{ t(`authConfig.${NAME}.form.callback.label`) }}</b>: {{ serverUrl }} <CopyToClipboard
|
|
215
|
-
:text="serverUrl"
|
|
216
|
-
label-as="tooltip"
|
|
217
|
-
class="icon-btn"
|
|
218
|
-
action-color="bg-transparent"
|
|
219
|
-
/>
|
|
220
|
-
</li>
|
|
221
|
-
</ul>
|
|
222
|
-
</li>
|
|
223
|
-
</ul>
|
|
224
|
-
</InfoBox>
|
|
225
|
-
<InfoBox
|
|
226
|
-
:step="3"
|
|
227
|
-
class="mb-20"
|
|
228
|
-
>
|
|
229
|
-
<ul class="step-list">
|
|
230
|
-
<li v-clean-html="t(`authConfig.${NAME}.form.suffix.1`, tArgs, true)" />
|
|
231
|
-
<li v-clean-html="t(`authConfig.${NAME}.form.suffix.2`, tArgs, true)" />
|
|
232
|
-
</ul>
|
|
233
|
-
</InfoBox>
|
|
219
|
+
<component
|
|
220
|
+
:is="steps"
|
|
221
|
+
:t-args="tArgs"
|
|
222
|
+
:name="NAME"
|
|
223
|
+
/>
|
|
234
224
|
|
|
235
225
|
<div class="row mb-20">
|
|
236
226
|
<div class="col span-6">
|
|
237
227
|
<LabeledInput
|
|
238
228
|
v-model:value="model.clientId"
|
|
229
|
+
required
|
|
230
|
+
data-testid="client-id"
|
|
239
231
|
:label="t(`authConfig.${NAME}.clientId.label`)"
|
|
240
232
|
:mode="mode"
|
|
241
233
|
/>
|
|
@@ -243,21 +235,58 @@ export default {
|
|
|
243
235
|
<div class="col span-6">
|
|
244
236
|
<LabeledInput
|
|
245
237
|
v-model:value="model.clientSecret"
|
|
238
|
+
required
|
|
239
|
+
data-testid="client-secret"
|
|
246
240
|
type="password"
|
|
247
241
|
:label="t(`authConfig.${NAME}.clientSecret.label`)"
|
|
248
242
|
:mode="mode"
|
|
249
243
|
/>
|
|
250
244
|
</div>
|
|
251
245
|
</div>
|
|
246
|
+
<template v-if="isGithubApp">
|
|
247
|
+
<div class="row mb-20">
|
|
248
|
+
<div class="col span-6">
|
|
249
|
+
<LabeledInput
|
|
250
|
+
v-model:value="model.appId"
|
|
251
|
+
required
|
|
252
|
+
data-testid="app-id"
|
|
253
|
+
:label="t(`authConfig.${NAME}.githubAppId.label`)"
|
|
254
|
+
:mode="mode"
|
|
255
|
+
/>
|
|
256
|
+
</div>
|
|
257
|
+
<div class="col span-6">
|
|
258
|
+
<LabeledInput
|
|
259
|
+
v-model:value="model.installationId"
|
|
260
|
+
data-testid="installation-id"
|
|
261
|
+
:label="t(`authConfig.${NAME}.installationId.label`)"
|
|
262
|
+
:mode="mode"
|
|
263
|
+
/>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
<div class="row mb-20">
|
|
267
|
+
<div class="col span-6">
|
|
268
|
+
<LabeledInput
|
|
269
|
+
v-model:value="model.privateKey"
|
|
270
|
+
required
|
|
271
|
+
data-testid="private-key"
|
|
272
|
+
type="multiline"
|
|
273
|
+
:label="t(`authConfig.${NAME}.privateKey.label`)"
|
|
274
|
+
:mode="mode"
|
|
275
|
+
/>
|
|
276
|
+
<FileSelector
|
|
277
|
+
class="btn btn-sm role-secondary mt-10"
|
|
278
|
+
:label="t('generic.readFromFile')"
|
|
279
|
+
@selected="updatePrivateKey"
|
|
280
|
+
/>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
</template>
|
|
252
284
|
</template>
|
|
253
285
|
</CruResource>
|
|
254
286
|
</div>
|
|
255
287
|
</template>
|
|
256
288
|
|
|
257
289
|
<style lang="scss" scoped>
|
|
258
|
-
.step-list li:not(:last-child) {
|
|
259
|
-
margin-bottom: 8px;
|
|
260
|
-
}
|
|
261
290
|
.banner {
|
|
262
291
|
display: block;
|
|
263
292
|
|
|
@@ -29,6 +29,8 @@ import UnitInput from '@shell/components/form/UnitInput';
|
|
|
29
29
|
import FleetClusterTargets from '@shell/components/fleet/FleetClusterTargets/index.vue';
|
|
30
30
|
import { toSeconds } from '@shell/utils/duration';
|
|
31
31
|
import FleetValuesFrom from '@shell/components/fleet/FleetValuesFrom.vue';
|
|
32
|
+
import FleetSecretSelector from '@shell/components/fleet/FleetSecretSelector.vue';
|
|
33
|
+
import FleetConfigMapSelector from '@shell/components/fleet/FleetConfigMapSelector.vue';
|
|
32
34
|
|
|
33
35
|
const MINIMUM_POLLING_INTERVAL = 15;
|
|
34
36
|
|
|
@@ -50,6 +52,8 @@ export default {
|
|
|
50
52
|
Checkbox,
|
|
51
53
|
CruResource,
|
|
52
54
|
FleetClusterTargets,
|
|
55
|
+
FleetConfigMapSelector,
|
|
56
|
+
FleetSecretSelector,
|
|
53
57
|
FleetValuesFrom,
|
|
54
58
|
YamlEditor,
|
|
55
59
|
LabeledInput,
|
|
@@ -230,7 +234,15 @@ export default {
|
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
return null;
|
|
233
|
-
}
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
downstreamSecretsList() {
|
|
240
|
+
return (this.value.spec.helm.downstreamResources || []).filter((r) => r.kind === 'Secret').map((r) => r.name);
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
downstreamConfigMapsList() {
|
|
244
|
+
return (this.value.spec.helm.downstreamResources || []).filter((r) => r.kind === 'ConfigMap').map((r) => r.name);
|
|
245
|
+
},
|
|
234
246
|
},
|
|
235
247
|
|
|
236
248
|
watch: {
|
|
@@ -429,7 +441,24 @@ export default {
|
|
|
429
441
|
}];
|
|
430
442
|
break;
|
|
431
443
|
}
|
|
432
|
-
}
|
|
444
|
+
},
|
|
445
|
+
|
|
446
|
+
updateDownstreamResources(kind, list) {
|
|
447
|
+
switch (kind) {
|
|
448
|
+
case 'Secret':
|
|
449
|
+
this.value.spec.helm.downstreamResources = [
|
|
450
|
+
...(this.value.spec.helm.downstreamResources || []).filter((r) => r.kind !== 'Secret'),
|
|
451
|
+
...(list || []).map((name) => ({ name, kind: 'Secret' })),
|
|
452
|
+
];
|
|
453
|
+
break;
|
|
454
|
+
case 'ConfigMap':
|
|
455
|
+
this.value.spec.helm.downstreamResources = [
|
|
456
|
+
...(this.value.spec.helm.downstreamResources || []).filter((r) => r.kind !== 'ConfigMap'),
|
|
457
|
+
...(list || []).map((name) => ({ name, kind: 'ConfigMap' })),
|
|
458
|
+
];
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
},
|
|
433
462
|
},
|
|
434
463
|
};
|
|
435
464
|
</script>
|
|
@@ -711,6 +740,26 @@ export default {
|
|
|
711
740
|
|
|
712
741
|
<h2 v-t="'fleet.helmOp.resources.label'" />
|
|
713
742
|
|
|
743
|
+
<div class="row mt-20 mb-20">
|
|
744
|
+
<div class="col span-6">
|
|
745
|
+
<FleetSecretSelector
|
|
746
|
+
:value="downstreamSecretsList"
|
|
747
|
+
:namespace="value.metadata.namespace"
|
|
748
|
+
:mode="mode"
|
|
749
|
+
@update:value="updateDownstreamResources('Secret', $event)"
|
|
750
|
+
/>
|
|
751
|
+
</div>
|
|
752
|
+
</div>
|
|
753
|
+
<div class="row mt-20 mb-20">
|
|
754
|
+
<div class="col span-6">
|
|
755
|
+
<FleetConfigMapSelector
|
|
756
|
+
:value="downstreamConfigMapsList"
|
|
757
|
+
:namespace="value.metadata.namespace"
|
|
758
|
+
:mode="mode"
|
|
759
|
+
@update:value="updateDownstreamResources('ConfigMap', $event)"
|
|
760
|
+
/>
|
|
761
|
+
</div>
|
|
762
|
+
</div>
|
|
714
763
|
<div class="resource-handling mb-30">
|
|
715
764
|
<Checkbox
|
|
716
765
|
v-model:value="correctDriftEnabled"
|
|
@@ -149,25 +149,35 @@ export default {
|
|
|
149
149
|
},
|
|
150
150
|
watch: {
|
|
151
151
|
namespace: {
|
|
152
|
-
handler
|
|
152
|
+
handler() {
|
|
153
|
+
this.debouncedUpdateMatches();
|
|
154
|
+
},
|
|
153
155
|
immediate: true
|
|
154
156
|
},
|
|
155
157
|
'value.podSelector': {
|
|
156
|
-
handler
|
|
158
|
+
handler() {
|
|
159
|
+
this.debouncedUpdateMatches();
|
|
160
|
+
},
|
|
157
161
|
immediate: true
|
|
158
162
|
},
|
|
159
163
|
'value.namespaceSelector': {
|
|
160
|
-
handler
|
|
164
|
+
handler() {
|
|
165
|
+
this.debouncedUpdateMatches();
|
|
166
|
+
},
|
|
161
167
|
immediate: true
|
|
162
168
|
},
|
|
163
169
|
'value.ipBlock.cidr': 'validateCIDR',
|
|
164
170
|
'value.ipBlock.except': 'validateCIDR',
|
|
165
171
|
podSelectorExpressions: {
|
|
166
|
-
handler
|
|
172
|
+
handler() {
|
|
173
|
+
this.debouncedUpdateMatches();
|
|
174
|
+
},
|
|
167
175
|
immediate: true
|
|
168
176
|
},
|
|
169
177
|
namespaceSelectorExpressions: {
|
|
170
|
-
handler
|
|
178
|
+
handler() {
|
|
179
|
+
this.debouncedUpdateMatches();
|
|
180
|
+
},
|
|
171
181
|
immediate: true
|
|
172
182
|
}
|
|
173
183
|
},
|
|
@@ -475,16 +475,17 @@ describe('component: rke2', () => {
|
|
|
475
475
|
},
|
|
476
476
|
provider: 'custom'
|
|
477
477
|
},
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
computed: {
|
|
479
|
+
...rke2.computed,
|
|
480
|
+
agentArgs: () => ({
|
|
480
481
|
'cloud-provider-name': {
|
|
481
482
|
options: [
|
|
482
483
|
'azure',
|
|
483
484
|
'amazon'
|
|
484
485
|
]
|
|
485
486
|
}
|
|
486
|
-
}
|
|
487
|
-
}
|
|
487
|
+
})
|
|
488
|
+
},
|
|
488
489
|
global: {
|
|
489
490
|
mocks: {
|
|
490
491
|
...defaultMocks,
|
|
@@ -519,9 +520,10 @@ describe('component: rke2', () => {
|
|
|
519
520
|
},
|
|
520
521
|
provider: 'custom'
|
|
521
522
|
},
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
523
|
+
computed: {
|
|
524
|
+
...rke2.computed,
|
|
525
|
+
canAzureMigrateOnEdit: () => true,
|
|
526
|
+
agentArgs: () => ({
|
|
525
527
|
'cloud-provider-name': {
|
|
526
528
|
options: [
|
|
527
529
|
'azure',
|
|
@@ -529,8 +531,8 @@ describe('component: rke2', () => {
|
|
|
529
531
|
'external'
|
|
530
532
|
]
|
|
531
533
|
}
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
+
})
|
|
535
|
+
},
|
|
534
536
|
global: {
|
|
535
537
|
mocks: {
|
|
536
538
|
...defaultMocks,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from '@shell/utils/object';
|
|
29
29
|
import { allHash } from '@shell/utils/promise';
|
|
30
30
|
import {
|
|
31
|
-
getAllOptionsAfterCurrentVersion, filterOutDeprecatedPatchVersions, isHarvesterSatisfiesVersion, labelForAddon, initSchedulingCustomization
|
|
31
|
+
getAllOptionsAfterCurrentVersion, filterOutDeprecatedPatchVersions, isHarvesterSatisfiesVersion, labelForAddon, initSchedulingCustomization, addonConfigPreserve
|
|
32
32
|
} from '@shell/utils/cluster';
|
|
33
33
|
|
|
34
34
|
import { BadgeState } from '@components/BadgeState';
|
|
@@ -162,6 +162,10 @@ export default {
|
|
|
162
162
|
this.schedulingCustomizationOriginallyEnabled = sc.schedulingCustomizationOriginallyEnabled;
|
|
163
163
|
this.errors = this.errors.concat(sc.errors);
|
|
164
164
|
|
|
165
|
+
if (this.isEdit) {
|
|
166
|
+
this.originalKubeVersion = this.versionOptions.find((v) => v.value === this.liveValue.spec.kubernetesVersion);
|
|
167
|
+
}
|
|
168
|
+
|
|
165
169
|
Object.entries(this.chartValues).forEach(([name, value]) => {
|
|
166
170
|
const key = this.chartVersionKey(name);
|
|
167
171
|
|
|
@@ -278,6 +282,9 @@ export default {
|
|
|
278
282
|
REGISTRIES_TAB_NAME,
|
|
279
283
|
labelForAddon,
|
|
280
284
|
etcdConfigValid: true,
|
|
285
|
+
addonConfigDiffs: {},
|
|
286
|
+
originalKubeVersion: null,
|
|
287
|
+
isEmpty,
|
|
281
288
|
};
|
|
282
289
|
},
|
|
283
290
|
|
|
@@ -921,8 +928,22 @@ export default {
|
|
|
921
928
|
}
|
|
922
929
|
},
|
|
923
930
|
|
|
924
|
-
selectedVersion() {
|
|
925
|
-
this.
|
|
931
|
+
async selectedVersion(neu) {
|
|
932
|
+
if (this.isEdit) {
|
|
933
|
+
const {
|
|
934
|
+
addonConfigDiffs, addonNames, userChartValues, $store
|
|
935
|
+
} = this;
|
|
936
|
+
|
|
937
|
+
await addonConfigPreserve(
|
|
938
|
+
{
|
|
939
|
+
addonConfigDiffs, addonNames, userChartValues, $store
|
|
940
|
+
},
|
|
941
|
+
this.originalKubeVersion?.charts,
|
|
942
|
+
neu?.charts
|
|
943
|
+
);
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
this.versionInfo = {}; // Invalidate cache such that version info relevant to selected kube version is updated
|
|
926
947
|
|
|
927
948
|
// Allow time for addonNames to update... then fetch any missing addons
|
|
928
949
|
this.$nextTick(() => this.initAddons());
|
|
@@ -1511,10 +1532,15 @@ export default {
|
|
|
1511
1532
|
});
|
|
1512
1533
|
},
|
|
1513
1534
|
|
|
1514
|
-
showAddonConfirmation() {
|
|
1515
|
-
return new Promise((resolve
|
|
1535
|
+
showAddonConfirmation(addonNames, previousKubeVersion, newKubeVersion) {
|
|
1536
|
+
return new Promise((resolve) => {
|
|
1516
1537
|
this.$store.dispatch('cluster/promptModal', {
|
|
1517
|
-
component:
|
|
1538
|
+
component: 'AddonConfigConfirmationDialog',
|
|
1539
|
+
componentProps: {
|
|
1540
|
+
addonNames,
|
|
1541
|
+
previousKubeVersion,
|
|
1542
|
+
newKubeVersion
|
|
1543
|
+
},
|
|
1518
1544
|
resources: [(value) => resolve(value)]
|
|
1519
1545
|
});
|
|
1520
1546
|
});
|
|
@@ -1555,10 +1581,28 @@ export default {
|
|
|
1555
1581
|
const isEditVersion = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
|
|
1556
1582
|
|
|
1557
1583
|
if (isEditVersion) {
|
|
1558
|
-
const
|
|
1584
|
+
const hasDiffs = Object.values(this.addonConfigDiffs).some((d) => !isEmpty(d));
|
|
1585
|
+
|
|
1586
|
+
if (hasDiffs) {
|
|
1587
|
+
const addonNamesWithDiffs = [];
|
|
1588
|
+
|
|
1589
|
+
for (const name in this.addonConfigDiffs) {
|
|
1590
|
+
const diff = this.addonConfigDiffs[name];
|
|
1591
|
+
|
|
1592
|
+
if (!isEmpty(diff)) {
|
|
1593
|
+
addonNamesWithDiffs.push(name);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1559
1596
|
|
|
1560
|
-
|
|
1561
|
-
|
|
1597
|
+
const shouldContinue = await this.showAddonConfirmation(
|
|
1598
|
+
addonNamesWithDiffs,
|
|
1599
|
+
this.liveValue.spec.kubernetesVersion,
|
|
1600
|
+
this.value.spec.kubernetesVersion
|
|
1601
|
+
);
|
|
1602
|
+
|
|
1603
|
+
if (!shouldContinue) {
|
|
1604
|
+
return btnCb('cancelled');
|
|
1605
|
+
}
|
|
1562
1606
|
}
|
|
1563
1607
|
}
|
|
1564
1608
|
|
|
@@ -2521,6 +2565,9 @@ export default {
|
|
|
2521
2565
|
:addons-rev="addonsRev"
|
|
2522
2566
|
:user-chart-values-temp="userChartValuesTemp"
|
|
2523
2567
|
:init-yaml-editor="initYamlEditor"
|
|
2568
|
+
:has-diff="!isEmpty(addonConfigDiffs[v.name])"
|
|
2569
|
+
:previous-kube-version="liveValue?.spec?.kubernetesVersion"
|
|
2570
|
+
:new-kube-version="value.spec.kubernetesVersion"
|
|
2524
2571
|
@update:value="$emit('input', $event)"
|
|
2525
2572
|
@update-questions="syncChartValues"
|
|
2526
2573
|
@update-values="updateValues"
|
|
@@ -48,6 +48,27 @@ export default {
|
|
|
48
48
|
initYamlEditor: {
|
|
49
49
|
type: Function,
|
|
50
50
|
required: true,
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* Indicates if a configuration conflict was detected for this addon.
|
|
54
|
+
*/
|
|
55
|
+
hasDiff: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* The Kubernetes version the user is upgrading from.
|
|
61
|
+
*/
|
|
62
|
+
previousKubeVersion: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ''
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* The Kubernetes version the user is upgrading to.
|
|
68
|
+
*/
|
|
69
|
+
newKubeVersion: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: ''
|
|
51
72
|
}
|
|
52
73
|
|
|
53
74
|
},
|
|
@@ -73,10 +94,15 @@ export default {
|
|
|
73
94
|
<template>
|
|
74
95
|
<div>
|
|
75
96
|
<Banner
|
|
76
|
-
v-if="isEdit"
|
|
97
|
+
v-if="isEdit && hasDiff"
|
|
77
98
|
color="warning"
|
|
78
99
|
>
|
|
79
|
-
|
|
100
|
+
<span
|
|
101
|
+
v-clean-html="t('cluster.addOns.dependencyBanner', {
|
|
102
|
+
previousKubeVersion,
|
|
103
|
+
newKubeVersion
|
|
104
|
+
}, true)"
|
|
105
|
+
/>
|
|
80
106
|
</Banner>
|
|
81
107
|
<div
|
|
82
108
|
v-if="versionInfo && addonVersion"
|
|
@@ -11,6 +11,7 @@ import positiveIntNumberDirective from '@shell/directives/positive-int-number.js
|
|
|
11
11
|
import trimWhitespaceDirective from '@shell/directives/trim-whitespace';
|
|
12
12
|
import intNumberDirective from '@shell/directives/int-number';
|
|
13
13
|
import htmlStrippedAriaLabelDirective from '@shell/directives/strip-html-aria-label';
|
|
14
|
+
import uiContextDirective from '@shell/directives/ui-context';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Prevent extensions from overriding existing directives
|
|
@@ -49,6 +50,7 @@ function addDirectives(vueApp) {
|
|
|
49
50
|
vueApp.directive('intNumber', intNumberDirective);
|
|
50
51
|
vueApp.directive('positiveIntNumber', positiveIntNumberDirective);
|
|
51
52
|
vueApp.directive('stripped-aria-label', htmlStrippedAriaLabelDirective);
|
|
53
|
+
vueApp.directive('ui-context', uiContextDirective);
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
/**
|
package/list/projectsecret.vue
CHANGED
package/machine-config/azure.vue
CHANGED
|
@@ -35,7 +35,7 @@ const defaultConfig = {
|
|
|
35
35
|
dns: '',
|
|
36
36
|
environment: 'AzurePublicCloud',
|
|
37
37
|
faultDomainCount: '3',
|
|
38
|
-
image: 'canonical:
|
|
38
|
+
image: 'canonical:ubuntu-24_04-lts:server-gen1:latest',
|
|
39
39
|
location: 'westus',
|
|
40
40
|
managedDisks: false,
|
|
41
41
|
noPublicIp: false,
|