@rancher/shell 3.0.0-rc.3 → 3.0.0-rc.4
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/styles/base/_variables.scss +12 -4
- package/assets/styles/global/_layout.scss +1 -1
- package/assets/translations/en-us.yaml +61 -26
- package/assets/translations/zh-hans.yaml +6 -5
- package/chart/istio.vue +2 -0
- package/chart/monitoring/ClusterSelector.vue +2 -0
- package/chart/monitoring/StorageClassSelector.vue +4 -1
- package/chart/monitoring/index.vue +2 -0
- package/chart/rancher-backup/S3.vue +2 -0
- package/chart/rancher-backup/index.vue +2 -0
- package/cloud-credential/aws.vue +2 -0
- package/cloud-credential/azure.vue +2 -0
- package/cloud-credential/digitalocean.vue +2 -0
- package/cloud-credential/gcp.vue +2 -0
- package/cloud-credential/generic.vue +2 -0
- package/cloud-credential/harvester.vue +2 -0
- package/cloud-credential/linode.vue +2 -0
- package/cloud-credential/pnap.vue +2 -0
- package/cloud-credential/s3.vue +2 -0
- package/cloud-credential/vmwarevsphere.vue +2 -0
- package/components/ActionMenu.vue +4 -1
- package/components/AppModal.vue +4 -1
- package/components/ButtonDropdown.vue +3 -0
- package/components/ButtonGroup.vue +2 -0
- package/components/ButtonMultiAction.vue +41 -0
- package/components/Carousel.vue +3 -0
- package/components/CodeMirror.vue +6 -4
- package/components/Collapse.vue +4 -1
- package/components/CollapsibleCard.vue +4 -1
- package/components/ContainerResourceLimit.vue +2 -0
- package/components/CopyCode.vue +8 -4
- package/components/CopyToClipboardText.vue +2 -0
- package/components/CruResource.vue +2 -0
- package/components/CruResourceFooter.vue +2 -0
- package/components/Dialog.vue +2 -0
- package/components/DisableAuthProviderModal.vue +4 -1
- package/components/EmberPage.vue +2 -0
- package/components/ExplorerProjectsNamespaces.vue +11 -8
- package/components/GlobalRoleBindings.vue +2 -0
- package/components/Import.vue +2 -0
- package/components/InputOrDisplay.vue +23 -18
- package/components/Loading.vue +4 -1
- package/components/Markdown.vue +2 -0
- package/components/ModalWithCard.vue +2 -0
- package/components/MoveModal.vue +2 -0
- package/components/PodSecurityAdmission.vue +2 -0
- package/components/Questions/Array.vue +2 -0
- package/components/Questions/Boolean.vue +2 -0
- package/components/Questions/CloudCredential.vue +2 -0
- package/components/Questions/Enum.vue +2 -0
- package/components/Questions/Float.vue +2 -0
- package/components/Questions/Int.vue +2 -0
- package/components/Questions/QuestionMap.vue +4 -1
- package/components/Questions/Radio.vue +2 -0
- package/components/Questions/Reference.vue +2 -0
- package/components/Questions/String.vue +2 -0
- package/components/Questions/Yaml.vue +2 -0
- package/components/Questions/index.vue +2 -0
- package/components/ResourceCancelModal.vue +2 -0
- package/components/ResourceDetail/Masthead.vue +4 -3
- package/components/ResourceDetail/index.vue +17 -15
- package/components/ResourceTable.vue +2 -0
- package/components/ResourceYaml.vue +2 -0
- package/components/SelectIconGrid.vue +2 -0
- package/components/SimpleBox.vue +2 -0
- package/components/SortableTable/THead.vue +2 -0
- package/components/SortableTable/index.vue +15 -19
- package/components/StatusTable.vue +2 -0
- package/components/Tabbed/Tab.vue +2 -0
- package/components/Tabbed/index.vue +2 -0
- package/components/Wizard.vue +2 -0
- package/components/YamlEditor.vue +2 -0
- package/components/__tests__/ButtonMultiAction.test.ts +31 -0
- package/components/auth/RoleDetailEdit.vue +2 -0
- package/components/auth/SelectPrincipal.vue +2 -0
- package/components/auth/login/ldap.vue +2 -0
- package/components/form/ArrayList.vue +16 -1
- package/components/form/ArrayListSelect.vue +2 -0
- package/components/form/ChangePassword.vue +2 -0
- package/components/form/ColorInput.vue +2 -0
- package/components/form/Command.vue +2 -0
- package/components/form/FileImageSelector.vue +2 -0
- package/components/form/FileSelector.vue +2 -0
- package/components/form/Footer.vue +2 -0
- package/components/form/GitPicker.vue +1 -0
- package/components/form/HealthCheck.vue +5 -3
- package/components/form/HookOption.vue +22 -18
- package/components/form/InputWithSelect.vue +3 -1
- package/components/form/KeyValue.vue +2 -0
- package/components/form/LabeledSelect.vue +13 -3
- package/components/form/LifecycleHooks.vue +2 -0
- package/components/form/MatchExpressions.vue +2 -0
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -0
- package/components/form/Members/MembershipEditor.vue +2 -0
- package/components/form/NameNsDescription.vue +4 -1
- package/components/form/Networking.vue +2 -0
- package/components/form/NodeAffinity.vue +4 -1
- package/components/form/Password.vue +2 -0
- package/components/form/PlusMinus.vue +2 -0
- package/components/form/PodAffinity.vue +4 -1
- package/components/form/Ports.vue +2 -0
- package/components/form/Probe.vue +8 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +2 -0
- package/components/form/ResourceQuota/Project.vue +2 -0
- package/components/form/ResourceQuota/ProjectRow.vue +2 -0
- package/components/form/RuleSelector.vue +2 -0
- package/components/form/SecretSelector.vue +1 -0
- package/components/form/Security.vue +5 -2
- package/components/form/Select.vue +2 -1
- package/components/form/SelectOrCreateAuthSecret.vue +2 -0
- package/components/form/ServiceNameSelect.vue +2 -0
- package/components/form/ServicePorts.vue +2 -0
- package/components/form/ShellInput.vue +2 -0
- package/components/form/SimpleSecretSelector.vue +2 -0
- package/components/form/Taints.vue +2 -0
- package/components/form/Tolerations.vue +2 -0
- package/components/form/ValueFromResource.vue +2 -0
- package/components/form/WorkloadPorts.vue +5 -3
- package/components/form/__tests__/HookOption.test.ts +28 -0
- package/components/form/__tests__/LabeledSelect.test.ts +42 -0
- package/components/form/__tests__/Probe.test.ts +12 -0
- package/components/nav/Header.vue +17 -141
- package/components/nav/HeaderPageActionMenu.vue +173 -0
- package/components/nav/Jump.vue +2 -0
- package/components/nav/NamespaceFilter.vue +5 -1
- package/components/nav/Type.vue +28 -2
- package/components/nav/WindowManager/ContainerShell.vue +6 -12
- package/components/nav/WindowManager/index.vue +2 -0
- package/components/nav/__tests__/Type.test.ts +68 -24
- package/composables/useClickOutside.ts +81 -0
- package/config/product/cis.js +4 -3
- package/config/product/manager.js +1 -0
- package/config/router/routes.js +1 -1
- package/config/table-headers.js +0 -10
- package/config/uiplugins.js +186 -143
- package/config/version.js +10 -0
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +2 -0
- package/detail/configmap.vue +2 -0
- package/detail/fleet.cattle.io.cluster.vue +2 -0
- package/detail/fleet.cattle.io.clustergroup.vue +2 -0
- package/detail/fleet.cattle.io.gitrepo.vue +2 -0
- package/detail/harvesterhci.io.management.cluster.vue +2 -0
- package/detail/management.cattle.io.roletemplate.vue +4 -4
- package/detail/management.cattle.io.user.vue +2 -0
- package/detail/namespace.vue +2 -0
- package/detail/networking.k8s.io.ingress.vue +1 -0
- package/detail/node.vue +2 -0
- package/detail/provisioning.cattle.io.cluster.vue +2 -0
- package/detail/secret.vue +2 -0
- package/detail/service.vue +2 -0
- package/detail/workload/index.vue +1 -1
- package/dialog/AddClusterMemberDialog.vue +2 -0
- package/dialog/AddCustomBadgeDialog.vue +3 -1
- package/dialog/AddProjectMemberDialog.vue +2 -0
- package/dialog/AddonConfigConfirmationDialog.vue +2 -0
- package/dialog/DeactivateDriverDialog.vue +2 -0
- package/dialog/DiagnosticTimingsDialog.vue +2 -0
- package/dialog/DrainNode.vue +2 -0
- package/dialog/ForceMachineRemoveDialog.vue +2 -0
- package/dialog/GenericPrompt.vue +2 -0
- package/dialog/RollbackWorkloadDialog.vue +2 -0
- package/dialog/RotateCertificatesDialog.vue +2 -0
- package/dialog/RotateEncryptionKeyDialog.vue +2 -0
- package/dialog/SaveAsRKETemplateDialog.vue +2 -0
- package/dialog/ScaleMachineDownDialog.vue +2 -0
- package/dialog/ScalePoolDownDialog.vue +2 -0
- package/dialog/SloDialog.vue +2 -0
- package/edit/auth/ldap/config.vue +2 -0
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -2
- package/edit/catalog.cattle.io.clusterrepo.vue +2 -0
- package/edit/cis.cattle.io.clusterscan.vue +38 -18
- package/edit/cloudcredential.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +2 -0
- package/edit/fleet.cattle.io.cluster.vue +2 -0
- package/edit/fleet.cattle.io.clustergroup.vue +4 -1
- package/edit/fleet.cattle.io.gitrepo.vue +2 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +2 -0
- package/edit/logging-flow/Match.vue +2 -0
- package/edit/logging-flow/index.vue +10 -8
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +3 -3
- package/edit/management.cattle.io.fleetworkspace.vue +4 -1
- package/edit/management.cattle.io.project.vue +2 -0
- package/edit/management.cattle.io.roletemplate.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +2 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -0
- package/edit/namespace.vue +1 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +2 -0
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -1
- package/edit/networking.k8s.io.ingress/Rule.vue +1 -0
- package/edit/networking.k8s.io.ingress/RulePath.vue +20 -23
- package/edit/networking.k8s.io.ingress/index.vue +1 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -0
- package/edit/node.vue +2 -0
- package/edit/persistentvolumeclaim.vue +1 -0
- package/edit/policy.poddisruptionbudget.vue +3 -1
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/Labels.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +38 -13
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +32 -65
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +1 -0
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +2 -0
- package/edit/resources.cattle.io.backup.vue +2 -2
- package/edit/secret/index.vue +2 -0
- package/edit/service.vue +2 -1
- package/edit/ui.cattle.io.navlink.vue +1 -0
- package/edit/workload/Job.vue +3 -2
- package/edit/workload/Upgrading.vue +1 -0
- package/edit/workload/index.vue +18 -7
- package/edit/workload/storage/ContainerMountPaths.vue +37 -97
- package/edit/workload/storage/awsElasticBlockStore.vue +1 -1
- package/edit/workload/storage/azureDisk.vue +1 -1
- package/edit/workload/storage/csi/driver.longhorn.io.vue +2 -0
- package/edit/workload/storage/ephemeralVolume/index.vue +2 -0
- package/edit/workload/storage/gcePersistentDisk.vue +1 -1
- package/edit/workload/storage/index.vue +38 -22
- package/edit/workload/storage/persistentVolumeClaim/index.vue +2 -0
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +1 -0
- package/edit/workload/storage/vsphereVolume.vue +1 -1
- package/initialize/install-components.js +0 -12
- package/initialize/install-plugins.js +4 -5
- package/machine-config/azure.vue +2 -0
- package/machine-config/generic.vue +2 -0
- package/machine-config/vmwarevsphere.vue +2 -0
- package/mixins/resource-manager.js +1 -1
- package/models/cis.cattle.io.clusterscan.js +17 -16
- package/models/cis.cattle.io.clusterscanprofile.js +17 -0
- package/models/management.cattle.io.user.js +3 -3
- package/models/provisioning.cattle.io.cluster.js +2 -1
- package/models/steve-schema.ts +1 -1
- package/models/workload.js +2 -1
- package/package.json +4 -6
- package/pages/c/_cluster/apps/charts/chart.vue +3 -1
- package/pages/c/_cluster/apps/charts/install.vue +5 -56
- package/pages/c/_cluster/fleet/index.vue +0 -1
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -0
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +2 -0
- package/pages/c/_cluster/settings/performance.vue +2 -2
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +11 -16
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +2 -0
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +6 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -17
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +3 -6
- package/pages/c/_cluster/uiplugins/index.vue +93 -92
- package/pkg/vue.config.js +2 -0
- package/plugins/plugin.js +27 -19
- package/plugins/version.js +3 -13
- package/promptRemove/pod.vue +2 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +14 -8
- package/rancher-components/Form/Radio/RadioButton.vue +0 -1
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +17 -9
- package/rancher-components/StringList/StringList.vue +6 -15
- package/scripts/extension/bundle +1 -1
- package/scripts/extension/publish +174 -99
- package/store/catalog.js +0 -26
- package/store/growl.js +8 -5
- package/utils/cluster.js +9 -0
- package/utils/versions.ts +39 -0
- package/vue.config.js +5 -0
- package/components/form/PodSecurity.vue +0 -168
- package/components/formatter/Weight.vue +0 -147
- package/components/nuxt/nuxt-build-indicator.vue +0 -170
- package/components/nuxt/nuxt-child.js +0 -52
- package/components/nuxt/nuxt-error.vue +0 -128
- package/components/nuxt/nuxt-link.client.js +0 -17
- package/components/nuxt/nuxt-loading.vue +0 -165
|
@@ -18,6 +18,8 @@ FORCE="false"
|
|
|
18
18
|
GITHUB_BUILD="true"
|
|
19
19
|
GITHUB_RELEASE_TAG=""
|
|
20
20
|
PODMAN_CONTAINER="false"
|
|
21
|
+
UPDATE_OLD_PACKAGES="true"
|
|
22
|
+
UPDATE_LATEST_PACAKGES="true"
|
|
21
23
|
|
|
22
24
|
GITHUB_SOURCE=$(git config --get remote.origin.url | sed -e 's/^git@.*:\([[:graph:]]*\).git/\1/')
|
|
23
25
|
GITHUB_BRANCH="main"
|
|
@@ -35,10 +37,12 @@ usage() {
|
|
|
35
37
|
echo " -o <name> Specify destination container registry organization for built images"
|
|
36
38
|
echo " -i <prefix> Specify prefix for the built container image (default: 'ui-extension-')"
|
|
37
39
|
echo " -l Specify Podman container build"
|
|
40
|
+
echo " -n Do not check for updates to existing Charts (Chart.yaml)"
|
|
41
|
+
echo " -e Only check for updates to existing Charts (Chart.yaml)"
|
|
38
42
|
exit 1
|
|
39
43
|
}
|
|
40
44
|
|
|
41
|
-
while getopts "hvr:o:pi:fcb:t:s:
|
|
45
|
+
while getopts "hvr:o:pi:fcb:t:s:lne" opt; do
|
|
42
46
|
case $opt in
|
|
43
47
|
h)
|
|
44
48
|
usage
|
|
@@ -75,6 +79,13 @@ while getopts "hvr:o:pi:fcb:t:s:l" opt; do
|
|
|
75
79
|
l)
|
|
76
80
|
PODMAN_CONTAINER="true"
|
|
77
81
|
;;
|
|
82
|
+
n)
|
|
83
|
+
UPDATE_OLD_PACKAGES="false"
|
|
84
|
+
;;
|
|
85
|
+
e)
|
|
86
|
+
UPDATE_OLD_PACKAGES="true"
|
|
87
|
+
UPDATE_LATEST_PACAKGES="false"
|
|
88
|
+
;;
|
|
78
89
|
*)
|
|
79
90
|
usage
|
|
80
91
|
;;
|
|
@@ -211,137 +222,201 @@ CHART_TEMPLATE=${BASE_DIR}/tmp/helm
|
|
|
211
222
|
ROOT_INDEX=${BASE_DIR}/index.yaml
|
|
212
223
|
|
|
213
224
|
# --------------------------------------------------------------------------------
|
|
214
|
-
# Iterate through all
|
|
225
|
+
# Iterate through all existing charts and look for updates/removals
|
|
215
226
|
# --------------------------------------------------------------------------------
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if [ -z "$1" ] || [[ " ${PLUGINS[*]} " =~ " ${pkg} " ]]; then
|
|
220
|
-
# Check we don't already have a published version by looking in the assets folder
|
|
221
|
-
PKG_VERSION=$(jq -r .version ./pkg/${pkg}/package.json)
|
|
222
|
-
PKG_NAME="${pkg}-${PKG_VERSION}"
|
|
223
|
-
PKG_ASSET=${ASSETS}/${pkg}/${PKG_NAME}.tgz
|
|
224
|
-
|
|
225
|
-
# Skip the build for a package that does not match the tagged release name
|
|
226
|
-
if [[ -n "${GITHUB_RELEASE_TAG}" ]] && [ ${GITHUB_BUILD} == "true" ] && [[ ${GITHUB_RELEASE_TAG} != ${PKG_NAME} ]]; then
|
|
227
|
-
echo -e "${YELLOW}Github release tag ${RESET}${BOLD}${GITHUB_RELEASE_TAG}${RESET}${YELLOW} does not match asset name${RESET}"
|
|
228
|
-
echo -e "${YELLOW}Skipping ${RESET}${BOLD}${PKG_NAME}${RESET}"
|
|
229
|
-
continue
|
|
230
|
-
fi
|
|
227
|
+
if [ "${UPDATE_OLD_PACKAGES}" = "true" ]; then
|
|
228
|
+
pushd ${ASSETS} > /dev/null
|
|
229
|
+
echo -e "${CYAN}${BOLD}Checking existing charts for updates ...${RESET}"
|
|
231
230
|
|
|
232
|
-
|
|
231
|
+
for FOLDER_NAME in */ ; do
|
|
232
|
+
EXT_NAME=${FOLDER_NAME::${#FOLDER_NAME}-1}
|
|
233
|
+
echo -e "${CYAN}${EXT_NAME}${RESET}"
|
|
233
234
|
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
for CHART_ARCHIVE in ${EXT_NAME}/*.tgz ; do
|
|
236
|
+
rm -f ${TMP}/Chart.yaml
|
|
236
237
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
# --------------------------------------------------------------------------------
|
|
240
|
-
echo -e "${CYAN}Building extension from source code${RESET}"
|
|
241
|
-
FORCE_COLOR=1 yarn build-pkg $pkg | cat
|
|
238
|
+
# path in chart may be different to tar file name, so extratct the Chart.yaml file to the top-level folder
|
|
239
|
+
tar --strip-components=1 -C ${TMP} -xf ${CHART_ARCHIVE} */Chart.yaml
|
|
242
240
|
|
|
243
|
-
|
|
241
|
+
EXISTING_MD5=$(md5 -q ${TMP}/Chart.yaml)
|
|
242
|
+
VERSION=$(yq eval .version ${TMP}/Chart.yaml)
|
|
244
243
|
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
CHART_FOLDER=${CHARTS}/${EXT_NAME}/${VERSION}
|
|
245
|
+
LATEST=${CHART_FOLDER}/Chart.yaml
|
|
247
246
|
|
|
248
|
-
|
|
247
|
+
if [ ! -f "${LATEST}" ]; then
|
|
248
|
+
echo " - Chart for ${EXT}-${VERSION} appears to have been deleted - removing chart archive: ${CHART_ARCHIVE}"
|
|
249
|
+
rm -f ${ASSETS}/${CHART_ARCHIVE}
|
|
250
|
+
BUILT="true"
|
|
251
|
+
else
|
|
252
|
+
# Re-package the helm chart so that the Chart.yaml is processed in the same way so we can compare it
|
|
253
|
+
mkdir -p ${TMP}/tmp_chart
|
|
254
|
+
helm package ${CHART_FOLDER} -d ${TMP}/tmp_chart > /dev/null
|
|
255
|
+
rm ${TMP}/Chart.yaml
|
|
249
256
|
|
|
250
|
-
|
|
257
|
+
# path in chart may be different to tar file name, so list the files to find what the chart archive is named
|
|
258
|
+
FILENAME=$(cd ${TMP}/tmp_chart; ls)
|
|
251
259
|
|
|
252
|
-
|
|
253
|
-
|
|
260
|
+
# path in chart may be different to tar file name, so extratct the Chart.yaml file to the top-level folder
|
|
261
|
+
tar --strip-components=1 -C ${TMP} -xf ${TMP}/tmp_chart/${FILENAME} */Chart.yaml
|
|
262
|
+
LATEST_MD5=$(md5 -q ${TMP}/Chart.yaml)
|
|
254
263
|
|
|
255
|
-
|
|
256
|
-
rm -f plugin/report.html
|
|
257
|
-
find plugin -type f | sort > files.txt
|
|
258
|
-
popd > /dev/null
|
|
264
|
+
rm -f $TMP/tmp_chart/${FILENAME}
|
|
259
265
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
# --------------------------------------------------------------------------------
|
|
266
|
+
if [ "${EXISTING_MD5}" != "${LATEST_MD5}" ]; then
|
|
267
|
+
BUILT="true"
|
|
263
268
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
269
|
+
echo " + Chart.yaml has changed for ${CHART_ARCHIVE}"
|
|
270
|
+
# Chart was already re-generated - update ir
|
|
271
|
+
rm ${CHART_ARCHIVE}
|
|
272
|
+
helm package ${CHART_FOLDER} -d ${ASSETS}/${EXT_NAME}
|
|
273
|
+
fi
|
|
274
|
+
fi
|
|
268
275
|
|
|
269
|
-
|
|
276
|
+
rm -d ${TMP}/tmp_chart
|
|
277
|
+
rm ${TMP}/Chart.yaml
|
|
278
|
+
|
|
279
|
+
done
|
|
280
|
+
done
|
|
270
281
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
mkdir -p ${CHART_FOLDER}
|
|
282
|
+
popd > /dev/null
|
|
283
|
+
fi
|
|
274
284
|
|
|
275
|
-
|
|
285
|
+
# --------------------------------------------------------------------------------
|
|
286
|
+
# Iterate through all packages - built them all or build only those specified on the command line
|
|
287
|
+
# --------------------------------------------------------------------------------
|
|
288
|
+
if [ "${UPDATE_LATEST_PACAKGES}" = "true" ]; then
|
|
289
|
+
for d in pkg/*/ ; do
|
|
290
|
+
pkg=$(basename $d)
|
|
291
|
+
|
|
292
|
+
if [ -z "$1" ] || [[ " ${PLUGINS[*]} " =~ " ${pkg} " ]]; then
|
|
293
|
+
# Check we don't already have a published version by looking in the assets folder
|
|
294
|
+
PKG_VERSION=$(jq -r .version ./pkg/${pkg}/package.json)
|
|
295
|
+
PKG_NAME="${pkg}-${PKG_VERSION}"
|
|
296
|
+
PKG_ASSET=${ASSETS}/${pkg}/${PKG_NAME}.tgz
|
|
297
|
+
|
|
298
|
+
# Skip the build for a package that does not match the tagged release name
|
|
299
|
+
if [[ -n "${GITHUB_RELEASE_TAG}" ]] && [ ${GITHUB_BUILD} == "true" ] && [[ ${GITHUB_RELEASE_TAG} != ${PKG_NAME} ]]; then
|
|
300
|
+
echo -e "${YELLOW}Github release tag ${RESET}${BOLD}${GITHUB_RELEASE_TAG}${RESET}${YELLOW} does not match asset name${RESET}"
|
|
301
|
+
echo -e "${YELLOW}Skipping ${RESET}${BOLD}${PKG_NAME}${RESET}"
|
|
302
|
+
continue
|
|
303
|
+
fi
|
|
276
304
|
|
|
277
|
-
|
|
278
|
-
# Use the script from the template repository
|
|
279
|
-
echo -e "${CYAN}Patching Helm chart template${RESET}"
|
|
305
|
+
echo -e "${CYAN}${BOLD}Building extension: ${pkg} (${PKG_VERSION}) ${RESET}"
|
|
280
306
|
|
|
281
|
-
|
|
307
|
+
echo "Package version: ${PKG_VERSION}"
|
|
308
|
+
echo "Package folder: ${PKG_NAME}"
|
|
282
309
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
310
|
+
# --------------------------------------------------------------------------------
|
|
311
|
+
# Build the plugin from source
|
|
312
|
+
# --------------------------------------------------------------------------------
|
|
313
|
+
echo -e "${CYAN}Building extension from source code${RESET}"
|
|
314
|
+
FORCE_COLOR=1 yarn build-pkg $pkg | cat
|
|
287
315
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
if [ "${GITHUB_BUILD}" == "true" ]; then
|
|
291
|
-
echo "Patching for GitHub build"
|
|
292
|
-
ENDPOINT=https://raw.githubusercontent.com/${GITHUB_SOURCE}/${GITHUB_BRANCH}/extensions/${pkg}/${PKG_VERSION}
|
|
293
|
-
else
|
|
294
|
-
echo "Patching for container build"
|
|
295
|
-
ENDPOINT=http://${IMAGE_PREFIX}${BASE_EXT}-svc.cattle-ui-plugin-system:8080/plugin/${PKG_NAME}
|
|
296
|
-
fi
|
|
297
|
-
sed -i.bak -e 's@endpoint: .*@endpoint: '"${ENDPOINT}"'@g' cr.yaml
|
|
298
|
-
rm *.bak
|
|
299
|
-
popd > /dev/null
|
|
316
|
+
echo -e "${CYAN}Adding extension code ...${RESET}"
|
|
300
317
|
|
|
301
|
-
|
|
302
|
-
|
|
318
|
+
EXT_FOLDER=${BASE_DIR}/extensions/${pkg}/${PKG_VERSION}
|
|
319
|
+
PKG_DIST="${BASE_DIR}/dist-pkg/${PKG_NAME}"
|
|
303
320
|
|
|
304
|
-
|
|
305
|
-
helm package ${CHART_FOLDER} -d ${ASSETS}/${pkg}
|
|
321
|
+
rm -rf ${EXT_FOLDER}
|
|
306
322
|
|
|
307
|
-
|
|
308
|
-
# Update the helm index just for this chart
|
|
309
|
-
# --------------------------------------------------------------------------------
|
|
310
|
-
HELM_INDEX=${BASE_DIR}/index.yaml
|
|
323
|
+
mkdir -p ${EXT_FOLDER}/plugin
|
|
311
324
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
325
|
+
# Copy the code into the folder
|
|
326
|
+
cp -R ${PKG_DIST}/* ${EXT_FOLDER}/plugin
|
|
327
|
+
|
|
328
|
+
pushd ${BASE_DIR}/extensions/${pkg}/${PKG_VERSION} > /dev/null
|
|
329
|
+
rm -f plugin/report.html
|
|
330
|
+
find plugin -type f | sort > files.txt
|
|
331
|
+
popd > /dev/null
|
|
332
|
+
|
|
333
|
+
# --------------------------------------------------------------------------------
|
|
334
|
+
# Create the Helm chart
|
|
335
|
+
# --------------------------------------------------------------------------------
|
|
336
|
+
|
|
337
|
+
if [ -f ${PKG_ASSET} ] && [ "${FORCE}" == "false" ]; then
|
|
338
|
+
echo -e "${YELLOW}Helm chart has already been created - skipping (run with -f to force build)${RESET}"
|
|
339
|
+
continue;
|
|
340
|
+
fi
|
|
317
341
|
|
|
318
|
-
|
|
319
|
-
HELM_INDEX="${BASE_DIR}/index.yaml"
|
|
342
|
+
CHART_FOLDER=${CHARTS}/${pkg}/${PKG_VERSION}
|
|
320
343
|
|
|
321
|
-
|
|
322
|
-
|
|
344
|
+
mkdir -p ${ASSETS}/${pkg}
|
|
345
|
+
rm -rf ${CHART_FOLDER}
|
|
346
|
+
mkdir -p ${CHART_FOLDER}
|
|
347
|
+
|
|
348
|
+
cp -R ${CHART_TEMPLATE}/charts/ui-plugin-server/* ${CHART_FOLDER}
|
|
349
|
+
|
|
350
|
+
# Update Chart.yaml and values.yaml from the package file metadata
|
|
351
|
+
# Use the script from the template repository
|
|
352
|
+
echo -e "${CYAN}Patching Helm chart template${RESET}"
|
|
353
|
+
|
|
354
|
+
CHART=${CHART_FOLDER} REGISTRY="${REGISTRY}" ORG="${REGISTRY_ORG}" PACKAGE_JSON=${BASE_DIR}/pkg/${pkg}/package.json ${CHART_TEMPLATE}/scripts/patch
|
|
355
|
+
|
|
356
|
+
# Copy README file from the plugin to the Helm chart, if there is one
|
|
357
|
+
if [ -f "./pkg/${pkg}/README.md" ]; then
|
|
358
|
+
cp ./pkg/${pkg}/README.md ${CHART_FOLDER}/README.md
|
|
359
|
+
fi
|
|
360
|
+
|
|
361
|
+
pushd ${CHART_FOLDER}/templates > /dev/null
|
|
362
|
+
|
|
363
|
+
if [ "${GITHUB_BUILD}" == "true" ]; then
|
|
364
|
+
echo "Patching for GitHub build"
|
|
365
|
+
ENDPOINT=https://raw.githubusercontent.com/${GITHUB_SOURCE}/${GITHUB_BRANCH}/extensions/${pkg}/${PKG_VERSION}
|
|
366
|
+
else
|
|
367
|
+
echo "Patching for container build"
|
|
368
|
+
ENDPOINT=http://${IMAGE_PREFIX}${BASE_EXT}-svc.cattle-ui-plugin-system:8080/plugin/${PKG_NAME}
|
|
323
369
|
fi
|
|
370
|
+
sed -i.bak -e 's@endpoint: .*@endpoint: '"${ENDPOINT}"'@g' cr.yaml
|
|
371
|
+
rm *.bak
|
|
372
|
+
popd > /dev/null
|
|
373
|
+
|
|
374
|
+
# Additional patches
|
|
375
|
+
${SCRIPT_DIR}/helmpatch ${CHART_FOLDER} "${BASE_DIR}/pkg/${pkg}/package.json"
|
|
376
|
+
|
|
377
|
+
# Package into a .tgz helm chart
|
|
378
|
+
helm package ${CHART_FOLDER} -d ${ASSETS}/${pkg}
|
|
379
|
+
|
|
380
|
+
BUILT="true"
|
|
324
381
|
fi
|
|
382
|
+
done
|
|
383
|
+
fi
|
|
325
384
|
|
|
326
|
-
|
|
327
|
-
|
|
385
|
+
# Update the Helm Index for all charts, if changes were made
|
|
386
|
+
if [ "${BUILT}" == "true" ]; then
|
|
387
|
+
# --------------------------------------------------------------------------------
|
|
388
|
+
# Update the helm index for all charts
|
|
389
|
+
# --------------------------------------------------------------------------------
|
|
390
|
+
HELM_INDEX=${BASE_DIR}/index.yaml
|
|
391
|
+
|
|
392
|
+
echo "Updating Helm Index file"
|
|
393
|
+
|
|
394
|
+
if [ -f "${HELM_INDEX}" ]; then
|
|
395
|
+
UPDATE="--merge ${HELM_INDEX}"
|
|
396
|
+
elif [ "${GITHUB_BUILD}" == "true" ] && [[ -n ${GITHUB_SOURCE} ]]; then
|
|
397
|
+
# Check if git branch contains index.yaml
|
|
398
|
+
GITHUB_SOURCE=$(echo -e "${GITHUB_SOURCE}" | sed 's/https:\/\///g')
|
|
328
399
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
rm -rf ${CHART_TMP}
|
|
333
|
-
mkdir -p ${CHART_TMP}
|
|
334
|
-
cp ${ASSETS}/${pkg}/*.tgz ${CHART_TMP}
|
|
400
|
+
wget -P ${BASE_DIR} https://raw.githubusercontent.com/${GITHUB_SOURCE}/${GITHUB_BRANCH}/index.yaml 2>/dev/null
|
|
401
|
+
HELM_INDEX="${BASE_DIR}/index.yaml"
|
|
335
402
|
|
|
336
|
-
if [ "${
|
|
337
|
-
|
|
338
|
-
elif ! [ -e "${HELM_INDEX}" ]; then
|
|
339
|
-
helm repo index ${ASSETS} --url ${RELATIVE_URL}
|
|
403
|
+
if [ -f "${HELM_INDEX}" ]; then
|
|
404
|
+
UPDATE="--merge ${HELM_INDEX}"
|
|
340
405
|
fi
|
|
406
|
+
fi
|
|
407
|
+
|
|
408
|
+
# Base URL referencing assets directly from GitHub
|
|
409
|
+
BASE_URL="assets/"
|
|
341
410
|
|
|
342
|
-
|
|
411
|
+
# Relative URL references assets within the container deployment
|
|
412
|
+
RELATIVE_URL="plugin/"
|
|
413
|
+
|
|
414
|
+
if [ "${GITHUB_BUILD}" == "true" ]; then
|
|
415
|
+
helm repo index ${ASSETS} --url ${BASE_URL} ${UPDATE}
|
|
416
|
+
elif ! [ -e "${HELM_INDEX}" ]; then
|
|
417
|
+
helm repo index ${ASSETS} --url ${RELATIVE_URL}
|
|
343
418
|
fi
|
|
344
|
-
|
|
419
|
+
fi
|
|
345
420
|
|
|
346
421
|
if [ "${GITHUB_BUILD}" == "true" ] && [[ -n "${GITHUB_RELEASE_TAG}" ]] && [ "${BUILT}" == "false" ]; then
|
|
347
422
|
echo -e "${YELLOW}Github release tag ${RESET}${BOLD}${GITHUB_RELEASE_TAG}${RESET}${YELLOW} did not match any package name.${RESET}"
|
package/store/catalog.js
CHANGED
|
@@ -7,7 +7,6 @@ import { findBy, addObject, filterBy, isArray } from '@shell/utils/array';
|
|
|
7
7
|
import { stringify } from '@shell/utils/error';
|
|
8
8
|
import { classify } from '@shell/plugins/dashboard-store/classify';
|
|
9
9
|
import { sortBy } from '@shell/utils/sort';
|
|
10
|
-
import { importChart } from '@shell/utils/dynamic-importer';
|
|
11
10
|
import { ensureRegex } from '@shell/utils/string';
|
|
12
11
|
import { isPrerelease } from '@shell/utils/version';
|
|
13
12
|
import difference from 'lodash/difference';
|
|
@@ -265,31 +264,6 @@ export const getters = {
|
|
|
265
264
|
};
|
|
266
265
|
},
|
|
267
266
|
|
|
268
|
-
chartSteps(state, getters) {
|
|
269
|
-
return (name) => {
|
|
270
|
-
const steps = [];
|
|
271
|
-
|
|
272
|
-
const stepsPath = `./${ name }/steps/`;
|
|
273
|
-
// require.context only takes literals, so find all candidate step files and filter out
|
|
274
|
-
const allPaths = require.context('@shell/chart', true, /\.vue$/).keys();
|
|
275
|
-
|
|
276
|
-
allPaths
|
|
277
|
-
.filter((path) => path.startsWith(stepsPath))
|
|
278
|
-
.forEach((path) => {
|
|
279
|
-
try {
|
|
280
|
-
steps.push({
|
|
281
|
-
name: path.replace(stepsPath, ''),
|
|
282
|
-
component: importChart(path.substr(2, path.length)),
|
|
283
|
-
});
|
|
284
|
-
} catch (e) {
|
|
285
|
-
console.warn(`Failed to load step component ${ path } for chart ${ name }`, e); // eslint-disable-line no-console
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
return steps;
|
|
290
|
-
};
|
|
291
|
-
},
|
|
292
|
-
|
|
293
267
|
inStore(state) {
|
|
294
268
|
return state.inStore;
|
|
295
269
|
},
|
package/store/growl.js
CHANGED
|
@@ -18,11 +18,14 @@ export const getters = {
|
|
|
18
18
|
|
|
19
19
|
export const mutations = {
|
|
20
20
|
add(state, data) {
|
|
21
|
-
state.stack
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
state.stack = [
|
|
22
|
+
...state.stack,
|
|
23
|
+
{
|
|
24
|
+
id: state.nextId++,
|
|
25
|
+
started: (new Date().getTime()),
|
|
26
|
+
...data
|
|
27
|
+
}
|
|
28
|
+
];
|
|
26
29
|
},
|
|
27
30
|
|
|
28
31
|
remove(state, id) {
|
package/utils/cluster.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import semver from 'semver';
|
|
2
|
+
import { camelToTitle } from '@shell/utils/string';
|
|
2
3
|
import { CAPI } from '@shell/config/labels-annotations';
|
|
3
4
|
import { MANAGEMENT, VIRTUAL_HARVESTER_PROVIDER } from '@shell/config/types';
|
|
4
5
|
import { SETTING } from '@shell/config/settings';
|
|
@@ -90,3 +91,11 @@ export function abbreviateClusterName(input) {
|
|
|
90
91
|
|
|
91
92
|
return result;
|
|
92
93
|
}
|
|
94
|
+
|
|
95
|
+
export function labelForAddon(store, name, configuration = true) {
|
|
96
|
+
const addon = camelToTitle(name.replace(/^(rke|rke2|rancher)-/, ''));
|
|
97
|
+
const fallback = `${ addon } ${ configuration ? 'Configuration' : '' }`;
|
|
98
|
+
const key = `cluster.addonChart."${ name }"${ configuration ? '.configuration' : '.label' }`;
|
|
99
|
+
|
|
100
|
+
return store.getters['i18n/withFallback'](key, null, fallback);
|
|
101
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { setKubeVersionData, setVersionData } from '@shell/config/version';
|
|
2
|
+
|
|
3
|
+
class Versions {
|
|
4
|
+
private promise?: Promise<any>;
|
|
5
|
+
|
|
6
|
+
async fetch(context: { store: any }): Promise<any> {
|
|
7
|
+
if (this.promise) {
|
|
8
|
+
return this.promise;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const rancherVersionRequest = context.store.dispatch('rancher/request', {
|
|
12
|
+
url: '/rancherversion',
|
|
13
|
+
method: 'get',
|
|
14
|
+
redirectUnauthorized: false
|
|
15
|
+
}).then((response: any) => {
|
|
16
|
+
setVersionData(response);
|
|
17
|
+
}).catch((e: Error) => {
|
|
18
|
+
console.warn('Failed to fetch Rancher version metadata', e); // eslint-disable-line no-console
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const kubeVersionRequest = context.store.dispatch('rancher/request', {
|
|
22
|
+
url: '/version',
|
|
23
|
+
method: 'get',
|
|
24
|
+
redirectUnauthorized: false
|
|
25
|
+
}).then((response: any) => {
|
|
26
|
+
setKubeVersionData(response);
|
|
27
|
+
}).catch((e: Error) => {
|
|
28
|
+
console.warn('Failed to fetch Kube version metadata', e); // eslint-disable-line no-console
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
this.promise = Promise.allSettled([rancherVersionRequest, kubeVersionRequest]);
|
|
32
|
+
|
|
33
|
+
return this.promise;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const versions = new Versions();
|
|
38
|
+
|
|
39
|
+
export default versions;
|
package/vue.config.js
CHANGED
|
@@ -74,6 +74,7 @@ const getProxyConfig = (proxyConfig) => ({
|
|
|
74
74
|
'/meta': proxyMetaOpts(api), // Browser API UI
|
|
75
75
|
'/v1-*': proxyOpts(api), // SAML, KDM, etc
|
|
76
76
|
'/rancherversion': proxyPrimeOpts(api), // Rancher version endpoint
|
|
77
|
+
'/version': proxyPrimeOpts(api), // Rancher Kube version endpoint
|
|
77
78
|
// These are for Ember embedding
|
|
78
79
|
'/c/*/edit': proxyOpts('https://127.0.0.1:8000'), // Can't proxy all of /c because that's used by Vue too
|
|
79
80
|
'/k/': proxyOpts('https://127.0.0.1:8000'),
|
|
@@ -362,6 +363,9 @@ const getVirtualModulesAutoImport = (dir) => {
|
|
|
362
363
|
return new VirtualModulesPlugin(autoImportTypes);
|
|
363
364
|
};
|
|
364
365
|
|
|
366
|
+
// Get current shell version
|
|
367
|
+
const shellPkgData = require(path.join(__dirname, 'package.json'));
|
|
368
|
+
|
|
365
369
|
/**
|
|
366
370
|
* DefinePlugin does string replacement within our code. We may want to consider replacing it with something else. In code we'll see something like
|
|
367
371
|
* process.env.commit even though process and env aren't even defined objects. This could cause people to be mislead.
|
|
@@ -377,6 +381,7 @@ const createEnvVariablesPlugin = (routerBasePath, rancherEnv) => new webpack.Def
|
|
|
377
381
|
'process.env.rancherEnv': JSON.stringify(rancherEnv),
|
|
378
382
|
'process.env.harvesterPkgUrl': JSON.stringify(process.env.HARVESTER_PKG_URL),
|
|
379
383
|
'process.env.api': JSON.stringify(api),
|
|
384
|
+
'process.env.UI_EXTENSIONS_API_VERSION': JSON.stringify(shellPkgData.version),
|
|
380
385
|
// Store the Router Base as env variable that we can use in `shell/config/router.js`
|
|
381
386
|
'process.env.routerBase': JSON.stringify(routerBasePath),
|
|
382
387
|
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false',
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { RadioGroup } from '@components/Form/Radio';
|
|
3
|
-
import ArrayList from '@shell/components/form/ArrayList';
|
|
4
|
-
import KeyValue from '@shell/components/form/KeyValue';
|
|
5
|
-
import { mapGetters } from 'vuex';
|
|
6
|
-
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
components: {
|
|
10
|
-
RadioGroup,
|
|
11
|
-
ArrayList,
|
|
12
|
-
KeyValue,
|
|
13
|
-
LabeledInput
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
value: {
|
|
17
|
-
type: Object,
|
|
18
|
-
default: () => {
|
|
19
|
-
return {};
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
mode: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: 'view'
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
data() {
|
|
29
|
-
const {
|
|
30
|
-
shareProcessNamespace, securityContext = {}, hostPID, hostIPC
|
|
31
|
-
} = this.value;
|
|
32
|
-
const {
|
|
33
|
-
runasNonRoot, runAsUser, runAsGroup, supplementalGroups, fsGroup, sysctls
|
|
34
|
-
} = securityContext;
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
shareProcessNamespace,
|
|
38
|
-
hostPID,
|
|
39
|
-
hostIPC,
|
|
40
|
-
runasNonRoot,
|
|
41
|
-
runAsUser,
|
|
42
|
-
runAsGroup,
|
|
43
|
-
supplementalGroups,
|
|
44
|
-
fsGroup,
|
|
45
|
-
sysctls
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
computed: { ...mapGetters({ t: 'i18n/t' }) }
|
|
50
|
-
};
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<template>
|
|
54
|
-
<div>
|
|
55
|
-
<div class="row">
|
|
56
|
-
<div class="col span-6">
|
|
57
|
-
<RadioGroup
|
|
58
|
-
v-model:value="shareProcessNamespace"
|
|
59
|
-
name="shareProcessNamespace"
|
|
60
|
-
:label="t('workload.container.security.shareProcessNamespace')"
|
|
61
|
-
:labels="['No', 'Yes']"
|
|
62
|
-
:options="[false, true]"
|
|
63
|
-
:mode="mode"
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
<div class="col span-6">
|
|
67
|
-
<RadioGroup
|
|
68
|
-
v-model:value="runasNonRoot"
|
|
69
|
-
name="runasNonRoot"
|
|
70
|
-
:label="t('workload.container.security.runAsNonRoot')"
|
|
71
|
-
:options="[false, true]"
|
|
72
|
-
:labels="[t('workload.container.security.runAsNonRootOptions.noOption'), t('workload.container.security.runAsNonRootOptions.yesOption')]"
|
|
73
|
-
:mode="mode"
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<div class="spacer" />
|
|
79
|
-
|
|
80
|
-
<div class="row">
|
|
81
|
-
<div class="col span-6">
|
|
82
|
-
<LabeledInput
|
|
83
|
-
v-model.number="runAsUser"
|
|
84
|
-
:label="t('workload.container.security.runAsUser')"
|
|
85
|
-
:mode="mode"
|
|
86
|
-
/>
|
|
87
|
-
</div>
|
|
88
|
-
<div class="col span-6">
|
|
89
|
-
<LabeledInput
|
|
90
|
-
v-model.number="runAsGroup"
|
|
91
|
-
:label="t('workload.container.security.runAsGroup')"
|
|
92
|
-
:mode="mode"
|
|
93
|
-
/>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
<div class="spacer" />
|
|
98
|
-
|
|
99
|
-
<div class="row">
|
|
100
|
-
<div class="col span-6">
|
|
101
|
-
<h5 class="text-label">
|
|
102
|
-
<t k="workload.container.security.supplementalGroups" />
|
|
103
|
-
</h5>
|
|
104
|
-
<ArrayList
|
|
105
|
-
v-model:value="supplementalGroups"
|
|
106
|
-
:add-label="t('workload.container.security.addGroupIDs')"
|
|
107
|
-
:mode="mode"
|
|
108
|
-
/>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
|
|
112
|
-
<div class="spacer" />
|
|
113
|
-
|
|
114
|
-
<div class="row">
|
|
115
|
-
<div class="col span-6">
|
|
116
|
-
<LabeledInput
|
|
117
|
-
v-model.number="fsGroup"
|
|
118
|
-
:label="t('workload.container.security.fsGroup')"
|
|
119
|
-
:mode="mode"
|
|
120
|
-
/>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
<div class="spacer" />
|
|
125
|
-
|
|
126
|
-
<div class="row">
|
|
127
|
-
<div class="col span-6">
|
|
128
|
-
<RadioGroup
|
|
129
|
-
v-model:value="hostIPC"
|
|
130
|
-
name="hostIPC"
|
|
131
|
-
:label="t('workload.container.security.hostIPC')"
|
|
132
|
-
:labels="['No', 'Yes']"
|
|
133
|
-
:options="[false, true]"
|
|
134
|
-
:mode="mode"
|
|
135
|
-
/>
|
|
136
|
-
</div>
|
|
137
|
-
<div class="col span-6">
|
|
138
|
-
<RadioGroup
|
|
139
|
-
v-model:value="hostPID"
|
|
140
|
-
name="hostPID"
|
|
141
|
-
:label="t('workload.container.security.hostPID')"
|
|
142
|
-
:labels="['No', 'Yes']"
|
|
143
|
-
:options="[false, true]"
|
|
144
|
-
:mode="mode"
|
|
145
|
-
/>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
|
|
149
|
-
<div class="spacer" />
|
|
150
|
-
|
|
151
|
-
<div class="row">
|
|
152
|
-
<div class="col span-12">
|
|
153
|
-
<KeyValue
|
|
154
|
-
v-model:value="sysctls"
|
|
155
|
-
:title="t('workload.container.security.sysctls')"
|
|
156
|
-
:key-label="t('workload.container.security.sysctlsKey')"
|
|
157
|
-
:mode="mode"
|
|
158
|
-
>
|
|
159
|
-
<template #title>
|
|
160
|
-
<h3>
|
|
161
|
-
{{ t('workload.container.security.sysctls') }}
|
|
162
|
-
</h3>
|
|
163
|
-
</template>
|
|
164
|
-
</KeyValue>
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
</template>
|