@rancher/shell 3.0.8-rc.2 → 3.0.8-rc.3

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 (87) hide show
  1. package/assets/brand/suse/dark/rancher-logo.svg +64 -1
  2. package/assets/brand/suse/rancher-logo.svg +1 -1
  3. package/assets/styles/global/_cards.scss +0 -3
  4. package/assets/styles/themes/_modern.scss +9 -1
  5. package/assets/styles/themes/_suse.scss +81 -24
  6. package/assets/translations/en-us.yaml +68 -3
  7. package/components/AutoscalerCard.vue +113 -0
  8. package/components/AutoscalerTab.vue +94 -0
  9. package/components/ClusterIconMenu.vue +1 -1
  10. package/components/ClusterProviderIcon.vue +1 -1
  11. package/components/IconOrSvg.vue +2 -2
  12. package/components/PopoverCard.vue +192 -0
  13. package/components/Resource/Detail/FetchLoader/composables.ts +18 -4
  14. package/components/Resource/Detail/Metadata/IdentifyingInformation/__tests__/identifying-fields.test.ts +1 -1
  15. package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +4 -0
  16. package/components/Resource/Detail/ResourcePopover/ResourcePopoverCard.vue +2 -19
  17. package/components/Resource/Detail/ResourcePopover/__tests__/ResourcePopoverCard.test.ts +0 -29
  18. package/components/Resource/Detail/ResourcePopover/__tests__/index.test.ts +132 -150
  19. package/components/Resource/Detail/ResourcePopover/index.vue +54 -159
  20. package/components/ResourceDetail/Masthead/latest.vue +29 -0
  21. package/components/ResourceList/Masthead.vue +1 -1
  22. package/components/__tests__/AutoscalerCard.test.ts +154 -0
  23. package/components/__tests__/AutoscalerTab.test.ts +125 -0
  24. package/components/__tests__/PopoverCard.test.ts +204 -0
  25. package/components/formatter/Autoscaler.vue +97 -0
  26. package/components/formatter/InternalExternalIP.vue +195 -24
  27. package/components/formatter/__tests__/Autoscaler.test.ts +156 -0
  28. package/components/formatter/__tests__/InternalExternalIP.test.ts +133 -0
  29. package/components/nav/Group.vue +12 -3
  30. package/components/nav/TopLevelMenu.vue +2 -2
  31. package/composables/useInterval.ts +15 -0
  32. package/config/labels-annotations.js +8 -1
  33. package/config/product/manager.js +20 -9
  34. package/config/router/routes.js +4 -0
  35. package/config/settings.ts +2 -1
  36. package/config/table-headers.js +8 -0
  37. package/config/types.js +2 -0
  38. package/core/types-provisioning.ts +3 -0
  39. package/detail/provisioning.cattle.io.cluster.vue +12 -1
  40. package/directives/ui-context.ts +8 -2
  41. package/edit/auth/github.vue +5 -0
  42. package/edit/cloudcredential.vue +1 -1
  43. package/edit/fleet.cattle.io.gitrepo.vue +0 -10
  44. package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +32 -5
  45. package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.test.ts +35 -0
  46. package/edit/provisioning.cattle.io.cluster/__tests__/Networking.test.ts +132 -0
  47. package/edit/provisioning.cattle.io.cluster/index.vue +18 -12
  48. package/edit/provisioning.cattle.io.cluster/rke2.vue +39 -8
  49. package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +107 -5
  50. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +90 -3
  51. package/initialize/install-plugins.js +3 -1
  52. package/list/provisioning.cattle.io.cluster.vue +15 -2
  53. package/machine-config/amazonec2.vue +36 -135
  54. package/machine-config/components/EC2Networking.vue +474 -0
  55. package/machine-config/components/__tests__/EC2Networking.test.ts +94 -0
  56. package/machine-config/components/__tests__/utils/vpcSubnetMockData.js +294 -0
  57. package/machine-config/digitalocean.vue +11 -0
  58. package/models/cluster/node.js +13 -6
  59. package/models/cluster.x-k8s.io.machine.js +10 -20
  60. package/models/cluster.x-k8s.io.machinedeployment.js +5 -1
  61. package/models/management.cattle.io.kontainerdriver.js +1 -0
  62. package/models/provisioning.cattle.io.cluster.js +223 -2
  63. package/package.json +1 -1
  64. package/pages/c/_cluster/apps/charts/install.vue +1 -1
  65. package/pages/c/_cluster/manager/hostedprovider/index.vue +209 -0
  66. package/plugins/dynamic-content.js +13 -0
  67. package/rancher-components/Form/Checkbox/Checkbox.vue +1 -1
  68. package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.vue +8 -0
  69. package/store/features.js +1 -0
  70. package/store/notifications.ts +32 -1
  71. package/store/plugins.js +7 -3
  72. package/store/prefs.js +1 -0
  73. package/types/notifications/index.ts +24 -3
  74. package/types/shell/index.d.ts +26 -1
  75. package/utils/__tests__/object.test.ts +19 -0
  76. package/utils/autoscaler-utils.ts +7 -0
  77. package/utils/dynamic-content/__tests__/announcement.test.ts +498 -0
  78. package/utils/dynamic-content/announcement.ts +112 -0
  79. package/utils/dynamic-content/example.json +40 -0
  80. package/utils/dynamic-content/index.ts +6 -2
  81. package/utils/dynamic-content/new-release.ts +1 -1
  82. package/utils/dynamic-content/notification-handler.ts +48 -0
  83. package/utils/dynamic-content/types.d.ts +33 -1
  84. package/utils/object.js +20 -2
  85. package/utils/scroll.js +7 -0
  86. package/utils/settings.ts +15 -0
  87. package/utils/validators/machine-pool.ts +13 -3
@@ -57,7 +57,7 @@ import { ExtensionPoint, TabLocation } from '@shell/core/types';
57
57
  import MemberRoles from '@shell/edit/provisioning.cattle.io.cluster/tabs/MemberRoles';
58
58
  import Basics from '@shell/edit/provisioning.cattle.io.cluster/tabs/Basics';
59
59
  import Etcd from '@shell/edit/provisioning.cattle.io.cluster/tabs/etcd';
60
- import Networking from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking';
60
+ import Networking, { STACK_PREFS } from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking';
61
61
  import Upgrade from '@shell/edit/provisioning.cattle.io.cluster/tabs/upgrade';
62
62
  import Registries from '@shell/edit/provisioning.cattle.io.cluster/tabs/registries';
63
63
  import AddOnConfig from '@shell/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig';
@@ -219,6 +219,10 @@ export default {
219
219
  this.value.spec.rkeConfig.machineGlobalConfig = {};
220
220
  }
221
221
 
222
+ if (!this.value.spec.rkeConfig.networking) {
223
+ this.value.spec.rkeConfig.networking = {};
224
+ }
225
+
222
226
  if (!this.value.spec.rkeConfig.machineSelectorConfig?.length) {
223
227
  this.value.spec.rkeConfig.machineSelectorConfig = [{ config: {} }];
224
228
  }
@@ -268,6 +272,7 @@ export default {
268
272
  machinePoolValidation: {}, // map of validation states for each machine pool
269
273
  machinePoolErrors: {},
270
274
  addonConfigValidation: {}, // validation state of each addon config (boolean of whether codemirror's yaml lint passed)
275
+ stackPreferenceError: false, // spec.networking.stackPreference is validated in conjunction with hasSomeIpv6Pools
271
276
  allNamespaces: [],
272
277
  extensionTabs: getApplicableExtensionEnhancements(this, ExtensionPoint.TAB, TabLocation.CLUSTER_CREATE_RKE2, this.$route, this),
273
278
  clusterAgentDeploymentCustomization: null,
@@ -843,6 +848,10 @@ export default {
843
848
  }
844
849
  },
845
850
 
851
+ hasSomeIpv6Pools() {
852
+ return !!(this.machinePools || []).find((p) => p.hasIpv6);
853
+ },
854
+
846
855
  validationPassed() {
847
856
  const validRequiredPools = this.hasMachinePools ? this.hasRequiredNodes() : true;
848
857
 
@@ -853,8 +862,9 @@ export default {
853
862
 
854
863
  const hasAddonConfigErrors = Object.values(this.addonConfigValidation).filter((v) => v === false).length > 0;
855
864
 
856
- return validRequiredPools && base && !hasAddonConfigErrors;
865
+ return validRequiredPools && base && !hasAddonConfigErrors && !this.stackPreferenceError;
857
866
  },
867
+
858
868
  currentCluster() {
859
869
  if (this.mode === _EDIT) {
860
870
  return { ...this.value };
@@ -862,6 +872,7 @@ export default {
862
872
  return this.$store.getters['customisation/getPreviewCluster'];
863
873
  }
864
874
  },
875
+
865
876
  localValue: {
866
877
  get() {
867
878
  return this.value;
@@ -870,6 +881,7 @@ export default {
870
881
  this.$emit('update:value', newValue);
871
882
  }
872
883
  },
884
+
873
885
  hideFooter() {
874
886
  return this.needCredential && !this.credentialId;
875
887
  },
@@ -879,6 +891,7 @@ export default {
879
891
  this.fvFormIsValid &&
880
892
  this.etcdConfigValid;
881
893
  },
894
+
882
895
  },
883
896
 
884
897
  watch: {
@@ -975,6 +988,17 @@ export default {
975
988
  this.agentConfig['cloud-provider-name'] = undefined;
976
989
  }
977
990
  },
991
+
992
+ hasSomeIpv6Pools(neu) {
993
+ const stackPreference = this.localValue.spec.rkeConfig.networking.stackPreference;
994
+
995
+ if (neu && (stackPreference === STACK_PREFS.IPV4 || !stackPreference)) { // localValue.spec.rkeConfig.networking is initialized in the beforeCreate hook
996
+ this.localValue.spec.rkeConfig.networking.stackPreference = STACK_PREFS.DUAL;
997
+ } else if (stackPreference === STACK_PREFS.DUAL) {
998
+ this.localValue.spec.rkeConfig.networking.stackPreference = STACK_PREFS.IPV4;
999
+ }
1000
+ },
1001
+
978
1002
  },
979
1003
 
980
1004
  created() {
@@ -1303,13 +1327,14 @@ export default {
1303
1327
  const name = `pool${ ++this.lastIdx }`;
1304
1328
 
1305
1329
  const pool = {
1306
- id: name,
1330
+ id: name,
1307
1331
  config,
1308
- remove: false,
1309
- create: true,
1310
- update: false,
1311
- uid: name,
1312
- pool: {
1332
+ remove: false,
1333
+ create: true,
1334
+ update: false,
1335
+ uid: name,
1336
+ hasIpv6: false,
1337
+ pool: {
1313
1338
  name,
1314
1339
  etcdRole: numCurrentPools === 0,
1315
1340
  controlPlaneRole: numCurrentPools === 0,
@@ -2445,6 +2470,7 @@ export default {
2445
2470
  :cloud-provider-options="cloudProviderOptions"
2446
2471
  :is-azure-provider-unsupported="isAzureProviderUnsupported"
2447
2472
  :can-azure-migrate-on-edit="canAzureMigrateOnEdit"
2473
+ :has-some-ipv6-pools="hasSomeIpv6Pools"
2448
2474
  @update:value="$emit('input', $event)"
2449
2475
  @cilium-values-changed="handleCiliumValuesChanged"
2450
2476
  @enabled-system-services-changed="handleEnabledSystemServicesChanged"
@@ -2492,12 +2518,15 @@ export default {
2492
2518
  v-if="haveArgInfo"
2493
2519
  name="networking"
2494
2520
  label-key="cluster.tabs.networking"
2521
+ :error="stackPreferenceError"
2495
2522
  >
2496
2523
  <Networking
2497
2524
  v-model:value="localValue"
2498
2525
  :mode="mode"
2499
2526
  :selected-version="selectedVersion"
2500
2527
  :truncate-limit="truncateLimit"
2528
+ :machine-pools="machinePools"
2529
+ :has-some-ipv6-pools="hasSomeIpv6Pools"
2501
2530
  @truncate-hostname-changed="truncateHostname"
2502
2531
  @cluster-cidr-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-cidr'] = val"
2503
2532
  @service-cidr-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['service-cidr'] = val"
@@ -2508,6 +2537,8 @@ export default {
2508
2537
  @local-cluster-auth-endpoint-changed="enableLocalClusterAuthEndpoint"
2509
2538
  @ca-certs-changed="(val)=>localValue.spec.localClusterAuthEndpoint.caCerts = val"
2510
2539
  @fqdn-changed="(val)=>localValue.spec.localClusterAuthEndpoint.fqdn = val"
2540
+ @stack-preference-changed="(val)=>localValue.spec.rkeConfig.networking.stackPreference = val"
2541
+ @validationChanged="(val)=>stackPreferenceError = !val"
2511
2542
  />
2512
2543
  </Tab>
2513
2544
 
@@ -10,6 +10,7 @@ import UnitInput from '@shell/components/form/UnitInput.vue';
10
10
  import { randomStr } from '@shell/utils/string';
11
11
  import FormValidation from '@shell/mixins/form-validation';
12
12
  import { MACHINE_POOL_VALIDATION } from '@shell/utils/validators/machine-pool';
13
+ import { isAutoscalerFeatureFlagEnabled } from '@shell/utils/autoscaler-utils';
13
14
 
14
15
  export default {
15
16
 
@@ -99,6 +100,14 @@ export default {
99
100
  MACHINE_POOL_VALIDATION,
100
101
 
101
102
  fvFormRuleSets: MACHINE_POOL_VALIDATION.RULESETS,
103
+ fvExtraRules: {
104
+ isAutoscalerMaxGreaterThanMin: () => {
105
+ const min = this.value?.pool?.autoscalingMinSize || 0;
106
+ const max = this.value?.pool?.autoscalingMaxSize || 0;
107
+
108
+ return max - min >= 0 ? undefined : this.t('cluster.machinePool.autoscaler.validation.isAutoscalerMaxGreaterThanMin');
109
+ }
110
+ }
102
111
  };
103
112
  },
104
113
 
@@ -113,6 +122,25 @@ export default {
113
122
 
114
123
  isWindows() {
115
124
  return this.value?.config?.os === 'windows';
125
+ },
126
+
127
+ isAutoscalerFeatureEnabled() {
128
+ return isAutoscalerFeatureFlagEnabled(this.$store);
129
+ },
130
+
131
+ isAutoscalerEnabled: {
132
+ get() {
133
+ return typeof this.value?.pool?.autoscalingMinSize !== 'undefined' || typeof this.value?.pool?.autoscalingMinSize !== 'undefined';
134
+ },
135
+ set(val) {
136
+ if (!val) {
137
+ delete this.value.pool.autoscalingMinSize;
138
+ delete this.value.pool.autoscalingMaxSize;
139
+ } else {
140
+ this.value.pool.autoscalingMinSize = 1;
141
+ this.value.pool.autoscalingMaxSize = 2;
142
+ }
143
+ }
116
144
  }
117
145
  },
118
146
 
@@ -139,7 +167,18 @@ export default {
139
167
  this.$emit('validationChanged', newValue);
140
168
  },
141
169
  deep: true
142
- }
170
+ },
171
+
172
+ 'value.pool.etcdRole'(neu) {
173
+ if (neu) {
174
+ this.isAutoscalerEnabled = false;
175
+ }
176
+ },
177
+ 'value.pool.controlPlaneRole'(neu) {
178
+ if (neu) {
179
+ this.isAutoscalerEnabled = false;
180
+ }
181
+ },
143
182
  },
144
183
 
145
184
  /**
@@ -262,6 +301,7 @@ export default {
262
301
  </div>
263
302
  <div class="col span-4">
264
303
  <LabeledInput
304
+ v-if="!isAutoscalerFeatureEnabled || !isAutoscalerEnabled"
265
305
  v-model:value.number="value.pool.quantity"
266
306
  :mode="mode"
267
307
  :label="t('cluster.machinePool.quantity.label')"
@@ -272,6 +312,15 @@ export default {
272
312
  :rules="fvGetAndReportPathRules(MACHINE_POOL_VALIDATION.FIELDS.QUANTITY)"
273
313
  data-testid="machine-pool-quantity-input"
274
314
  />
315
+ <LabeledInput
316
+ v-else
317
+ :value="t('cluster.machinePool.autoscaler.machineCountValueOverride')"
318
+ :mode="mode"
319
+ :label="t('cluster.machinePool.quantity.label')"
320
+ :disabled="true"
321
+ :required="true"
322
+ data-testid="machine-pool-quantity-input"
323
+ />
275
324
  </div>
276
325
  <div class="col span-4 pt-5">
277
326
  <h3>
@@ -305,6 +354,7 @@ export default {
305
354
  :is="configComponent"
306
355
  v-if="value.config && configComponent"
307
356
  ref="configComponent"
357
+ v-model:has-ipv6="value.hasIpv6"
308
358
  :cluster="cluster"
309
359
  :uuid="uuid"
310
360
  :mode="mode"
@@ -344,15 +394,18 @@ export default {
344
394
  />
345
395
 
346
396
  <div class="spacer" />
397
+ <h3>
398
+ {{ t('cluster.machinePool.automation.label') }}
399
+ </h3>
347
400
  <div class="row">
348
401
  <div class="col span-4">
349
- <h3>
402
+ <h4>
350
403
  {{ t('cluster.machinePool.autoReplace.label') }}
351
404
  <i
352
405
  v-clean-tooltip="t('cluster.machinePool.autoReplace.toolTip')"
353
406
  class="icon icon-info icon-lg"
354
407
  />
355
- </h3>
408
+ </h4>
356
409
  <UnitInput
357
410
  v-model:value="unhealthyNodeTimeoutInteger"
358
411
  :hide-arrows="true"
@@ -365,9 +418,9 @@ export default {
365
418
  />
366
419
  </div>
367
420
  <div class="col span-4">
368
- <h3>
421
+ <h4>
369
422
  {{ t('cluster.machinePool.drain.header') }}
370
- </h3>
423
+ </h4>
371
424
  <Checkbox
372
425
  v-model:value="value.pool.drainBeforeDelete"
373
426
  :mode="mode"
@@ -376,6 +429,55 @@ export default {
376
429
  />
377
430
  </div>
378
431
  </div>
432
+ <div v-if="isAutoscalerFeatureEnabled">
433
+ <div class="row mt-10">
434
+ <div class="col span-12">
435
+ <h4>
436
+ {{ t('cluster.machinePool.autoscaler.heading') }}
437
+ </h4>
438
+ <Banner
439
+ v-if="value.pool.etcdRole || value.pool.controlPlaneRole"
440
+ color="warning"
441
+ label-key="cluster.machinePool.autoscaler.etcdControlPlaneWarning"
442
+ />
443
+ <Checkbox
444
+ v-model:value="isAutoscalerEnabled"
445
+ :mode="mode"
446
+ :label="t('cluster.machinePool.autoscaler.enable', undefined, true)"
447
+ :disabled="value.pool.etcdRole || value.pool.controlPlaneRole || busy"
448
+ />
449
+ </div>
450
+ </div>
451
+ <div
452
+ v-if="isAutoscalerEnabled"
453
+ class="row"
454
+ >
455
+ <div class="col span-4">
456
+ <UnitInput
457
+ v-model:value="value.pool.autoscalingMinSize"
458
+ :label="t('cluster.machinePool.autoscaler.min')"
459
+ :hide-arrows="true"
460
+ :placeholder="t('containerResourceLimit.cpuPlaceholder')"
461
+ :mode="mode"
462
+ :base-unit="t('cluster.machinePool.autoscaler.baseUnit')"
463
+ :rules="fvGetAndReportPathRules(MACHINE_POOL_VALIDATION.FIELDS.AUTOSCALER_MIN)"
464
+ :disabled="value.pool.etcdRole || value.pool.controlPlaneRole || busy"
465
+ />
466
+ </div>
467
+ <div class="col span-4">
468
+ <UnitInput
469
+ v-model:value="value.pool.autoscalingMaxSize"
470
+ :label="t('cluster.machinePool.autoscaler.max')"
471
+ :hide-arrows="true"
472
+ :placeholder="t('containerResourceLimit.cpuPlaceholder')"
473
+ :mode="mode"
474
+ :base-unit="t('cluster.machinePool.autoscaler.baseUnit')"
475
+ :rules="fvGetAndReportPathRules(MACHINE_POOL_VALIDATION.FIELDS.AUTOSCALER_MAX)"
476
+ :disabled="value.pool.etcdRole || value.pool.controlPlaneRole || busy"
477
+ />
478
+ </div>
479
+ </div>
480
+ </div>
379
481
  <div class="spacer" />
380
482
  <KeyValue
381
483
  v-model:value="value.pool.labels"
@@ -5,15 +5,22 @@ import { Checkbox } from '@components/Form/Checkbox';
5
5
  import { _EDIT, _VIEW } from '@shell/config/query-params';
6
6
  import ArrayList from '@shell/components/form/ArrayList';
7
7
  import ACE from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking/ACE';
8
+ import LabeledSelect from '@shell/components/form/LabeledSelect';
8
9
 
9
10
  const NETBIOS_TRUNCATION_LENGTH = 15;
10
11
 
12
+ export const STACK_PREFS = {
13
+ IPV4: 'ipv4',
14
+ IPV6: 'ipv6',
15
+ DUAL: 'dual'
16
+ };
17
+
11
18
  export default {
12
19
  emits: [
13
20
  'update:value', 'cluster-cidr-changed', 'local-cluster-auth-endpoint-changed',
14
21
  'service-cidr-changed', 'cluster-domain-changed', 'cluster-dns-changed',
15
22
  'truncate-hostname-changed', 'ca-certs-changed', 'service-node-port-range-changed',
16
- 'fqdn-changed', 'tls-san-changed'
23
+ 'fqdn-changed', 'tls-san-changed', 'stack-preference-changed', 'validationChanged'
17
24
  ],
18
25
 
19
26
  components: {
@@ -21,7 +28,8 @@ export default {
21
28
  Banner,
22
29
  Checkbox,
23
30
  ArrayList,
24
- ACE
31
+ ACE,
32
+ LabeledSelect
25
33
  },
26
34
 
27
35
  props: {
@@ -34,17 +42,28 @@ export default {
34
42
  type: Object,
35
43
  required: true,
36
44
  },
45
+
37
46
  selectedVersion: {
38
47
  type: Object,
39
48
  required: true,
40
49
  },
50
+
41
51
  truncateLimit: {
42
52
  type: Number,
43
53
  required: false,
44
54
  default: 0
55
+ },
56
+
57
+ hasSomeIpv6Pools: {
58
+ type: Boolean,
59
+ default: false
45
60
  }
46
61
  },
47
62
 
63
+ data() {
64
+ return { STACK_PREFS };
65
+ },
66
+
48
67
  computed: {
49
68
  truncateHostnames() {
50
69
  return this.truncateLimit === NETBIOS_TRUNCATION_LENGTH;
@@ -55,7 +74,20 @@ export default {
55
74
  serverArgs() {
56
75
  return this.selectedVersion?.serverArgs || {};
57
76
  },
58
-
77
+ stackPreferenceOptions() {
78
+ return [{
79
+ label: this.t('cluster.rke2.stackPreference.options.ipv4'),
80
+ value: STACK_PREFS.IPV4
81
+ },
82
+ {
83
+ label: this.t('cluster.rke2.stackPreference.options.ipv6'),
84
+ value: STACK_PREFS.IPV6
85
+ }, {
86
+ label: this.t('cluster.rke2.stackPreference.options.dual'),
87
+ value: STACK_PREFS.DUAL
88
+ },
89
+ ];
90
+ },
59
91
  showIpv6Warning() {
60
92
  const clusterCIDR = this.serverConfig['cluster-cidr'] || '';
61
93
  const serviceCIDR = this.serverConfig['service-cidr'] || '';
@@ -79,6 +111,35 @@ export default {
79
111
  this.$emit('update:value', newValue);
80
112
  }
81
113
  },
114
+
115
+ stackPreference: {
116
+ get() {
117
+ return this.localValue.spec?.networking?.stackPreference || STACK_PREFS.IPV4;
118
+ },
119
+ set(neu) {
120
+ if (!this.localValue.spec.networking) {
121
+ this.localValue.spec.networking = {};
122
+ }
123
+ this.localValue.spec.networking.stackPreference = neu;
124
+ }
125
+ },
126
+ },
127
+
128
+ methods: {
129
+ // if ipv6 pools are detected, we enforce dual-stack or ipv6 stack prefs.
130
+ // If ipv6 pools are not detected we don't know for sure they aren't there so we don't validate the input
131
+ stackPreferenceValidator(val) {
132
+ const value = val?.value || val;
133
+ let isValid;
134
+
135
+ if (this.hasSomeIpv6Pools) {
136
+ isValid = value !== STACK_PREFS.IPV4;
137
+
138
+ return isValid ? null : this.t('cluster.rke2.stackPreference.errorNeedsIpv6');
139
+ } else {
140
+ return null;
141
+ }
142
+ }
82
143
  }
83
144
  };
84
145
  </script>
@@ -95,6 +156,7 @@ export default {
95
156
  <Banner
96
157
  v-if="showIpv6Warning"
97
158
  color="warning"
159
+ data-testid="network-tab-ipv6StackPreferenceWarning"
98
160
  >
99
161
  {{ t('cluster.rke2.address.ipv6.warning') }}
100
162
  </Banner>
@@ -210,5 +272,30 @@ export default {
210
272
  @caCerts-changed="$emit('ca-certs-changed', $event)"
211
273
  @local-cluster-auth-endpoint-changed="$emit('local-cluster-auth-endpoint-changed', $event)"
212
274
  />
275
+
276
+ <h3
277
+ v-t="'cluster.rke2.stackPreference.label'"
278
+ class="mt-20"
279
+ />
280
+ <t
281
+ k="cluster.rke2.stackPreference.description"
282
+ raw
283
+ class="text-muted"
284
+ />
285
+ <div class="ro mt-10 mb-20">
286
+ <div class="col span-3">
287
+ <LabeledSelect
288
+ :key="hasSomeIpv6Pools"
289
+ :value="localValue?.spec?.rkeConfig?.networking?.stackPreference || STACK_PREFS.IPV4"
290
+ :mode="mode"
291
+ :options="stackPreferenceOptions"
292
+ :rules="[stackPreferenceValidator]"
293
+ data-testid="network-tab-stackpreferences"
294
+ :require-dirty="false"
295
+ @selecting="e=>$emit('stack-preference-changed', e)"
296
+ @update:validation="e=>$emit('validationChanged', e)"
297
+ />
298
+ </div>
299
+ </div>
213
300
  </div>
214
301
  </template>
@@ -30,6 +30,8 @@ import internalApiPlugin from '@shell/plugins/internal-api';
30
30
  import 'floating-vue/dist/style.css';
31
31
  import { floatingVueOptions } from '@shell/plugins/floating-vue';
32
32
 
33
+ import dynamicContent from '@shell/plugins/dynamic-content';
34
+
33
35
  export async function installPlugins(vueApp) {
34
36
  vueApp.use(globalFormatters);
35
37
  vueApp.use(PortalVue);
@@ -46,7 +48,7 @@ export async function installPlugins(vueApp) {
46
48
  }
47
49
 
48
50
  export async function installInjectedPlugins(app, vueApp) {
49
- const pluginDefinitions = [config, axios, plugins, pluginsLoader, axiosShell, intNumber, codeMirror, nuxtClientInit, replaceAll, plugin, steveCreateWorker, emberCookie, internalApiPlugin];
51
+ const pluginDefinitions = [config, axios, plugins, pluginsLoader, axiosShell, intNumber, codeMirror, nuxtClientInit, replaceAll, plugin, steveCreateWorker, emberCookie, internalApiPlugin, dynamicContent];
50
52
 
51
53
  const installations = pluginDefinitions.map(async(pluginDefinition) => {
52
54
  if (typeof pluginDefinition === 'function') {
@@ -10,6 +10,8 @@ import { mapFeature, HARVESTER as HARVESTER_FEATURE } from '@shell/store/feature
10
10
  import { NAME as EXPLORER } from '@shell/config/product/explorer';
11
11
  import ResourceFetch from '@shell/mixins/resource-fetch';
12
12
  import { BadgeState } from '@components/BadgeState';
13
+ import { isAutoscalerFeatureFlagEnabled } from '@shell/utils/autoscaler-utils';
14
+ import { AUTOSCALER_ENABLED } from '@shell/config/table-headers';
13
15
 
14
16
  export default {
15
17
  components: {
@@ -153,6 +155,16 @@ export default {
153
155
  return this.filteredRows.some((c) => c.metadata.namespace !== 'fleet-local' && c.metadata.namespace !== 'fleet-default');
154
156
  },
155
157
 
158
+ headers() {
159
+ const headers = this.$store.getters['type-map/headersFor'](this.schema);
160
+
161
+ if (isAutoscalerFeatureFlagEnabled(this.$store)) {
162
+ headers.splice(-3, 0, AUTOSCALER_ENABLED);
163
+ }
164
+
165
+ return headers;
166
+ }
167
+
156
168
  },
157
169
 
158
170
  $loadingResources() {
@@ -201,7 +213,8 @@ export default {
201
213
  </Masthead>
202
214
 
203
215
  <ResourceTable
204
- :schema="schema"
216
+ :headers="headers"
217
+ :table-actions="true"
205
218
  :rows="filteredRows"
206
219
  :namespaced="nonStandardNamespaces"
207
220
  :loading="loading"
@@ -237,7 +250,7 @@ export default {
237
250
  </template>
238
251
  <template #cell:explorer="{row}">
239
252
  <router-link
240
- v-if="row.mgmt && row.mgmt.isReady && !row.hasError"
253
+ v-if="row.canExplore"
241
254
  data-testid="cluster-manager-list-explore-management"
242
255
  class="btn btn-sm role-secondary"
243
256
  :to="{name: 'c-cluster', params: {cluster: row.mgmt.id}}"