@rancher/shell 0.3.4 → 0.3.6
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/providers/outscale.svg +19 -0
- package/assets/styles/app.scss +1 -1
- package/assets/styles/base/_basic.scss +18 -0
- package/assets/styles/base/_mixins.scss +0 -11
- package/assets/styles/base/_variables.scss +2 -4
- package/assets/styles/fonts/_fontstack.scss +11 -11
- package/assets/styles/global/_button.scss +12 -2
- package/assets/styles/vendor/vue-js-modal.scss +3 -3
- package/assets/translations/en-us.yaml +113 -22
- package/assets/translations/zh-hans.yaml +113 -24
- package/babel.config.js +13 -0
- package/chart/gatekeeper.vue +78 -0
- package/chart/istio.vue +135 -112
- package/chart/logging/index.vue +13 -4
- package/chart/monitoring/index.vue +15 -5
- package/chart/monitoring/steps/uninstall-v1.vue +2 -2
- package/chart/rancher-backup/index.vue +10 -3
- package/cloud-credential/aws.vue +1 -1
- package/cloud-credential/digitalocean.vue +1 -1
- package/cloud-credential/gcp.vue +1 -1
- package/cloud-credential/generic.vue +2 -2
- package/cloud-credential/linode.vue +1 -1
- package/cloud-credential/pnap.vue +1 -1
- package/components/ActionMenu.vue +3 -4
- package/components/AssignTo.vue +1 -1
- package/components/AsyncButton.vue +1 -1
- package/components/BannerGraphic.vue +1 -1
- package/components/BrandImage.vue +1 -4
- package/components/ButtonDropdown.vue +2 -3
- package/components/Carousel.vue +85 -37
- package/components/ChartPsp.vue +76 -0
- package/components/CruResource.vue +6 -2
- package/components/DashboardMetrics.vue +12 -10
- package/components/DetailText.vue +1 -1
- package/components/DisableAuthProviderModal.vue +1 -1
- package/components/EmberPage.vue +1 -1
- package/components/EtcdInfoBanner.vue +12 -7
- package/components/ExplorerMembers.vue +101 -6
- package/components/ExplorerProjectsNamespaces.vue +46 -3
- package/components/FileDiff.vue +6 -7
- package/components/GrafanaDashboard.vue +27 -23
- package/components/LazyImage.vue +10 -12
- package/components/LogItem.vue +1 -1
- package/components/Markdown.vue +1 -1
- package/components/PromptRemove.vue +2 -2
- package/components/PromptRestore.vue +1 -1
- package/components/ResourceDetail/Masthead.vue +16 -0
- package/components/ResourceDetail/index.vue +21 -4
- package/components/ResourceList/index.vue +1 -1
- package/components/ResourceTable.vue +4 -1
- package/components/SingleClusterInfo.vue +2 -2
- package/components/SortableTable/THead.vue +1 -1
- package/components/SortableTable/index.vue +28 -13
- package/components/SortableTable/selection.js +58 -50
- package/components/Wizard.vue +4 -2
- package/components/__tests__/AsyncButton.test.ts +3 -1
- package/components/__tests__/ChartPsp.test.ts +75 -0
- package/components/__tests__/CruResource.test.ts +3 -1
- package/components/auth/Principal.vue +1 -1
- package/components/auth/RoleDetailEdit.vue +2 -2
- package/components/fleet/FleetBundles.vue +3 -1
- package/components/fleet/FleetClusters.vue +1 -2
- package/components/fleet/FleetIntro.vue +9 -1
- package/components/fleet/FleetNoWorkspaces.vue +62 -0
- package/components/fleet/FleetSummary.vue +7 -1
- package/components/form/HookOption.vue +14 -10
- package/components/form/LabeledSelect.vue +14 -11
- package/components/form/Labels.vue +32 -27
- package/components/form/MatchExpressions.vue +19 -4
- package/components/form/Members/ClusterPermissionsEditor.vue +32 -7
- package/components/form/NameNsDescription.vue +32 -46
- package/components/form/ProjectMemberEditor.vue +46 -21
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/SecretSelector.vue +5 -1
- package/components/form/ServiceNameSelect.vue +1 -1
- package/components/form/SimpleSecretSelector.vue +9 -9
- package/components/form/Tolerations.vue +4 -1
- package/components/form/ValueFromResource.vue +14 -9
- package/components/form/WorkloadPorts.vue +2 -2
- package/components/form/__tests__/LabeledSelect.test.ts +138 -0
- package/components/form/__tests__/NameNsDescription.ts +59 -0
- package/components/formatter/InternalExternalIP.vue +6 -0
- package/components/formatter/InvolvedObjectLink.vue +54 -0
- package/components/formatter/Link.vue +20 -4
- package/components/formatter/LinkName.vue +6 -1
- package/components/formatter/ServiceTargets.vue +1 -1
- package/components/formatter/WorkloadHealthScale.vue +8 -2
- package/components/nav/Group.vue +2 -2
- package/components/nav/NamespaceFilter.vue +23 -11
- package/components/nav/TopLevelMenu.vue +2 -4
- package/components/nav/Type.vue +1 -1
- package/components/nav/WorkspaceSwitcher.vue +46 -5
- package/components/nuxt/nuxt-build-indicator.vue +143 -0
- package/components/nuxt/nuxt-child.js +122 -0
- package/components/nuxt/nuxt-error.vue +98 -0
- package/components/nuxt/nuxt-link.client.js +98 -0
- package/components/nuxt/nuxt-link.server.js +16 -0
- package/components/nuxt/nuxt-loading.vue +154 -0
- package/components/nuxt/nuxt.js +101 -0
- package/config/labels-annotations.js +17 -0
- package/config/middleware.js +12 -0
- package/config/product/auth.js +3 -2
- package/config/product/explorer.js +34 -6
- package/config/product/fleet.js +2 -0
- package/config/query-params.js +1 -0
- package/config/router.js +414 -0
- package/config/store.js +181 -0
- package/config/table-headers.js +54 -12
- package/config/types.js +18 -8
- package/config/uiplugins.js +30 -0
- package/content/docs/en-us/whats-new.md +10 -0
- package/content/docs/zh-hans/whats-new.md +11 -1
- package/core/plugin-routes.ts +23 -0
- package/core/plugin.ts +4 -2
- package/core/types.ts +258 -1
- package/creators/app/app.package.json +2 -1
- package/creators/app/files/.eslintrc.js +1 -1
- package/creators/app/files/babel.config.js +1 -18
- package/creators/app/files/tsconfig.json +0 -1
- package/creators/app/files/vue.config.js +6 -0
- package/creators/app/init +5 -5
- package/creators/pkg/files/.github/workflows/build-extension.yml +110 -0
- package/creators/pkg/files/tsconfig.json +0 -1
- package/creators/pkg/init +35 -4
- package/creators/pkg/pkg.package.json +3 -3
- package/creators/update/init +1 -1
- package/detail/constraints.gatekeeper.sh.constraint.vue +34 -17
- package/detail/fleet.cattle.io.clustergroup.vue +7 -1
- package/detail/fleet.cattle.io.gitrepo.vue +19 -11
- package/detail/harvesterhci.io.management.cluster.vue +3 -3
- package/detail/provisioning.cattle.io.cluster.vue +54 -12
- package/detail/workload/index.vue +3 -3
- package/dialog/AddClusterMemberDialog.vue +1 -1
- package/dialog/AddProjectMemberDialog.vue +2 -2
- package/dialog/AddonConfigConfirmationDialog.vue +27 -15
- package/dialog/DiagnosticTimingsDialog.vue +1 -1
- package/dialog/ForceMachineRemoveDialog.vue +1 -1
- package/dialog/GenericPrompt.vue +18 -6
- package/dialog/RotateEncryptionKeyDialog.vue +1 -1
- package/dialog/SaveAsRKETemplateDialog.vue +1 -1
- package/dialog/ScaleMachineDownDialog.vue +1 -1
- package/edit/auth/github.vue +8 -8
- package/edit/auth/googleoauth.vue +5 -5
- package/edit/auth/ldap/index.vue +1 -1
- package/edit/auth/oidc.vue +1 -1
- package/edit/auth/saml.vue +1 -1
- package/edit/cis.cattle.io.clusterscan.vue +1 -1
- package/edit/fleet.cattle.io.clustergroup.vue +6 -4
- package/edit/fleet.cattle.io.gitrepo.vue +32 -4
- package/edit/helm.cattle.io.projecthelmchart.vue +5 -1
- package/edit/logging.banzaicloud.io.output/index.vue +18 -5
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +1 -0
- package/edit/management.cattle.io.fleetworkspace.vue +141 -6
- package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +4 -1
- package/edit/management.cattle.io.setting.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +2 -2
- package/edit/monitoring.coreos.com.receiver/tls.vue +18 -18
- package/edit/monitoring.coreos.com.receiver/types/webhook.banner.vue +4 -4
- package/edit/monitoring.coreos.com.receiver/types/webhook.vue +1 -1
- package/edit/namespace.vue +14 -10
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +126 -45
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +21 -4
- package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +1 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +202 -2
- package/edit/provisioning.cattle.io.cluster/import.vue +23 -25
- package/edit/provisioning.cattle.io.cluster/rke2.vue +344 -102
- package/edit/resources.cattle.io.backup.vue +1 -1
- package/edit/service.vue +1 -1
- package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +2 -2
- package/edit/workload/__tests__/Job.test.ts +3 -1
- package/edit/workload/index.vue +8 -3
- package/edit/workload/mixins/workload.js +22 -7
- package/edit/workload/storage/Mount.vue +3 -3
- package/initialize/App.js +206 -0
- package/initialize/client.js +863 -0
- package/initialize/index.js +364 -0
- package/layouts/default.vue +7 -3
- package/layouts/standalone.vue +13 -0
- package/list/catalog.cattle.io.clusterrepo.vue +1 -0
- package/list/fleet.cattle.io.bundle.vue +6 -3
- package/list/fleet.cattle.io.clusterregistrationtoken.vue +3 -1
- package/list/fleet.cattle.io.gitrepo.vue +44 -5
- package/list/management.cattle.io.fleetworkspace.vue +45 -0
- package/list/node.vue +69 -16
- package/list/provisioning.cattle.io.cluster.vue +30 -1
- package/list/rbac.authorization.k8s.io.clusterrolebinding.vue +48 -0
- package/list/workload.vue +6 -4
- package/machine-config/azure.vue +97 -38
- package/middleware/authenticated.js +34 -0
- package/mixins/chart.js +101 -2
- package/mixins/fetch.client.js +95 -0
- package/mixins/fetch.server.js +73 -0
- package/mixins/labeled-form-element.ts +2 -2
- package/mixins/resource-fetch.js +2 -2
- package/models/apps.statefulset.js +28 -0
- package/models/cluster/node.js +23 -2
- package/models/cluster.x-k8s.io.machine.js +4 -2
- package/models/clusterroletemplatebinding.js +7 -0
- package/models/constraints.gatekeeper.sh.constraint.js +46 -0
- package/models/fleet.cattle.io.cluster.js +19 -10
- package/models/fleet.cattle.io.gitrepo.js +7 -2
- package/models/management.cattle.io.cluster.js +1 -1
- package/models/management.cattle.io.fleetworkspace.js +12 -0
- package/models/management.cattle.io.gitreporestriction.js +5 -0
- package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.js +3 -0
- package/models/pod.js +4 -0
- package/models/provisioning.cattle.io.cluster.js +7 -5
- package/models/rbac.authorization.k8s.io.clusterrolebinding.js +16 -0
- package/models/rbac.authorization.k8s.io.rolebinding.js +16 -0
- package/package.json +13 -21
- package/pages/auth/setup.vue +2 -2
- package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +33 -0
- package/pages/c/_cluster/apps/charts/chart.vue +4 -4
- package/pages/c/_cluster/apps/charts/install.helpers.js +26 -0
- package/pages/c/_cluster/apps/charts/install.vue +98 -102
- package/pages/c/_cluster/explorer/EventsTable.vue +5 -19
- package/pages/c/_cluster/explorer/index.vue +29 -25
- package/pages/c/_cluster/explorer/tools/index.vue +8 -8
- package/pages/c/_cluster/fleet/index.vue +95 -34
- package/pages/c/_cluster/gatekeeper/index.vue +1 -1
- package/pages/c/_cluster/istio/index.vue +5 -5
- package/pages/c/_cluster/manager/cloudCredential/index.vue +1 -1
- package/pages/c/_cluster/monitoring/index.vue +7 -0
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +8 -8
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +20 -7
- package/pages/c/_cluster/uiplugins/index.vue +49 -17
- package/pages/diagnostic.vue +32 -25
- package/pages/home.vue +9 -4
- package/pages/index.vue +10 -1
- package/pages/rio/mesh.vue +1 -2
- package/pkg/tsconfig.json +0 -1
- package/plugins/clean-html-directive.js +34 -0
- package/plugins/dashboard-store/actions.js +32 -9
- package/plugins/dashboard-store/index.js +1 -1
- package/plugins/dashboard-store/mutations.js +5 -2
- package/plugins/dashboard-store/resource-class.js +8 -1
- package/plugins/plugin.js +0 -14
- package/plugins/portal-vue.js +4 -0
- package/plugins/steve/mutations.js +3 -2
- package/plugins/steve/steve-description-class.js +5 -1
- package/plugins/steve/subscribe.js +63 -54
- package/plugins/steve-create-worker.js +14 -0
- package/promptRemove/management.cattle.io.globalrole.vue +2 -2
- package/promptRemove/management.cattle.io.project.vue +2 -2
- package/promptRemove/management.cattle.io.roletemplate.vue +2 -2
- package/promptRemove/pod.vue +1 -1
- package/public/index.html +65 -0
- package/rancher-components/components/Banner/Banner.test.ts +7 -1
- package/rancher-components/components/Banner/Banner.vue +2 -1
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +2 -0
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +31 -0
- package/rancher-components/components/Form/Radio/RadioButton.vue +14 -3
- package/scripts/build-pkg.sh +1 -0
- package/scripts/clean +6 -0
- package/scripts/extension/bundle +58 -0
- package/scripts/extension/helmpatch +89 -0
- package/scripts/extension/publish +333 -0
- package/scripts/serve-pkgs +6 -2
- package/scripts/test-plugins-build.sh +4 -0
- package/store/__tests__/index.test.ts +110 -0
- package/store/index.js +145 -58
- package/store/type-map.js +6 -2
- package/tsconfig.default.json +36 -0
- package/tsconfig.json +23 -0
- package/types/rancher/index.d.ts +2 -0
- package/types/shell/index.d.ts +466 -320
- package/utils/__tests__/grafana.test.ts +44 -0
- package/utils/__tests__/string.test.ts +12 -0
- package/utils/auth.js +65 -0
- package/utils/axios.js +190 -0
- package/utils/cookie-universal-nuxt.js +10 -0
- package/utils/dom.js +15 -0
- package/utils/grafana.js +35 -16
- package/utils/monitoring.js +2 -1
- package/utils/nuxt.js +659 -0
- package/utils/position.js +5 -8
- package/utils/router.scrollBehavior.js +80 -0
- package/utils/select.js +1 -3
- package/utils/socket.js +1 -0
- package/utils/string.js +13 -0
- package/utils/time.js +9 -0
- package/vue.config.js +690 -0
- package/chart/rancher-alerting-drivers.vue +0 -53
- package/chart/rancher-gatekeeper.vue +0 -37
- package/creators/app/files/nuxt.config.js +0 -6
- package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.ts +0 -4
- package/nuxt.config.js +0 -798
- package/plugins/dashboard-store/extensions.js +0 -22
package/config/table-headers.js
CHANGED
|
@@ -481,6 +481,14 @@ export const REASON = {
|
|
|
481
481
|
value: 'reason',
|
|
482
482
|
sort: ['reason']
|
|
483
483
|
};
|
|
484
|
+
export const OBJECT = {
|
|
485
|
+
name: 'object',
|
|
486
|
+
labelKey: 'tableHeaders.object',
|
|
487
|
+
value: 'involvedObject',
|
|
488
|
+
sort: ['involvedObject.kind', 'involvedObject.name'],
|
|
489
|
+
canBeVariable: true,
|
|
490
|
+
formatter: 'InvolvedObjectLink',
|
|
491
|
+
};
|
|
484
492
|
export const RECLAIM_POLICY = {
|
|
485
493
|
name: 'reclaimPolicy',
|
|
486
494
|
labelKey: 'tableHeaders.reclaimPolicy',
|
|
@@ -710,7 +718,7 @@ export const APP_SUMMARY = {
|
|
|
710
718
|
|
|
711
719
|
export const CONSTRAINT_VIOLATION_CONSTRAINT_LINK = {
|
|
712
720
|
name: 'Constraint',
|
|
713
|
-
|
|
721
|
+
labelKey: 'tableHeaders.constraint',
|
|
714
722
|
value: 'constraintLink',
|
|
715
723
|
sort: `constraintLink.text`,
|
|
716
724
|
formatter: 'Link',
|
|
@@ -719,30 +727,39 @@ export const CONSTRAINT_VIOLATION_CONSTRAINT_LINK = {
|
|
|
719
727
|
|
|
720
728
|
export const CONSTRAINT_VIOLATION_RESOURCE_LINK = {
|
|
721
729
|
name: 'Name',
|
|
722
|
-
|
|
730
|
+
labelKey: 'tableHeaders.name',
|
|
723
731
|
value: 'resourceLink',
|
|
724
732
|
sort: `resourceLink.text`,
|
|
733
|
+
search: `resourceLink.text`,
|
|
725
734
|
formatter: 'Link',
|
|
726
735
|
formatterOpts: { options: { internal: true } },
|
|
727
736
|
};
|
|
728
737
|
|
|
729
738
|
export const CONSTRAINT_VIOLATION_TYPE = {
|
|
730
|
-
name:
|
|
731
|
-
|
|
732
|
-
value:
|
|
733
|
-
sort:
|
|
739
|
+
name: 'Type',
|
|
740
|
+
labelKey: 'tableHeaders.type',
|
|
741
|
+
value: `kind`,
|
|
742
|
+
sort: `kind`
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
export const CONSTRAINT_VIOLATION_NAMESPACE = {
|
|
746
|
+
name: 'Namespace',
|
|
747
|
+
labelKey: 'tableHeaders.namespace',
|
|
748
|
+
value: `namespace`,
|
|
749
|
+
sort: `namespace`,
|
|
750
|
+
search: `namespace`,
|
|
734
751
|
};
|
|
735
752
|
|
|
736
753
|
export const CONSTRAINT_VIOLATION_MESSAGE = {
|
|
737
|
-
name:
|
|
738
|
-
|
|
739
|
-
value:
|
|
740
|
-
sort:
|
|
754
|
+
name: 'Message',
|
|
755
|
+
labelKey: 'tableHeaders.message',
|
|
756
|
+
value: `message`,
|
|
757
|
+
sort: `message`
|
|
741
758
|
};
|
|
742
759
|
|
|
743
760
|
export const CONSTRAINT_VIOLATION_TEMPLATE_LINK = {
|
|
744
761
|
name: 'TemplateLink',
|
|
745
|
-
|
|
762
|
+
labelKey: 'tableHeaders.template',
|
|
746
763
|
value: `templateLink`,
|
|
747
764
|
sort: `templateLink.text`,
|
|
748
765
|
formatter: 'Link',
|
|
@@ -751,7 +768,7 @@ export const CONSTRAINT_VIOLATION_TEMPLATE_LINK = {
|
|
|
751
768
|
|
|
752
769
|
export const CONSTRAINT_VIOLATION_COUNT = {
|
|
753
770
|
name: 'Count',
|
|
754
|
-
|
|
771
|
+
labelKey: 'tableHeaders.count',
|
|
755
772
|
value: `count`,
|
|
756
773
|
sort: `count`,
|
|
757
774
|
formatter: 'QualityText',
|
|
@@ -952,3 +969,28 @@ export const FLEET_BUNDLE_TYPE = {
|
|
|
952
969
|
sort: ['bundleType'],
|
|
953
970
|
width: 100,
|
|
954
971
|
};
|
|
972
|
+
|
|
973
|
+
// export const RBAC_ROLE = {
|
|
974
|
+
// name: 'role',
|
|
975
|
+
// value: 'roleRef.name',
|
|
976
|
+
// sort: ['roleRef.name'],
|
|
977
|
+
// };
|
|
978
|
+
|
|
979
|
+
export const RBAC_USERS = {
|
|
980
|
+
name: 'users',
|
|
981
|
+
sort: ['users'],
|
|
982
|
+
getValue: row => row.users?.map(({ name }) => name),
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
export const RBAC_GROUPS = {
|
|
986
|
+
name: 'groups',
|
|
987
|
+
sort: ['groups'],
|
|
988
|
+
|
|
989
|
+
getValue: row => row.groups?.map(({ name }) => name),
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
export const RBAC_SERVICE_ACCOUNTS = {
|
|
993
|
+
name: 'serviceAccount',
|
|
994
|
+
sort: ['serviceAccount'],
|
|
995
|
+
getValue: row => row.serviceAccounts?.map(({ name }) => name),
|
|
996
|
+
};
|
package/config/types.js
CHANGED
|
@@ -54,6 +54,7 @@ export const NETWORK_POLICY = 'networking.k8s.io.networkpolicy';
|
|
|
54
54
|
export const POD = 'pod';
|
|
55
55
|
export const POD_DISRUPTION_BUDGET = 'policy.poddisruptionbudget';
|
|
56
56
|
export const PSP = 'policy.podsecuritypolicy';
|
|
57
|
+
export const PSPS = 'policy.podsecuritypolicies';
|
|
57
58
|
export const PV = 'persistentvolume';
|
|
58
59
|
export const PVC = 'persistentvolumeclaim';
|
|
59
60
|
export const RESOURCE_QUOTA = 'resourcequota';
|
|
@@ -65,6 +66,8 @@ export const STORAGE_CLASS = 'storage.k8s.io.storageclass';
|
|
|
65
66
|
export const CSI_DRIVER = 'storage.k8s.io.csidriver';
|
|
66
67
|
export const OBJECT_META = 'io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta';
|
|
67
68
|
export const NETWORK_ATTACHMENT = 'k8s.cni.cncf.io.networkattachmentdefinition';
|
|
69
|
+
export const USER = 'user';
|
|
70
|
+
export const GROUP = 'group';
|
|
68
71
|
|
|
69
72
|
export const RBAC = {
|
|
70
73
|
ROLE: 'rbac.authorization.k8s.io.role',
|
|
@@ -92,6 +95,11 @@ const {
|
|
|
92
95
|
|
|
93
96
|
export const SCALABLE_WORKLOAD_TYPES = scalableWorkloads;
|
|
94
97
|
|
|
98
|
+
export const LIST_WORKLOAD_TYPES = {
|
|
99
|
+
...WORKLOAD_TYPES,
|
|
100
|
+
POD
|
|
101
|
+
};
|
|
102
|
+
|
|
95
103
|
export const METRIC = {
|
|
96
104
|
NODE: 'metrics.k8s.io.nodemetrics',
|
|
97
105
|
POD: 'metrics.k8s.io.podmetrics',
|
|
@@ -197,14 +205,16 @@ export const CAPI = {
|
|
|
197
205
|
// Base: /k8s/clusters/<id>/v1/
|
|
198
206
|
|
|
199
207
|
export const FLEET = {
|
|
200
|
-
BUNDLE:
|
|
201
|
-
BUNDLE_DEPLOYMENT:
|
|
202
|
-
CLUSTER:
|
|
203
|
-
CLUSTER_GROUP:
|
|
204
|
-
DASHBOARD:
|
|
205
|
-
GIT_REPO:
|
|
206
|
-
WORKSPACE:
|
|
207
|
-
TOKEN:
|
|
208
|
+
BUNDLE: 'fleet.cattle.io.bundle',
|
|
209
|
+
BUNDLE_DEPLOYMENT: 'fleet.cattle.io.bundledeployment',
|
|
210
|
+
CLUSTER: 'fleet.cattle.io.cluster',
|
|
211
|
+
CLUSTER_GROUP: 'fleet.cattle.io.clustergroup',
|
|
212
|
+
DASHBOARD: 'fleet.cattle.io.dashboard',
|
|
213
|
+
GIT_REPO: 'fleet.cattle.io.gitrepo',
|
|
214
|
+
WORKSPACE: 'management.cattle.io.fleetworkspace',
|
|
215
|
+
TOKEN: 'fleet.cattle.io.clusterregistrationtoken',
|
|
216
|
+
BUNDLE_NAMESPACE_MAPPING: 'fleet.cattle.io.bundlenamespacemapping',
|
|
217
|
+
GIT_REPO_RESTRICTION: 'fleet.cattle.io.gitreporestriction'
|
|
208
218
|
};
|
|
209
219
|
|
|
210
220
|
export const GATEKEEPER = {
|
package/config/uiplugins.js
CHANGED
|
@@ -33,6 +33,7 @@ export const UI_PLUGINS_REPO_BRANCH = 'main';
|
|
|
33
33
|
export const UI_PLUGIN_CHART_ANNOTATIONS = {
|
|
34
34
|
RANCHER_VERSION: 'catalog.cattle.io/rancher-version',
|
|
35
35
|
EXTENSIONS_VERSION: 'catalog.cattle.io/ui-extensions-version',
|
|
36
|
+
UI_VERSION: 'catalog.cattle.io/ui-version',
|
|
36
37
|
EXTENSIONS_HOST: 'catalog.cattle.io/ui-extensions-host',
|
|
37
38
|
DISPLAY_NAME: 'catalog.cattle.io/display-name',
|
|
38
39
|
};
|
|
@@ -128,3 +129,32 @@ export function isSupportedChartVersion(chartVersion, rancherVersion) {
|
|
|
128
129
|
|
|
129
130
|
return true;
|
|
130
131
|
}
|
|
132
|
+
|
|
133
|
+
export function isChartVersionAvailableForInstall(version, rancherVersion, returnObj = false) {
|
|
134
|
+
const parsedRancherVersion = rancherVersion.split('-')?.[0];
|
|
135
|
+
const regexHashString = new RegExp('^[A-Za-z0-9]{9}$');
|
|
136
|
+
const isRancherVersionHashString = regexHashString.test(rancherVersion);
|
|
137
|
+
const requiredUiVersion = version.annotations?.[UI_PLUGIN_CHART_ANNOTATIONS.UI_VERSION];
|
|
138
|
+
const versionObj = { ...version };
|
|
139
|
+
|
|
140
|
+
versionObj.isCompatibleWithUi = true;
|
|
141
|
+
|
|
142
|
+
// if it's a head version of Rancher, then we skip the validation and enable them all
|
|
143
|
+
if (!isRancherVersionHashString && requiredUiVersion && !semver.satisfies(parsedRancherVersion, requiredUiVersion)) {
|
|
144
|
+
if (!returnObj) {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
versionObj.isCompatibleWithUi = false;
|
|
148
|
+
versionObj.requiredUiVersion = requiredUiVersion;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (returnObj) {
|
|
152
|
+
return versionObj;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function isChartVersionHigher(versionA, versionB) {
|
|
159
|
+
return semver.gt(versionA, versionB);
|
|
160
|
+
}
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
title: What's New in 2.7
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## New in 2.7.2
|
|
6
|
+
|
|
7
|
+
### Kubernetes 1.25 and PSAs
|
|
8
|
+
|
|
9
|
+
- Kubernetes 1.25 GA takes PSAs (Pod Security Admissions) out of beta. PSAs replace the former PSP (Pod Security Policy) setup, which is a major change that impacts upgrades of Kubernetes.
|
|
10
|
+
|
|
11
|
+
## New in 2.7.1
|
|
12
|
+
|
|
13
|
+
- This was a security release to address a few CVEs and other bugs. Please see https://github.com/rancher/rancher/releases/tag/v2.7.1 for the full list of what was addressed.
|
|
14
|
+
|
|
5
15
|
## New in 2.7.0
|
|
6
16
|
|
|
7
17
|
### k3s provisioning is GA (x86 Only)
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
title: 2.7 的新功能
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
+
## 2.7.2 的新功能
|
|
6
|
+
|
|
7
|
+
### Kubernetes 1.25 和 PSA
|
|
8
|
+
|
|
9
|
+
- Kubernetes 1.25 GA 让 PSA(Pod Security Admissions)不再只是测试功能。PSA 取代了以前的 PSP(Pod 安全策略),这是 Kubernetes 升级的重大变化。
|
|
10
|
+
|
|
11
|
+
## 2.7.2 的新功能
|
|
12
|
+
|
|
13
|
+
- 这是一个安全版本,旨在修复 CVE 和其他错误。如需查看所有已解决的问题,请前往 https://github.com/rancher/rancher/releases/tag/v2.7.1。
|
|
14
|
+
|
|
5
15
|
## 2.7.0 的新功能
|
|
6
16
|
|
|
7
17
|
### K3s 配置已 GA(仅限 x86)
|
|
@@ -14,5 +24,5 @@ title: 2.7 的新功能
|
|
|
14
24
|
|
|
15
25
|
### OCI 对 Helm Fleet 的支持
|
|
16
26
|
|
|
17
|
-
- 现在支持对基于 OCI
|
|
27
|
+
- 现在支持对基于 OCI 的镜像仓库进行认证。请注意,fleet.yaml 的结构是相同的,并且凭证作为 Kubernetes Secret 提供(Repo Structure 文档的 Private Helm Repo 框中已进行了描述)。
|
|
18
28
|
|
package/core/plugin-routes.ts
CHANGED
|
@@ -89,6 +89,29 @@ export class PluginRoutes {
|
|
|
89
89
|
// Despite what the docs say, routes are not replaced, so we use a workaround
|
|
90
90
|
// Remove all routes that are being replaced
|
|
91
91
|
routes.forEach((r: RouteInfo) => {
|
|
92
|
+
// Patch colliding legacy routes that start /:product
|
|
93
|
+
if (r.route.path?.startsWith('/:product')) {
|
|
94
|
+
// Legacy pattern used by extensions - routes may collide, so modify them not to
|
|
95
|
+
let productName;
|
|
96
|
+
|
|
97
|
+
// If the route has a name (which is always the case for the extensions we have written), use it to get the product name
|
|
98
|
+
if (r.route.name) {
|
|
99
|
+
const nameParts = r.route.name.split('-');
|
|
100
|
+
|
|
101
|
+
// First part of the route name is the product name
|
|
102
|
+
productName = nameParts[0];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Use the plugin name as the product, if the route does not have a name
|
|
106
|
+
productName = productName || plugin.name;
|
|
107
|
+
|
|
108
|
+
// Replace the path - removing :product and using the actual product name instead - this avoids route collisions
|
|
109
|
+
r.route.path = `/${ productName }${ r.route.path.substr(9) }`;
|
|
110
|
+
r.route.meta = r.route.meta || {};
|
|
111
|
+
|
|
112
|
+
r.route.meta.product = r.route.meta.product || productName;
|
|
113
|
+
}
|
|
114
|
+
|
|
92
115
|
// See if the route exists
|
|
93
116
|
let existing: any;
|
|
94
117
|
|
package/core/plugin.ts
CHANGED
|
@@ -16,13 +16,15 @@ import {
|
|
|
16
16
|
PluginRouteConfig, RegisterStore, UnregisterStore, CoreStoreSpecifics, CoreStoreConfig, OnNavToPackage, OnNavAwayFromPackage, OnLogOut
|
|
17
17
|
} from '@shell/core/types';
|
|
18
18
|
|
|
19
|
+
export type ProductFunction = (plugin: IPlugin, store: any) => void;
|
|
20
|
+
|
|
19
21
|
export class Plugin implements IPlugin {
|
|
20
22
|
public id: string;
|
|
21
23
|
public name: string;
|
|
22
24
|
public types: any = {};
|
|
23
25
|
public l10n: { [key: string]: Function[] } = {};
|
|
24
26
|
public locales: { locale: string, label: string}[] = [];
|
|
25
|
-
public products:
|
|
27
|
+
public products: ProductFunction[] = [];
|
|
26
28
|
public productNames: string[] = [];
|
|
27
29
|
public routes: { parent?: string, route: RouteConfig }[] = [];
|
|
28
30
|
public stores: { storeName: string, register: RegisterStore, unregister: UnregisterStore }[] = [];
|
|
@@ -83,7 +85,7 @@ export class Plugin implements IPlugin {
|
|
|
83
85
|
return storeDSL;
|
|
84
86
|
}
|
|
85
87
|
|
|
86
|
-
addProduct(product:
|
|
88
|
+
addProduct(product: ProductFunction): void {
|
|
87
89
|
this.products.push(product);
|
|
88
90
|
}
|
|
89
91
|
|
package/core/types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProductFunction } from './plugin';
|
|
1
2
|
import { RouteConfig } from 'vue-router';
|
|
2
3
|
|
|
3
4
|
// package.json metadata
|
|
@@ -136,6 +137,255 @@ export type LocationConfig = {
|
|
|
136
137
|
mode?: string[]
|
|
137
138
|
};
|
|
138
139
|
|
|
140
|
+
export interface ProductOptions {
|
|
141
|
+
/**
|
|
142
|
+
* The category this product belongs under. i.e. 'config'
|
|
143
|
+
*/
|
|
144
|
+
category?: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Hide the Copy KubeConfig button in the header
|
|
148
|
+
*/
|
|
149
|
+
hideCopyConfig?: boolean;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Hide the Download KubeConfig button in the header
|
|
153
|
+
*/
|
|
154
|
+
hideKubeConfig?: boolean;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Hide the Kubectl Shell button in the header
|
|
158
|
+
*/
|
|
159
|
+
hideKubeShell?: boolean;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Hide the Namespace location
|
|
163
|
+
*/
|
|
164
|
+
hideNamespaceLocation?: boolean;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Hide the system resources
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
hideSystemResources?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* The icon that should be displayed beside this item in the navigation.
|
|
173
|
+
*/
|
|
174
|
+
icon?: string,
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Only load the product if the feature is present
|
|
178
|
+
*/
|
|
179
|
+
ifFeature?: string | RegExp;
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Only load the product if the type is present
|
|
183
|
+
*/
|
|
184
|
+
ifHave?: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Only load the product if the group is present
|
|
188
|
+
*/
|
|
189
|
+
ifHaveGroup?: string | RegExp;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Only load the product if the type is present
|
|
193
|
+
*/
|
|
194
|
+
ifHaveType?: string | RegExp;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The vuex store that this product should use by default i.e. 'management'
|
|
198
|
+
*/
|
|
199
|
+
inStore?: string;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Show the cluster switcher in the navigation
|
|
203
|
+
*/
|
|
204
|
+
showClusterSwitcher?: boolean;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Show the namespace filter in the header
|
|
208
|
+
*/
|
|
209
|
+
showNamespaceFilter?: boolean;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* A number used to determine where in navigation this item will be placed. The highest number will be at the top of the list.
|
|
213
|
+
*/
|
|
214
|
+
weight?: number;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.
|
|
218
|
+
*/
|
|
219
|
+
// ifHaveVerb: string | RegExp;
|
|
220
|
+
// removable: string;
|
|
221
|
+
// showWorkspaceSwitcher: boolean;
|
|
222
|
+
// supportRoute: string;
|
|
223
|
+
// to: string;
|
|
224
|
+
// typeStoreMap: string;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface HeaderOptions {
|
|
228
|
+
/**
|
|
229
|
+
* Name of the header. This should be unique.
|
|
230
|
+
*/
|
|
231
|
+
name?: string;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* A translation key where the resulting string will show in the table column
|
|
235
|
+
*/
|
|
236
|
+
labelKey?: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* A string which represents the path to access the value from the row object i.e. `row.meta.value`.
|
|
240
|
+
*/
|
|
241
|
+
value?: string;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* A string which represents the path to access the value from the row object which we'll use to sort i.e. `row.meta.value`
|
|
245
|
+
*/
|
|
246
|
+
sort?: string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* A string which represents the path to access the value from the row object which we'll use to search i.e. `row.meta.value`
|
|
250
|
+
*/
|
|
251
|
+
search?: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Number of pixels the column should be in the table
|
|
255
|
+
*/
|
|
256
|
+
width?: number;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* The name of a custom formatter. The available formatters can bee seen in `@rancher/shell/components/formatter`
|
|
260
|
+
*/
|
|
261
|
+
formatter?: string;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* These options are dependent on the formatter that's chosen. Examples can be seen in `@rancher/shell/components/formatter` and `@rancher/shell/config/table-headers`
|
|
265
|
+
*/
|
|
266
|
+
formatterOpts?: any;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Provide a function which accets a row and returns the value that should be displayed in the column
|
|
270
|
+
* @param row This can be any value which represents the row
|
|
271
|
+
* @returns Can return {@link string | number | null | undefined} to display in the column
|
|
272
|
+
*/
|
|
273
|
+
getValue?: (row: any) => string | number | null | undefined;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface ConfigureTypeOptions {
|
|
277
|
+
/**
|
|
278
|
+
* The resource can edit/show yaml
|
|
279
|
+
*/
|
|
280
|
+
canYaml?: boolean;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Modify the way the name looks when displayed
|
|
284
|
+
*/
|
|
285
|
+
displayName?: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* New resources can be created of this type
|
|
289
|
+
*/
|
|
290
|
+
isCreatable?: boolean;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Resources of this type can be deleted/removed
|
|
294
|
+
*/
|
|
295
|
+
isRemovable?: boolean;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* This type should be grouped by namespaces when displayed in a table
|
|
299
|
+
*/
|
|
300
|
+
namespaced?: boolean;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Show the age column in when displaying this type in a table
|
|
304
|
+
*/
|
|
305
|
+
showAge?: boolean;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Show the masthead at the top of the list view of this type
|
|
309
|
+
*/
|
|
310
|
+
showListMasthead?: boolean;
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Show the state column in when displaying this type in a table
|
|
314
|
+
*/
|
|
315
|
+
showState?: boolean;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.
|
|
319
|
+
*/
|
|
320
|
+
// alias
|
|
321
|
+
// customRoute
|
|
322
|
+
// customRoute
|
|
323
|
+
// depaginate
|
|
324
|
+
// graphConfig
|
|
325
|
+
// hasGraph
|
|
326
|
+
// isEditable
|
|
327
|
+
// limit
|
|
328
|
+
// listGroups
|
|
329
|
+
// localOnly
|
|
330
|
+
// location
|
|
331
|
+
// match
|
|
332
|
+
// realResource
|
|
333
|
+
// resource
|
|
334
|
+
// resourceDetail
|
|
335
|
+
// resourceEdit
|
|
336
|
+
// showConfigView
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export interface DSLReturnType {
|
|
340
|
+
/**
|
|
341
|
+
* Register multiple types by name and place them all in a group if desired. Primarily used for grouping things in the cluster explorer navigation.
|
|
342
|
+
* @param types A list of types that are going to be registered
|
|
343
|
+
* @param group Conditionally a group you want to places all the types in
|
|
344
|
+
* @returns {@link void}
|
|
345
|
+
*/
|
|
346
|
+
basicType: (types: string[], group?: string) => void;
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Configure a myriad of options for the specified type
|
|
350
|
+
* @param type The type to be configured
|
|
351
|
+
* @param options {@link ConfigureTypeOptions}
|
|
352
|
+
* @returns {@link void}
|
|
353
|
+
*/
|
|
354
|
+
configureType: (type: string, options: ConfigureTypeOptions) => void;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Register the headers/columns that should be used when rendering a table for the specified type.
|
|
358
|
+
* @param type The type you'd like to register headers/columns for.
|
|
359
|
+
* @param headers {@link HeaderOptions[]}
|
|
360
|
+
* @returns {@link void}
|
|
361
|
+
*/
|
|
362
|
+
headers: (type: string, headers: HeaderOptions[]) => void;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Create and register a new product
|
|
366
|
+
* @param options {@link ProductOptions}
|
|
367
|
+
* @returns {@link void}
|
|
368
|
+
*/
|
|
369
|
+
product: (options: ProductOptions) => void;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.
|
|
373
|
+
*/
|
|
374
|
+
// componentForType: (type: string, replacementType: string)
|
|
375
|
+
// groupBy: (type: string, field: string)
|
|
376
|
+
// hideBulkActions: (type: string, field)
|
|
377
|
+
// ignoreGroup: (regexOrString)
|
|
378
|
+
// ignoreType: (regexOrString)
|
|
379
|
+
// mapGroup: (match, replace)
|
|
380
|
+
// mapType: (match, replace)
|
|
381
|
+
// moveType: (match, group)
|
|
382
|
+
// setGroupDefaultType: (input, defaultType)
|
|
383
|
+
// spoofedType: (obj)
|
|
384
|
+
// virtualType: (obj)
|
|
385
|
+
// weightGroup: (input, weight, forBasic)
|
|
386
|
+
// weightType: (input, weight, forBasic)
|
|
387
|
+
}
|
|
388
|
+
|
|
139
389
|
/**
|
|
140
390
|
* Interface for a Dashboard plugin
|
|
141
391
|
*/
|
|
@@ -144,7 +394,7 @@ export interface IPlugin {
|
|
|
144
394
|
* Add a product
|
|
145
395
|
* @param importFn Function that will import the module containing a product definition
|
|
146
396
|
*/
|
|
147
|
-
addProduct(importFn:
|
|
397
|
+
addProduct(importFn: ProductFunction): void;
|
|
148
398
|
|
|
149
399
|
/**
|
|
150
400
|
* Add a locale to the i18n store
|
|
@@ -249,4 +499,11 @@ export interface IPlugin {
|
|
|
249
499
|
* @param {Function} fn function that dynamically loads the module for the thing being registered
|
|
250
500
|
*/
|
|
251
501
|
register(type: string, name: string, fn: Function): void;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Will return all of the configuration functions used for creating a new product.
|
|
505
|
+
* @param store The store that was passed to the function that's passed to `plugin.addProduct(function)`
|
|
506
|
+
* @param productName The name of the new product. This name is displayed in the navigation.
|
|
507
|
+
*/
|
|
508
|
+
DSL(store: any, productName: string): DSLReturnType;
|
|
252
509
|
}
|
package/creators/app/init
CHANGED
|
@@ -4,14 +4,14 @@ const path = require('path');
|
|
|
4
4
|
const fs = require('fs-extra');
|
|
5
5
|
|
|
6
6
|
const targets = {
|
|
7
|
-
dev: './node_modules/.bin/
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
dev: 'NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve',
|
|
8
|
+
build: './node_modules/.bin/vue-cli-service build',
|
|
9
|
+
clean: './node_modules/@rancher/shell/scripts/clean'
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const files = [
|
|
13
13
|
'tsconfig.json',
|
|
14
|
-
'
|
|
14
|
+
'vue.config.js',
|
|
15
15
|
'.eslintignore',
|
|
16
16
|
'.eslintrc.js',
|
|
17
17
|
'babel.config.js',
|
|
@@ -24,7 +24,7 @@ console.log('Creating Skeleton Application');
|
|
|
24
24
|
const args = process.argv;
|
|
25
25
|
let appFolder = path.resolve('.');
|
|
26
26
|
|
|
27
|
-
if (args.length
|
|
27
|
+
if (args.length === 3) {
|
|
28
28
|
const name = args[2];
|
|
29
29
|
const folder = path.resolve('.');
|
|
30
30
|
|