@alauda-fe/dynamic-plugin-shared 0.0.1-alpha.0
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/README.md +7 -0
- package/array-form-table/base-string-map-form.component.d.ts +22 -0
- package/array-form-table/form/component.d.ts +106 -0
- package/array-form-table/form/index.d.ts +2 -0
- package/array-form-table/index.d.ts +10 -0
- package/array-form-table/key-value-form/component.d.ts +38 -0
- package/array-form-table/key-value-table/component.d.ts +9 -0
- package/array-form-table/string-array-form/component.d.ts +41 -0
- package/assets/images/abnormal.svg +1 -0
- package/assets/images/dark/disconnected.svg +1 -0
- package/assets/images/dark/license-abnormal.svg +1 -0
- package/assets/images/dark/network-abnormal.svg +1 -0
- package/assets/images/dark/no-data.svg +1 -0
- package/assets/images/dark/no-message.svg +1 -0
- package/assets/images/dark/no-permission.svg +1 -0
- package/assets/images/dark/no_realtime_alarm.svg +1 -0
- package/assets/images/dark/not-deployed.svg +1 -0
- package/assets/images/dark/not-found.svg +1 -0
- package/assets/images/dark/not-supported.svg +1 -0
- package/assets/images/dark/system-abnormal.svg +1 -0
- package/assets/images/light/disconnected.svg +1 -0
- package/assets/images/light/license-abnormal.svg +1 -0
- package/assets/images/light/network-abnormal.svg +1 -0
- package/assets/images/light/no-data.svg +1 -0
- package/assets/images/light/no-message.svg +1 -0
- package/assets/images/light/no-permission.svg +1 -0
- package/assets/images/light/no_realtime_alarm.svg +1 -0
- package/assets/images/light/not-deployed.svg +1 -0
- package/assets/images/light/not-found.svg +1 -0
- package/assets/images/light/not-supported.svg +1 -0
- package/assets/images/light/system-abnormal.svg +1 -0
- package/assets/images/no-data.png +0 -0
- package/async-data/async-data-loader.d.ts +31 -0
- package/async-data/error-page/component.d.ts +30 -0
- package/async-data/index.d.ts +13 -0
- package/async-data/page-state/component.d.ts +21 -0
- package/async-data/types.d.ts +29 -0
- package/code-editor/code-display-dialog/component.d.ts +17 -0
- package/code-editor/code-editor-configs.d.ts +19 -0
- package/code-editor/index.d.ts +10 -0
- package/code-editor/k8s-yaml-display-dialog/component.d.ts +16 -0
- package/code-editor/resource-yaml-display/component.d.ts +21 -0
- package/components/card-section/card-section.component.d.ts +9 -0
- package/components/confirm-delete/confirm-delete.component.d.ts +57 -0
- package/components/confirm-delete/utils.d.ts +25 -0
- package/components/current-time/component.d.ts +14 -0
- package/components/custom-columns-setting/component.d.ts +16 -0
- package/components/custom-columns-setting/index.d.ts +1 -0
- package/components/date-range-picker/component.d.ts +55 -0
- package/components/date-range-picker/index.d.ts +3 -0
- package/components/date-range-picker/type.d.ts +36 -0
- package/components/date-range-picker/util.d.ts +11 -0
- package/components/disabled-container/disabled-container.component.d.ts +21 -0
- package/components/disabled-container/index.d.ts +7 -0
- package/components/field-set/column/component.d.ts +10 -0
- package/components/field-set/group/component.d.ts +6 -0
- package/components/field-set/index.d.ts +7 -0
- package/components/field-set/item/component.d.ts +13 -0
- package/components/foldable-block/component.d.ts +17 -0
- package/components/foldable-item-in-table/component.d.ts +21 -0
- package/components/help-document/component.d.ts +29 -0
- package/components/help-document/directive.d.ts +20 -0
- package/components/help-document/index.d.ts +8 -0
- package/components/help-document/service.d.ts +20 -0
- package/components/index.d.ts +31 -0
- package/components/loading-mask/loading-mask.component.d.ts +13 -0
- package/components/page-guard/component/component.d.ts +40 -0
- package/components/page-guard/component/helper-directives.d.ts +17 -0
- package/components/page-guard/component/page-guard.type.d.ts +86 -0
- package/components/page-guard/index.d.ts +12 -0
- package/components/password-input/component.d.ts +39 -0
- package/components/pod-status/component.d.ts +25 -0
- package/components/pod-status/index.d.ts +3 -0
- package/components/pod-status/status.d.ts +4 -0
- package/components/pod-status/typings.d.ts +16 -0
- package/components/relative-time/component.d.ts +15 -0
- package/components/resource-label/component.d.ts +25 -0
- package/components/resource-multi-select/component.d.ts +41 -0
- package/components/resource-multi-select/util.d.ts +10 -0
- package/components/search-panel/component.d.ts +16 -0
- package/components/search-panel/helper.directive.d.ts +5 -0
- package/components/search-panel/search-item/component.d.ts +7 -0
- package/components/select-prefix-label/directive.d.ts +17 -0
- package/components/status-icon/status-icon.component.d.ts +16 -0
- package/components/tags-label/component.d.ts +56 -0
- package/components/terminating-tag/component.d.ts +7 -0
- package/components/text-ellipsis/component.d.ts +9 -0
- package/components/text-tooltip/directive.d.ts +21 -0
- package/components/text-with-url/component.d.ts +12 -0
- package/components/upload-file/component.d.ts +32 -0
- package/components/zero-state/zero-state.component.d.ts +16 -0
- package/constants/common.d.ts +64 -0
- package/constants/index.d.ts +6 -0
- package/constants/k8s.d.ts +12 -0
- package/constants/patterns.d.ts +124 -0
- package/constants/resource-definitions.d.ts +414 -0
- package/constants/status-icons.d.ts +34 -0
- package/constants/timezones.d.ts +6 -0
- package/directives/aui-code-editor.directive.d.ts +13 -0
- package/directives/click-outside.directive.d.ts +12 -0
- package/directives/declare.directive.d.ts +8 -0
- package/directives/disabled.directive.d.ts +28 -0
- package/directives/effect-directive/coerce-number.directive.d.ts +8 -0
- package/directives/effect-directive/e2e-attribute-binding.directive.d.ts +10 -0
- package/directives/effect-directive/event.directive.d.ts +47 -0
- package/directives/effect-directive/index.d.ts +12 -0
- package/directives/effect-directive/min-max.directive.d.ts +30 -0
- package/directives/effect-directive/trim.directive.d.ts +7 -0
- package/directives/effect-directive/validators.directive.d.ts +12 -0
- package/directives/feature-gate.directive.d.ts +31 -0
- package/directives/index.d.ts +12 -0
- package/directives/last-form-item.directive.d.ts +8 -0
- package/directives/readonly-field.directive.d.ts +39 -0
- package/directives/resize.directive.d.ts +17 -0
- package/directives/scroll-border-observer.directive.d.ts +23 -0
- package/directives/scroll-to-first-invalid.directive.d.ts +24 -0
- package/directives/value-trace.directive.d.ts +27 -0
- package/esm2022/alauda-fe-dynamic-plugin-shared.mjs +5 -0
- package/esm2022/array-form-table/base-string-map-form.component.mjs +92 -0
- package/esm2022/array-form-table/form/component.mjs +266 -0
- package/esm2022/array-form-table/form/index.mjs +12 -0
- package/esm2022/array-form-table/index.mjs +11 -0
- package/esm2022/array-form-table/key-value-form/component.mjs +135 -0
- package/esm2022/array-form-table/key-value-table/component.mjs +24 -0
- package/esm2022/array-form-table/string-array-form/component.mjs +168 -0
- package/esm2022/async-data/async-data-loader.mjs +63 -0
- package/esm2022/async-data/error-page/component.mjs +54 -0
- package/esm2022/async-data/index.mjs +18 -0
- package/esm2022/async-data/page-state/component.mjs +62 -0
- package/esm2022/async-data/types.mjs +6 -0
- package/esm2022/code-editor/code-display-dialog/component.mjs +35 -0
- package/esm2022/code-editor/code-editor-configs.mjs +66 -0
- package/esm2022/code-editor/index.mjs +11 -0
- package/esm2022/code-editor/k8s-yaml-display-dialog/component.mjs +26 -0
- package/esm2022/code-editor/resource-yaml-display/component.mjs +67 -0
- package/esm2022/components/card-section/card-section.component.mjs +24 -0
- package/esm2022/components/confirm-delete/confirm-delete.component.mjs +192 -0
- package/esm2022/components/confirm-delete/utils.mjs +8 -0
- package/esm2022/components/current-time/component.mjs +39 -0
- package/esm2022/components/custom-columns-setting/component.mjs +75 -0
- package/esm2022/components/custom-columns-setting/index.mjs +2 -0
- package/esm2022/components/date-range-picker/component.mjs +215 -0
- package/esm2022/components/date-range-picker/index.mjs +4 -0
- package/esm2022/components/date-range-picker/type.mjs +2 -0
- package/esm2022/components/date-range-picker/util.mjs +57 -0
- package/esm2022/components/disabled-container/disabled-container.component.mjs +81 -0
- package/esm2022/components/disabled-container/index.mjs +8 -0
- package/esm2022/components/field-set/column/component.mjs +25 -0
- package/esm2022/components/field-set/group/component.mjs +16 -0
- package/esm2022/components/field-set/index.mjs +14 -0
- package/esm2022/components/field-set/item/component.mjs +41 -0
- package/esm2022/components/foldable-block/component.mjs +60 -0
- package/esm2022/components/foldable-item-in-table/component.mjs +56 -0
- package/esm2022/components/help-document/component.mjs +69 -0
- package/esm2022/components/help-document/directive.mjs +70 -0
- package/esm2022/components/help-document/index.mjs +9 -0
- package/esm2022/components/help-document/service.mjs +43 -0
- package/esm2022/components/index.mjs +32 -0
- package/esm2022/components/loading-mask/loading-mask.component.mjs +35 -0
- package/esm2022/components/page-guard/component/component.mjs +101 -0
- package/esm2022/components/page-guard/component/helper-directives.mjs +51 -0
- package/esm2022/components/page-guard/component/page-guard.type.mjs +82 -0
- package/esm2022/components/page-guard/index.mjs +19 -0
- package/esm2022/components/password-input/component.mjs +143 -0
- package/esm2022/components/pod-status/component.mjs +49 -0
- package/esm2022/components/pod-status/index.mjs +4 -0
- package/esm2022/components/pod-status/status.mjs +84 -0
- package/esm2022/components/pod-status/typings.mjs +19 -0
- package/esm2022/components/relative-time/component.mjs +58 -0
- package/esm2022/components/resource-label/component.mjs +100 -0
- package/esm2022/components/resource-multi-select/component.mjs +152 -0
- package/esm2022/components/resource-multi-select/util.mjs +24 -0
- package/esm2022/components/search-panel/component.mjs +51 -0
- package/esm2022/components/search-panel/helper.directive.mjs +14 -0
- package/esm2022/components/search-panel/search-item/component.mjs +15 -0
- package/esm2022/components/select-prefix-label/directive.mjs +89 -0
- package/esm2022/components/status-icon/status-icon.component.mjs +56 -0
- package/esm2022/components/tags-label/component.mjs +224 -0
- package/esm2022/components/terminating-tag/component.mjs +16 -0
- package/esm2022/components/text-ellipsis/component.mjs +28 -0
- package/esm2022/components/text-tooltip/directive.mjs +71 -0
- package/esm2022/components/text-with-url/component.mjs +40 -0
- package/esm2022/components/upload-file/component.mjs +95 -0
- package/esm2022/components/zero-state/zero-state.component.mjs +51 -0
- package/esm2022/constants/common.mjs +86 -0
- package/esm2022/constants/index.mjs +7 -0
- package/esm2022/constants/k8s.mjs +13 -0
- package/esm2022/constants/patterns.mjs +142 -0
- package/esm2022/constants/resource-definitions.mjs +424 -0
- package/esm2022/constants/status-icons.mjs +65 -0
- package/esm2022/constants/timezones.mjs +234 -0
- package/esm2022/directives/aui-code-editor.directive.mjs +30 -0
- package/esm2022/directives/click-outside.directive.mjs +49 -0
- package/esm2022/directives/declare.directive.mjs +27 -0
- package/esm2022/directives/disabled.directive.mjs +76 -0
- package/esm2022/directives/effect-directive/coerce-number.directive.mjs +54 -0
- package/esm2022/directives/effect-directive/e2e-attribute-binding.directive.mjs +57 -0
- package/esm2022/directives/effect-directive/event.directive.mjs +129 -0
- package/esm2022/directives/effect-directive/index.mjs +21 -0
- package/esm2022/directives/effect-directive/min-max.directive.mjs +107 -0
- package/esm2022/directives/effect-directive/trim.directive.mjs +40 -0
- package/esm2022/directives/effect-directive/validators.directive.mjs +43 -0
- package/esm2022/directives/feature-gate.directive.mjs +90 -0
- package/esm2022/directives/index.mjs +13 -0
- package/esm2022/directives/last-form-item.directive.mjs +18 -0
- package/esm2022/directives/readonly-field.directive.mjs +145 -0
- package/esm2022/directives/resize.directive.mjs +39 -0
- package/esm2022/directives/scroll-border-observer.directive.mjs +77 -0
- package/esm2022/directives/scroll-to-first-invalid.directive.mjs +126 -0
- package/esm2022/directives/value-trace.directive.mjs +61 -0
- package/esm2022/form/base-form-container.mjs +126 -0
- package/esm2022/form/base-nested-form-control.mjs +190 -0
- package/esm2022/form/errors-mapper/base-errors-mapper.mjs +41 -0
- package/esm2022/form/errors-mapper/default-errors-mapper.service.mjs +65 -0
- package/esm2022/form/errors-mapper/errors-mapper-component/component.mjs +53 -0
- package/esm2022/form/errors-mapper/errors-mapper.directive.mjs +109 -0
- package/esm2022/form/errors-mapper/index.mjs +10 -0
- package/esm2022/form/errors-mapper/types.mjs +2 -0
- package/esm2022/form/index.mjs +6 -0
- package/esm2022/form/utils.mjs +61 -0
- package/esm2022/form/validators/async-function-validator.directive.mjs +49 -0
- package/esm2022/form/validators/dns1123-subdomain.mjs +42 -0
- package/esm2022/form/validators/function-validator.directive.mjs +49 -0
- package/esm2022/form/validators/index.mjs +10 -0
- package/esm2022/form/validators/maxlength-minlength-validator.directive.mjs +71 -0
- package/esm2022/form/validators/not-be-validator.directive.mjs +56 -0
- package/esm2022/form/validators/one-of-validator.directive.mjs +57 -0
- package/esm2022/form/validators/resource-limit.mjs +79 -0
- package/esm2022/form/validators/strong-password/index.mjs +4 -0
- package/esm2022/form/validators/strong-password/strong-password-tooltip/component.mjs +15 -0
- package/esm2022/form/validators/strong-password/strong-password-validator.directive.mjs +171 -0
- package/esm2022/form/validators/strong-password/strong-password-validator.module.mjs +36 -0
- package/esm2022/form/validators/utils.mjs +155 -0
- package/esm2022/index.mjs +15 -0
- package/esm2022/k8s-resource-list/footer/component.mjs +156 -0
- package/esm2022/k8s-resource-list/index.mjs +18 -0
- package/esm2022/k8s-resource-list/k8s-resource-list.mjs +224 -0
- package/esm2022/k8s-resource-list/k8s-resource-paged-list.mjs +174 -0
- package/esm2022/k8s-resource-list/types.mjs +11 -0
- package/esm2022/k8s-resource-list/utils.mjs +84 -0
- package/esm2022/k8s-shared/constants.mjs +53 -0
- package/esm2022/k8s-shared/index.mjs +12 -0
- package/esm2022/k8s-shared/k8s-resource-translate-key.pipe.mjs +31 -0
- package/esm2022/k8s-shared/k8s-shared-util.service.mjs +152 -0
- package/esm2022/k8s-shared/resource-mark/component.mjs +54 -0
- package/esm2022/k8s-shared/resource-mark/util.mjs +137 -0
- package/esm2022/k8s-shared/update-description-dialog/component.mjs +66 -0
- package/esm2022/k8s-shared/update-display-name-dialog/component.mjs +59 -0
- package/esm2022/k8s-shared/update-key-value-dialog/component.mjs +76 -0
- package/esm2022/page-deactivate/deactivate.directive.mjs +50 -0
- package/esm2022/page-deactivate/deactivate.guard.mjs +41 -0
- package/esm2022/page-deactivate/deactivate.service.mjs +78 -0
- package/esm2022/page-deactivate/index.mjs +4 -0
- package/esm2022/pipes/calc.pipe.mjs +21 -0
- package/esm2022/pipes/cron-human-readable.pipe.mjs +30 -0
- package/esm2022/pipes/crontab-next.pipe.mjs +67 -0
- package/esm2022/pipes/duration.pipe.mjs +51 -0
- package/esm2022/pipes/field-not-available.pipe.mjs +25 -0
- package/esm2022/pipes/img-header.pipe.mjs +18 -0
- package/esm2022/pipes/img-theme.pipe.mjs +38 -0
- package/esm2022/pipes/index.mjs +19 -0
- package/esm2022/pipes/keyvalue.pipe.mjs +20 -0
- package/esm2022/pipes/marked.pipe.mjs +18 -0
- package/esm2022/pipes/minimum-format.pipe.mjs +25 -0
- package/esm2022/pipes/page-env.pipe.mjs +69 -0
- package/esm2022/pipes/parse-json-translate.pipe.mjs +28 -0
- package/esm2022/pipes/parse-json.pipe.mjs +22 -0
- package/esm2022/pipes/pure.pipe.mjs +26 -0
- package/esm2022/pipes/safe.pipe.mjs +49 -0
- package/esm2022/pipes/sanitize.pipe.mjs +31 -0
- package/esm2022/pipes/time.pipe.mjs +113 -0
- package/esm2022/pipes/timezone-display.pipe.mjs +21 -0
- package/esm2022/services/form-row-duplicate/form-row-duplicate.service.mjs +280 -0
- package/esm2022/services/index.mjs +4 -0
- package/esm2022/services/on-resize.service.mjs +52 -0
- package/esm2022/services/yaml-util.service.mjs +99 -0
- package/esm2022/types/common.mjs +6 -0
- package/esm2022/types/helpers.mjs +12 -0
- package/esm2022/types/index.mjs +9 -0
- package/esm2022/types/k8s/core.mjs +2 -0
- package/esm2022/types/k8s/crd.mjs +57 -0
- package/esm2022/types/k8s/index.mjs +4 -0
- package/esm2022/types/k8s/raw.mjs +77 -0
- package/esm2022/types/schema.mjs +2 -0
- package/esm2022/utils/browser.mjs +21 -0
- package/esm2022/utils/cache-store.mjs +83 -0
- package/esm2022/utils/color-helpers.mjs +6 -0
- package/esm2022/utils/common.mjs +315 -0
- package/esm2022/utils/cron-util.mjs +44 -0
- package/esm2022/utils/decorators.mjs +137 -0
- package/esm2022/utils/disabled-state.mjs +47 -0
- package/esm2022/utils/format-number.mjs +227 -0
- package/esm2022/utils/index.mjs +24 -0
- package/esm2022/utils/local-storage-constants.mjs +2 -0
- package/esm2022/utils/node.mjs +18 -0
- package/esm2022/utils/observable.mjs +32 -0
- package/esm2022/utils/operators.mjs +38 -0
- package/esm2022/utils/request-pool.mjs +37 -0
- package/esm2022/utils/resources.mjs +66 -0
- package/esm2022/utils/router.mjs +20 -0
- package/esm2022/utils/sort-fn.mjs +7 -0
- package/esm2022/utils/tree.mjs +79 -0
- package/esm2022/utils/unit.mjs +191 -0
- package/esm2022/utils/version.mjs +76 -0
- package/esm2022/utils/with-load-state.mjs +21 -0
- package/esm2022/utils/workload.mjs +183 -0
- package/esm2022/utils/workspace.mjs +59 -0
- package/esm2022/utils/yaml.mjs +54 -0
- package/fesm2022/alauda-fe-dynamic-plugin-shared.mjs +11151 -0
- package/fesm2022/alauda-fe-dynamic-plugin-shared.mjs.map +1 -0
- package/form/base-form-container.d.ts +41 -0
- package/form/base-nested-form-control.d.ts +58 -0
- package/form/errors-mapper/base-errors-mapper.d.ts +13 -0
- package/form/errors-mapper/default-errors-mapper.service.d.ts +10 -0
- package/form/errors-mapper/errors-mapper-component/component.d.ts +19 -0
- package/form/errors-mapper/errors-mapper.directive.d.ts +39 -0
- package/form/errors-mapper/index.d.ts +6 -0
- package/form/errors-mapper/types.d.ts +16 -0
- package/form/index.d.ts +5 -0
- package/form/utils.d.ts +40 -0
- package/form/validators/async-function-validator.directive.d.ts +11 -0
- package/form/validators/dns1123-subdomain.d.ts +28 -0
- package/form/validators/function-validator.directive.d.ts +11 -0
- package/form/validators/index.d.ts +9 -0
- package/form/validators/maxlength-minlength-validator.directive.d.ts +20 -0
- package/form/validators/not-be-validator.directive.d.ts +12 -0
- package/form/validators/one-of-validator.directive.d.ts +12 -0
- package/form/validators/resource-limit.d.ts +17 -0
- package/form/validators/strong-password/index.d.ts +3 -0
- package/form/validators/strong-password/strong-password-tooltip/component.d.ts +6 -0
- package/form/validators/strong-password/strong-password-validator.directive.d.ts +34 -0
- package/form/validators/strong-password/strong-password-validator.module.d.ts +12 -0
- package/form/validators/utils.d.ts +67 -0
- package/index.d.ts +14 -0
- package/k8s-resource-list/footer/component.d.ts +42 -0
- package/k8s-resource-list/index.d.ts +13 -0
- package/k8s-resource-list/k8s-resource-list.d.ts +42 -0
- package/k8s-resource-list/k8s-resource-paged-list.d.ts +61 -0
- package/k8s-resource-list/types.d.ts +70 -0
- package/k8s-resource-list/utils.d.ts +19 -0
- package/k8s-shared/constants.d.ts +7 -0
- package/k8s-shared/index.d.ts +11 -0
- package/k8s-shared/k8s-resource-translate-key.pipe.d.ts +9 -0
- package/k8s-shared/k8s-shared-util.service.d.ts +48 -0
- package/k8s-shared/resource-mark/component.d.ts +16 -0
- package/k8s-shared/resource-mark/util.d.ts +2 -0
- package/k8s-shared/update-description-dialog/component.d.ts +33 -0
- package/k8s-shared/update-display-name-dialog/component.d.ts +27 -0
- package/k8s-shared/update-key-value-dialog/component.d.ts +38 -0
- package/package.json +56 -0
- package/page-deactivate/deactivate.directive.d.ts +18 -0
- package/page-deactivate/deactivate.guard.d.ts +13 -0
- package/page-deactivate/deactivate.service.d.ts +28 -0
- package/page-deactivate/index.d.ts +3 -0
- package/pipes/calc.pipe.d.ts +11 -0
- package/pipes/cron-human-readable.pipe.d.ts +9 -0
- package/pipes/crontab-next.pipe.d.ts +18 -0
- package/pipes/duration.pipe.d.ts +10 -0
- package/pipes/field-not-available.pipe.d.ts +13 -0
- package/pipes/img-header.pipe.d.ts +7 -0
- package/pipes/img-theme.pipe.d.ts +13 -0
- package/pipes/index.d.ts +18 -0
- package/pipes/keyvalue.pipe.d.ts +9 -0
- package/pipes/marked.pipe.d.ts +8 -0
- package/pipes/minimum-format.pipe.d.ts +10 -0
- package/pipes/page-env.pipe.d.ts +34 -0
- package/pipes/parse-json-translate.pipe.d.ts +8 -0
- package/pipes/parse-json.pipe.d.ts +7 -0
- package/pipes/pure.pipe.d.ts +17 -0
- package/pipes/safe.pipe.d.ts +10 -0
- package/pipes/sanitize.pipe.d.ts +10 -0
- package/pipes/time.pipe.d.ts +40 -0
- package/pipes/timezone-display.pipe.d.ts +10 -0
- package/services/form-row-duplicate/form-row-duplicate.service.d.ts +45 -0
- package/services/index.d.ts +3 -0
- package/services/on-resize.service.d.ts +20 -0
- package/services/yaml-util.service.d.ts +20 -0
- package/styles/ansi-color.scss +131 -0
- package/styles/global.scss +904 -0
- package/styles/lib.scss +1 -0
- package/styles/markdown-body.scss +107 -0
- package/styles/mixins.scss +710 -0
- package/styles/var.scss +30 -0
- package/types/common.d.ts +42 -0
- package/types/helpers.d.ts +35 -0
- package/types/index.d.ts +8 -0
- package/types/k8s/core.d.ts +100 -0
- package/types/k8s/crd.d.ts +497 -0
- package/types/k8s/index.d.ts +3 -0
- package/types/k8s/raw.d.ts +860 -0
- package/types/schema.d.ts +14 -0
- package/utils/browser.d.ts +4 -0
- package/utils/cache-store.d.ts +35 -0
- package/utils/color-helpers.d.ts +4 -0
- package/utils/common.d.ts +64 -0
- package/utils/cron-util.d.ts +8 -0
- package/utils/decorators.d.ts +14 -0
- package/utils/disabled-state.d.ts +20 -0
- package/utils/format-number.d.ts +11 -0
- package/utils/index.d.ts +23 -0
- package/utils/local-storage-constants.d.ts +1 -0
- package/utils/node.d.ts +8 -0
- package/utils/observable.d.ts +5 -0
- package/utils/operators.d.ts +22 -0
- package/utils/request-pool.d.ts +12 -0
- package/utils/resources.d.ts +19 -0
- package/utils/router.d.ts +3 -0
- package/utils/sort-fn.d.ts +2 -0
- package/utils/tree.d.ts +16 -0
- package/utils/unit.d.ts +21 -0
- package/utils/version.d.ts +39 -0
- package/utils/with-load-state.d.ts +11 -0
- package/utils/workload.d.ts +66 -0
- package/utils/workspace.d.ts +28 -0
- package/utils/yaml.d.ts +11 -0
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 此文件只维护 所有的 k8s 原生类型
|
|
3
|
+
*/
|
|
4
|
+
import { StringMap } from '../common';
|
|
5
|
+
import { ValueOf } from '../helpers';
|
|
6
|
+
import { OpenAPIV3SchemaObject } from '../schema';
|
|
7
|
+
import { KubernetesResource, LabelSelector, LabelSelectorRequirement, ObjectMeta, ObjectReference, Condition } from './core';
|
|
8
|
+
export interface Secret<T = StringMap> extends KubernetesResource {
|
|
9
|
+
data?: T;
|
|
10
|
+
stringData?: StringMap;
|
|
11
|
+
type?: SecretType;
|
|
12
|
+
global?: boolean;
|
|
13
|
+
certificate?: Certificate;
|
|
14
|
+
}
|
|
15
|
+
export interface Certificate {
|
|
16
|
+
name: string;
|
|
17
|
+
namespace: string;
|
|
18
|
+
notBefore: string;
|
|
19
|
+
notAfter: string;
|
|
20
|
+
dnsNames: string[];
|
|
21
|
+
valid: boolean;
|
|
22
|
+
reasonCode?: 1 | 2 | 3;
|
|
23
|
+
}
|
|
24
|
+
export interface Namespace extends KubernetesResource {
|
|
25
|
+
status?: NamespaceStatus;
|
|
26
|
+
}
|
|
27
|
+
export interface NamespaceStatus {
|
|
28
|
+
phase?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ScopedResourceSelectorRequirement {
|
|
31
|
+
operator: 'In' | 'NotIn' | 'Exists' | 'DoesNotExist';
|
|
32
|
+
scopeName: string;
|
|
33
|
+
values: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ScopeSelector {
|
|
36
|
+
matchExpressions: ScopedResourceSelectorRequirement[];
|
|
37
|
+
}
|
|
38
|
+
export declare enum K8sResourceAction {
|
|
39
|
+
GET = "get",
|
|
40
|
+
LIST = "list",
|
|
41
|
+
WATCH = "watch",
|
|
42
|
+
CREATE = "create",
|
|
43
|
+
UPDATE = "update",
|
|
44
|
+
PATCH = "patch",
|
|
45
|
+
DELETE = "delete",
|
|
46
|
+
DELETE_COLLECTION = "deletecollection",
|
|
47
|
+
PROXY = "proxy",
|
|
48
|
+
REDIRECT = "redirect",
|
|
49
|
+
ALL = "*"
|
|
50
|
+
}
|
|
51
|
+
export declare enum SecretType {
|
|
52
|
+
Opaque = "Opaque",
|
|
53
|
+
TLS = "kubernetes.io/tls",
|
|
54
|
+
SSHKey = "kubernetes.io/ssh-public-key",
|
|
55
|
+
SSHAuth = "kubernetes.io/ssh-auth",
|
|
56
|
+
BasicAuth = "kubernetes.io/basic-auth",
|
|
57
|
+
BasicAuthSecret = "kubernetes.io/basic-auth-secret",
|
|
58
|
+
Database = "kubernetes.io/database",
|
|
59
|
+
DockerConfigJson = "kubernetes.io/dockerconfigjson",
|
|
60
|
+
NoAuth = "kubernetes.io/no-auth"
|
|
61
|
+
}
|
|
62
|
+
export interface StatefulSet extends KubernetesResource {
|
|
63
|
+
spec?: StatefulSetSpec;
|
|
64
|
+
status?: StatefulSetStatus;
|
|
65
|
+
}
|
|
66
|
+
export interface StatefulSetSpec {
|
|
67
|
+
replicas?: number;
|
|
68
|
+
selector?: LabelSelector;
|
|
69
|
+
template?: PodTemplateSpec;
|
|
70
|
+
serviceName?: string;
|
|
71
|
+
updateStrategy?: StatefulSetUpdateStrategy;
|
|
72
|
+
revisionHistoryLimit?: number;
|
|
73
|
+
volumeClaimTemplates?: PersistentVolumeClaim[];
|
|
74
|
+
}
|
|
75
|
+
export interface PodTemplateSpec extends KubernetesResource {
|
|
76
|
+
spec?: PodSpec;
|
|
77
|
+
}
|
|
78
|
+
export interface PodSpec {
|
|
79
|
+
containers?: Container[];
|
|
80
|
+
initContainers?: Container[];
|
|
81
|
+
ephemeralContainers?: EphemeralContainer[];
|
|
82
|
+
volumes?: Volume[];
|
|
83
|
+
hostAliases?: HostAliases[];
|
|
84
|
+
nodeSelector?: StringMap;
|
|
85
|
+
hostNetwork?: boolean;
|
|
86
|
+
affinity?: Affinity;
|
|
87
|
+
restartPolicy?: string;
|
|
88
|
+
imagePullSecrets?: LocalObjectReference[];
|
|
89
|
+
serviceAccountName?: string;
|
|
90
|
+
serviceAccount?: string;
|
|
91
|
+
nodeName?: string;
|
|
92
|
+
terminationGracePeriodSeconds?: number;
|
|
93
|
+
tolerations?: Toleration[];
|
|
94
|
+
}
|
|
95
|
+
export interface Toleration {
|
|
96
|
+
key?: string;
|
|
97
|
+
value?: string;
|
|
98
|
+
operator?: TolerationOperator;
|
|
99
|
+
tolerationSeconds?: number;
|
|
100
|
+
effect?: TaintEffect;
|
|
101
|
+
}
|
|
102
|
+
export declare enum TolerationOperator {
|
|
103
|
+
Exists = "Exists",
|
|
104
|
+
Equal = "Equal"
|
|
105
|
+
}
|
|
106
|
+
export declare enum TaintEffect {
|
|
107
|
+
NoSchedule = "NoSchedule",
|
|
108
|
+
PreferNoSchedule = "PreferNoSchedule",
|
|
109
|
+
NoExecute = "NoExecute"
|
|
110
|
+
}
|
|
111
|
+
export interface Container {
|
|
112
|
+
name?: string;
|
|
113
|
+
image?: string;
|
|
114
|
+
command?: string[];
|
|
115
|
+
args?: string[];
|
|
116
|
+
env?: EnvVar[];
|
|
117
|
+
envFrom?: EnvFromSource[];
|
|
118
|
+
workingDir?: string;
|
|
119
|
+
ports?: ContainerPort[];
|
|
120
|
+
resources?: ResourceRequirements;
|
|
121
|
+
volumeMounts?: VolumeMount[];
|
|
122
|
+
livenessProbe?: Probe;
|
|
123
|
+
readinessProbe?: Probe;
|
|
124
|
+
lifecycle?: PodLifeCycle;
|
|
125
|
+
}
|
|
126
|
+
export interface EnvVarSource {
|
|
127
|
+
configMapKeyRef?: ConfigMapKeyRef;
|
|
128
|
+
secretKeyRef?: SecretKeyRef;
|
|
129
|
+
fieldRef?: ObjectFieldSelector;
|
|
130
|
+
resourceFieldRef?: ResourceFieldSelector;
|
|
131
|
+
}
|
|
132
|
+
export interface EnvVar {
|
|
133
|
+
name: string;
|
|
134
|
+
value?: string;
|
|
135
|
+
valueFrom?: EnvVarSource;
|
|
136
|
+
}
|
|
137
|
+
export interface EnvFromSource {
|
|
138
|
+
prefix?: string;
|
|
139
|
+
configMapRef?: ConfigMapRef;
|
|
140
|
+
secretRef?: SecretRef;
|
|
141
|
+
}
|
|
142
|
+
export interface PodLifeCycle {
|
|
143
|
+
postStart?: PodLifeCycleHook;
|
|
144
|
+
preStop?: PodLifeCycleHook;
|
|
145
|
+
}
|
|
146
|
+
export interface PodLifeCycleHook {
|
|
147
|
+
exec: {
|
|
148
|
+
command: string[];
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export interface HTTPGetAction {
|
|
152
|
+
host?: string;
|
|
153
|
+
httpHeaders?: HTTPHeader[];
|
|
154
|
+
path: string;
|
|
155
|
+
port?: number | string;
|
|
156
|
+
scheme?: string;
|
|
157
|
+
}
|
|
158
|
+
export interface EphemeralContainer {
|
|
159
|
+
command: string[];
|
|
160
|
+
image: string;
|
|
161
|
+
imagePullPolicy: string;
|
|
162
|
+
name: string;
|
|
163
|
+
stdin: boolean;
|
|
164
|
+
tty: boolean;
|
|
165
|
+
terminationMessagePolicy?: string;
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
}
|
|
168
|
+
export type StatefulSetStatus = Partial<{
|
|
169
|
+
collisionCount: number;
|
|
170
|
+
observedGeneration: number;
|
|
171
|
+
replicas: number;
|
|
172
|
+
readyReplicas: number;
|
|
173
|
+
currentReplicas: number;
|
|
174
|
+
currentRevision: string;
|
|
175
|
+
updateRevision: string;
|
|
176
|
+
updatedReplicas?: number;
|
|
177
|
+
}>;
|
|
178
|
+
export type DeploymentStrategyType = 'RollingUpdate' | 'Recreate';
|
|
179
|
+
export type DaemonSetUpdateStrategyType = 'RollingUpdate' | 'OnDelete';
|
|
180
|
+
export type StatefulSetUpdateStrategyType = 'RollingUpdate' | 'OnDelete';
|
|
181
|
+
export interface DeploymentStrategy {
|
|
182
|
+
type?: DeploymentStrategyType;
|
|
183
|
+
rollingUpdate?: RollingUpdateDeployment;
|
|
184
|
+
}
|
|
185
|
+
export interface RollingUpdateDeployment {
|
|
186
|
+
maxUnavailable?: string | number;
|
|
187
|
+
maxSurge?: string | number;
|
|
188
|
+
}
|
|
189
|
+
export interface StatefulSetUpdateStrategy {
|
|
190
|
+
type?: StatefulSetUpdateStrategyType;
|
|
191
|
+
rollingUpdate?: RollingUpdateStatefulSetStrategy;
|
|
192
|
+
}
|
|
193
|
+
export interface RollingUpdateStatefulSetStrategy {
|
|
194
|
+
partition?: string | number;
|
|
195
|
+
}
|
|
196
|
+
export interface Ingress extends KubernetesResource {
|
|
197
|
+
spec?: IngressSpec;
|
|
198
|
+
}
|
|
199
|
+
export interface IngressSpec {
|
|
200
|
+
ingressClassName?: string;
|
|
201
|
+
rules?: IngressRule[];
|
|
202
|
+
tls?: IngressTLS[];
|
|
203
|
+
}
|
|
204
|
+
export interface IngressRule {
|
|
205
|
+
host?: string;
|
|
206
|
+
http: HTTPIngressRuleValue;
|
|
207
|
+
}
|
|
208
|
+
export interface HTTPIngressRuleValue {
|
|
209
|
+
paths: HTTPIngressPath[];
|
|
210
|
+
}
|
|
211
|
+
export interface HTTPIngressPath {
|
|
212
|
+
path: string;
|
|
213
|
+
pathType: 'Prefix' | 'Exact' | 'ImplementationSpecific';
|
|
214
|
+
backend: IngressBackend;
|
|
215
|
+
}
|
|
216
|
+
export interface IngressBackend {
|
|
217
|
+
serviceName?: string;
|
|
218
|
+
servicePort?: number;
|
|
219
|
+
service?: {
|
|
220
|
+
name: string;
|
|
221
|
+
port: {
|
|
222
|
+
number: number;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
export interface IngressTLS {
|
|
227
|
+
hosts?: string[];
|
|
228
|
+
secretName?: string;
|
|
229
|
+
global?: boolean;
|
|
230
|
+
certificate?: Certificate;
|
|
231
|
+
}
|
|
232
|
+
export interface IngressStatus {
|
|
233
|
+
loadBalancer?: IngressLoadBalancerStatus;
|
|
234
|
+
}
|
|
235
|
+
export interface IngressLoadBalancerStatus {
|
|
236
|
+
ingress?: LoadBalancerIngress[];
|
|
237
|
+
}
|
|
238
|
+
export interface LoadBalancerIngress {
|
|
239
|
+
ip: string;
|
|
240
|
+
hostname: string;
|
|
241
|
+
}
|
|
242
|
+
export declare const VolumeMode: {
|
|
243
|
+
readonly FILE_SYSTEM: "Filesystem";
|
|
244
|
+
readonly BLOCK_DEVICE: "Block";
|
|
245
|
+
};
|
|
246
|
+
export type VolumeMode = ValueOf<typeof VolumeMode>;
|
|
247
|
+
export declare const VolumeModes: ("Filesystem" | "Block")[];
|
|
248
|
+
export declare const AccessMode: {
|
|
249
|
+
readonly RWO: "ReadWriteOnce";
|
|
250
|
+
readonly ROX: "ReadOnlyMany";
|
|
251
|
+
readonly RWX: "ReadWriteMany";
|
|
252
|
+
};
|
|
253
|
+
export type AccessMode = ValueOf<typeof AccessMode>;
|
|
254
|
+
export declare const AccessModes: ("ReadWriteOnce" | "ReadOnlyMany" | "ReadWriteMany")[];
|
|
255
|
+
export interface PersistentVolumeClaim extends KubernetesResource {
|
|
256
|
+
spec: PersistentVolumeClaimSpec;
|
|
257
|
+
status?: PersistentVolumeClaimStatus;
|
|
258
|
+
}
|
|
259
|
+
export interface PersistentVolumeClaimStatus {
|
|
260
|
+
phase: string;
|
|
261
|
+
capacity?: {
|
|
262
|
+
storage: string;
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
export interface PersistentVolumeClaimSpec {
|
|
266
|
+
storageClassName?: string;
|
|
267
|
+
volumeName?: string;
|
|
268
|
+
resources: {
|
|
269
|
+
requests: {
|
|
270
|
+
storage: string;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
dataSource?: PersistentVolumeClaimDataSource;
|
|
274
|
+
selector?: LabelSelector;
|
|
275
|
+
accessModes: AccessMode[];
|
|
276
|
+
volumeMode?: VolumeMode;
|
|
277
|
+
}
|
|
278
|
+
export interface PersistentVolumeClaimDataSource {
|
|
279
|
+
name: string;
|
|
280
|
+
kind: string;
|
|
281
|
+
apiGroup: string;
|
|
282
|
+
}
|
|
283
|
+
export interface APIResourceItem {
|
|
284
|
+
name: string;
|
|
285
|
+
singularName: string;
|
|
286
|
+
namespaced: boolean;
|
|
287
|
+
kind: string;
|
|
288
|
+
verbs: K8sResourceAction[];
|
|
289
|
+
groupVersion?: string[];
|
|
290
|
+
}
|
|
291
|
+
export interface APIResourceList extends KubernetesResource {
|
|
292
|
+
kind: 'APIResourceList';
|
|
293
|
+
apiVersion?: string;
|
|
294
|
+
groupVersion: string;
|
|
295
|
+
resources: APIResourceItem[];
|
|
296
|
+
}
|
|
297
|
+
export interface ResourceAttributes<T extends K8sResourceAction> {
|
|
298
|
+
group: string;
|
|
299
|
+
resource: string;
|
|
300
|
+
verb: T;
|
|
301
|
+
namespace?: string;
|
|
302
|
+
name?: string;
|
|
303
|
+
}
|
|
304
|
+
export interface SubjectAccessReviewSpec<T extends K8sResourceAction> {
|
|
305
|
+
resourceAttributes: ResourceAttributes<T>;
|
|
306
|
+
}
|
|
307
|
+
export interface SubjectAccessReviewStatus {
|
|
308
|
+
allowed: boolean;
|
|
309
|
+
denied?: boolean;
|
|
310
|
+
evaluationError?: string;
|
|
311
|
+
reason?: string;
|
|
312
|
+
}
|
|
313
|
+
export interface SubjectAccessReview<T extends K8sResourceAction = K8sResourceAction> extends KubernetesResource {
|
|
314
|
+
kind: 'SubjectAccessReview';
|
|
315
|
+
spec: SubjectAccessReviewSpec<T>;
|
|
316
|
+
status: SubjectAccessReviewStatus;
|
|
317
|
+
}
|
|
318
|
+
export interface SelfResourceAttributes<T extends K8sResourceAction> extends ResourceAttributes<T> {
|
|
319
|
+
project?: string;
|
|
320
|
+
cluster?: string;
|
|
321
|
+
}
|
|
322
|
+
export interface SelfSubjectAccessReviewSpec<T extends K8sResourceAction> extends SubjectAccessReviewSpec<T> {
|
|
323
|
+
resourceAttributes: SelfResourceAttributes<T>;
|
|
324
|
+
}
|
|
325
|
+
export interface SelfSubjectAccessReview<T extends K8sResourceAction = K8sResourceAction> extends KubernetesResource {
|
|
326
|
+
kind: 'SelfSubjectAccessReview';
|
|
327
|
+
spec: SelfSubjectAccessReviewSpec<T>;
|
|
328
|
+
status: SubjectAccessReviewStatus;
|
|
329
|
+
}
|
|
330
|
+
export interface Status {
|
|
331
|
+
kind: 'Status';
|
|
332
|
+
apiVersion: string;
|
|
333
|
+
metadata: {
|
|
334
|
+
continue?: string;
|
|
335
|
+
};
|
|
336
|
+
status: string;
|
|
337
|
+
message: string;
|
|
338
|
+
reason: string;
|
|
339
|
+
code: number;
|
|
340
|
+
details?: {
|
|
341
|
+
group?: string;
|
|
342
|
+
kind: string;
|
|
343
|
+
name: string;
|
|
344
|
+
uid: string;
|
|
345
|
+
causes: Array<{
|
|
346
|
+
message?: string;
|
|
347
|
+
reason?: string;
|
|
348
|
+
field?: string;
|
|
349
|
+
}>;
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
export interface LocalObjectReference {
|
|
353
|
+
name: string;
|
|
354
|
+
}
|
|
355
|
+
export interface ConfigMapKeyRef extends LocalObjectReference {
|
|
356
|
+
key: string;
|
|
357
|
+
optional?: boolean;
|
|
358
|
+
}
|
|
359
|
+
export interface SecretKeyRef extends LocalObjectReference {
|
|
360
|
+
key: string;
|
|
361
|
+
optional?: boolean;
|
|
362
|
+
}
|
|
363
|
+
export interface ConfigMapRef extends LocalObjectReference {
|
|
364
|
+
optional?: boolean;
|
|
365
|
+
}
|
|
366
|
+
export interface SecretRef extends LocalObjectReference {
|
|
367
|
+
optional?: boolean;
|
|
368
|
+
}
|
|
369
|
+
export interface ObjectFieldSelector {
|
|
370
|
+
apiVersion?: string;
|
|
371
|
+
fieldPath: string;
|
|
372
|
+
}
|
|
373
|
+
export interface ResourceFieldSelector {
|
|
374
|
+
containerName?: string;
|
|
375
|
+
divisor?: string;
|
|
376
|
+
resource: string;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Workload API
|
|
380
|
+
*/
|
|
381
|
+
export interface Deployment extends KubernetesResource {
|
|
382
|
+
name?: string;
|
|
383
|
+
spec?: DeploymentSpec;
|
|
384
|
+
status?: DeploymentStatus;
|
|
385
|
+
generation?: number;
|
|
386
|
+
}
|
|
387
|
+
export interface DeploymentSpec {
|
|
388
|
+
replicas?: number;
|
|
389
|
+
selector?: LabelSelector;
|
|
390
|
+
template?: PodTemplateSpec;
|
|
391
|
+
strategy?: DeploymentStrategy;
|
|
392
|
+
minReadySeconds?: number;
|
|
393
|
+
revisionHistoryLimit?: number;
|
|
394
|
+
}
|
|
395
|
+
export interface Pod extends KubernetesResource {
|
|
396
|
+
spec?: PodSpec;
|
|
397
|
+
status?: PodStatus;
|
|
398
|
+
}
|
|
399
|
+
export interface PodStatus {
|
|
400
|
+
conditions?: Condition[];
|
|
401
|
+
containerStatuses?: ContainerStatus[];
|
|
402
|
+
hostIP?: string;
|
|
403
|
+
initContainerStatuses?: ContainerStatus[];
|
|
404
|
+
ephemeralContainerStatuses?: ContainerStatus[];
|
|
405
|
+
message?: string;
|
|
406
|
+
nominatedNodeName?: string;
|
|
407
|
+
phase?: string;
|
|
408
|
+
podIP?: string;
|
|
409
|
+
podIPs?: Array<{
|
|
410
|
+
ip: string;
|
|
411
|
+
}>;
|
|
412
|
+
qosClass?: string;
|
|
413
|
+
reason?: string;
|
|
414
|
+
startTime?: string;
|
|
415
|
+
}
|
|
416
|
+
export interface HostAliases {
|
|
417
|
+
ip: string;
|
|
418
|
+
hostnames: string[];
|
|
419
|
+
}
|
|
420
|
+
export interface ContainerStatus {
|
|
421
|
+
containerID?: string;
|
|
422
|
+
image?: string;
|
|
423
|
+
imageID?: string;
|
|
424
|
+
lastState?: ContainerState;
|
|
425
|
+
name?: string;
|
|
426
|
+
ready?: boolean;
|
|
427
|
+
restartCount?: number;
|
|
428
|
+
state?: ContainerState;
|
|
429
|
+
started?: boolean;
|
|
430
|
+
}
|
|
431
|
+
export interface ContainerState {
|
|
432
|
+
running?: ContainerStateRunning;
|
|
433
|
+
terminated?: ContainerStateTerminated;
|
|
434
|
+
waiting?: ContainerStateWaiting;
|
|
435
|
+
}
|
|
436
|
+
export interface ContainerStateRunning {
|
|
437
|
+
startedAt?: string;
|
|
438
|
+
}
|
|
439
|
+
export interface ContainerStateTerminated {
|
|
440
|
+
containerID?: string;
|
|
441
|
+
exitCode?: number;
|
|
442
|
+
finishedAt?: string;
|
|
443
|
+
message?: string;
|
|
444
|
+
reason?: string;
|
|
445
|
+
signal?: number;
|
|
446
|
+
startedAt?: string;
|
|
447
|
+
}
|
|
448
|
+
export interface ContainerStateWaiting {
|
|
449
|
+
message?: string;
|
|
450
|
+
reason?: string;
|
|
451
|
+
}
|
|
452
|
+
export interface DeploymentStatus {
|
|
453
|
+
availableReplicas?: number;
|
|
454
|
+
collisionCount?: number;
|
|
455
|
+
observedGeneration?: number;
|
|
456
|
+
readyReplicas?: number;
|
|
457
|
+
replicas?: number;
|
|
458
|
+
unavailableReplicas?: number;
|
|
459
|
+
updatedReplicas?: number;
|
|
460
|
+
conditions?: Condition[];
|
|
461
|
+
}
|
|
462
|
+
export interface RequiredAffinity {
|
|
463
|
+
topologyKey: string;
|
|
464
|
+
labelSelector: LabelSelector;
|
|
465
|
+
}
|
|
466
|
+
export interface PreferredAffinity {
|
|
467
|
+
weight: number;
|
|
468
|
+
podAffinityTerm: {
|
|
469
|
+
labelSelector?: LabelSelector;
|
|
470
|
+
topologyKey: string;
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
export interface PodAffinity {
|
|
474
|
+
requiredDuringSchedulingIgnoredDuringExecution?: RequiredAffinity[];
|
|
475
|
+
preferredDuringSchedulingIgnoredDuringExecution?: PreferredAffinity[];
|
|
476
|
+
}
|
|
477
|
+
export interface PodSpecAffinity {
|
|
478
|
+
podAffinity?: Affinity;
|
|
479
|
+
podAntiAffinity?: Affinity;
|
|
480
|
+
nodeAffinity?: Affinity;
|
|
481
|
+
}
|
|
482
|
+
export interface Affinity {
|
|
483
|
+
requiredDuringSchedulingIgnoredDuringExecution?: PodAffinityTerm[] | NodeAffinityTerm;
|
|
484
|
+
preferredDuringSchedulingIgnoredDuringExecution?: WeightedPodAffinityTerm[];
|
|
485
|
+
}
|
|
486
|
+
export interface WeightedNodeAffinityTerm {
|
|
487
|
+
weight: number;
|
|
488
|
+
preference: NodeSelectorTerm;
|
|
489
|
+
}
|
|
490
|
+
export interface NodeAffinity {
|
|
491
|
+
requiredDuringSchedulingIgnoredDuringExecution?: NodeAffinityTerm;
|
|
492
|
+
preferredDuringSchedulingIgnoredDuringExecution?: WeightedNodeAffinityTerm[];
|
|
493
|
+
}
|
|
494
|
+
export interface WeightedPodAffinityTerm {
|
|
495
|
+
podAffinityTerm: PodAffinityTerm;
|
|
496
|
+
weight: number;
|
|
497
|
+
}
|
|
498
|
+
export interface PodAffinityTerm {
|
|
499
|
+
labelSelector?: LabelSelector;
|
|
500
|
+
topologyKey: string;
|
|
501
|
+
namespaces?: string[];
|
|
502
|
+
}
|
|
503
|
+
export interface NodeAffinityTerm {
|
|
504
|
+
nodeSelectorTerms: NodeSelectorTerm[];
|
|
505
|
+
}
|
|
506
|
+
export interface NodeSelectorTerm {
|
|
507
|
+
matchExpressions: LabelSelectorRequirement[];
|
|
508
|
+
}
|
|
509
|
+
export declare enum VolumeTypeEnum {
|
|
510
|
+
persistentVolumeClaim = "persistentVolumeClaim",
|
|
511
|
+
configMap = "configMap",
|
|
512
|
+
secret = "secret",
|
|
513
|
+
ephemeral = "ephemeral",
|
|
514
|
+
emptyDir = "emptyDir",
|
|
515
|
+
hostPath = "hostPath"
|
|
516
|
+
}
|
|
517
|
+
export interface Volume {
|
|
518
|
+
name: string;
|
|
519
|
+
[VolumeTypeEnum.emptyDir]?: EmptyDirVolumeSource;
|
|
520
|
+
[VolumeTypeEnum.configMap]?: ConfigMapVolumeSource;
|
|
521
|
+
[VolumeTypeEnum.secret]?: SecretVolumeSource;
|
|
522
|
+
[VolumeTypeEnum.persistentVolumeClaim]?: PersistentVolumeClaimVolumeSource;
|
|
523
|
+
[VolumeTypeEnum.hostPath]?: HostPathVolumeSource;
|
|
524
|
+
[VolumeTypeEnum.ephemeral]?: EphemeralVolumeSource;
|
|
525
|
+
isAppResource?: boolean;
|
|
526
|
+
mountPath?: string;
|
|
527
|
+
}
|
|
528
|
+
export interface CsiVolumeSource {
|
|
529
|
+
driver: 'objectstorage.k8s.io';
|
|
530
|
+
volumeAttributes: {
|
|
531
|
+
'bar-name': string;
|
|
532
|
+
'bar-namespace': string;
|
|
533
|
+
bucketRequestName: string;
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
export interface KeyToPath {
|
|
537
|
+
key?: string;
|
|
538
|
+
mode?: number;
|
|
539
|
+
path?: string;
|
|
540
|
+
}
|
|
541
|
+
export interface EmptyDirVolumeSource {
|
|
542
|
+
medium?: string;
|
|
543
|
+
sizeLimit?: string;
|
|
544
|
+
}
|
|
545
|
+
export interface ConfigMapVolumeSource {
|
|
546
|
+
name: string;
|
|
547
|
+
optional?: boolean;
|
|
548
|
+
items?: KeyToPath[];
|
|
549
|
+
}
|
|
550
|
+
export interface SecretVolumeSource {
|
|
551
|
+
secretName: string;
|
|
552
|
+
optional?: boolean;
|
|
553
|
+
items?: KeyToPath[];
|
|
554
|
+
}
|
|
555
|
+
export interface HostPathVolumeSource {
|
|
556
|
+
type?: string;
|
|
557
|
+
path: string;
|
|
558
|
+
}
|
|
559
|
+
export interface PersistentVolumeClaimVolumeSource {
|
|
560
|
+
claimName: string;
|
|
561
|
+
readOnly?: boolean;
|
|
562
|
+
}
|
|
563
|
+
export interface EphemeralVolumeSource {
|
|
564
|
+
volumeClaimTemplate: PersistentVolumeClaim;
|
|
565
|
+
}
|
|
566
|
+
export interface Probe {
|
|
567
|
+
exec?: ExecAction;
|
|
568
|
+
failureThreshold?: number;
|
|
569
|
+
httpGet?: HTTPGetAction;
|
|
570
|
+
initialDelaySeconds?: number;
|
|
571
|
+
periodSeconds?: number;
|
|
572
|
+
successThreshold?: number;
|
|
573
|
+
tcpSocket?: TCPSocketAction;
|
|
574
|
+
timeoutSeconds?: number;
|
|
575
|
+
}
|
|
576
|
+
export interface ExecAction {
|
|
577
|
+
command?: string[];
|
|
578
|
+
}
|
|
579
|
+
export interface HTTPHeader {
|
|
580
|
+
name?: string;
|
|
581
|
+
value?: string;
|
|
582
|
+
}
|
|
583
|
+
export interface TCPSocketAction {
|
|
584
|
+
host?: string;
|
|
585
|
+
port?: number | string;
|
|
586
|
+
}
|
|
587
|
+
export interface VolumeMount {
|
|
588
|
+
name: string;
|
|
589
|
+
mountPath?: string;
|
|
590
|
+
readOnly?: boolean;
|
|
591
|
+
subPath?: string;
|
|
592
|
+
mountPropagation?: string;
|
|
593
|
+
}
|
|
594
|
+
export interface ResourceRequirements {
|
|
595
|
+
limits?: StringMap;
|
|
596
|
+
requests?: StringMap;
|
|
597
|
+
}
|
|
598
|
+
export interface ContainerPort {
|
|
599
|
+
name?: string;
|
|
600
|
+
hostPort?: number;
|
|
601
|
+
containerPort?: number;
|
|
602
|
+
servicePort?: number;
|
|
603
|
+
protocol?: 'TCP' | 'UDP';
|
|
604
|
+
hostIP?: string;
|
|
605
|
+
}
|
|
606
|
+
export interface RollingUpdateDaemonSet {
|
|
607
|
+
maxUnavailable?: string | number;
|
|
608
|
+
}
|
|
609
|
+
export interface DaemonSetUpdateStrategy {
|
|
610
|
+
type?: DaemonSetUpdateStrategyType;
|
|
611
|
+
rollingUpdate?: RollingUpdateDaemonSet;
|
|
612
|
+
}
|
|
613
|
+
export interface DaemonSet extends KubernetesResource {
|
|
614
|
+
spec?: DaemonSetSpec;
|
|
615
|
+
status?: DaemonSetStatus;
|
|
616
|
+
}
|
|
617
|
+
export interface DaemonSetSpec {
|
|
618
|
+
selector?: LabelSelector;
|
|
619
|
+
template?: PodTemplateSpec;
|
|
620
|
+
updateStrategy?: DaemonSetUpdateStrategy;
|
|
621
|
+
minReadySeconds?: number;
|
|
622
|
+
revisionHistoryLimit?: number;
|
|
623
|
+
}
|
|
624
|
+
export type DaemonSetStatus = Partial<{
|
|
625
|
+
currentNumberScheduled: number;
|
|
626
|
+
numberMisscheduled: number;
|
|
627
|
+
desiredNumberScheduled: number;
|
|
628
|
+
numberReady: number;
|
|
629
|
+
observedGeneration: number;
|
|
630
|
+
updatedNumberScheduled: number;
|
|
631
|
+
numberUnavailable: number;
|
|
632
|
+
numberAvailable: number;
|
|
633
|
+
}>;
|
|
634
|
+
export interface ConfigMap<T = StringMap> extends KubernetesResource {
|
|
635
|
+
data?: T;
|
|
636
|
+
binaryData?: StringMap;
|
|
637
|
+
}
|
|
638
|
+
export interface CronJobSpec {
|
|
639
|
+
concurrencyPolicy?: string;
|
|
640
|
+
failedJobsHistoryLimit?: number | '';
|
|
641
|
+
schedule?: string;
|
|
642
|
+
startingDeadlineSeconds?: number | '';
|
|
643
|
+
successfulJobsHistoryLimit?: number | '';
|
|
644
|
+
suspend?: boolean;
|
|
645
|
+
timeZone?: string;
|
|
646
|
+
jobTemplate?: JobTemplateSpec;
|
|
647
|
+
}
|
|
648
|
+
export interface Job extends KubernetesResource {
|
|
649
|
+
spec?: JobSpec;
|
|
650
|
+
status?: JobStatus;
|
|
651
|
+
}
|
|
652
|
+
export interface JobSpec {
|
|
653
|
+
activeDeadlineSeconds?: number | '';
|
|
654
|
+
backoffLimit?: number | '';
|
|
655
|
+
completions?: number | '';
|
|
656
|
+
manualSelector?: boolean;
|
|
657
|
+
parallelism?: number | '';
|
|
658
|
+
selector?: LabelSelector;
|
|
659
|
+
template?: PodTemplateSpec;
|
|
660
|
+
startingDeadlineSeconds?: number | '';
|
|
661
|
+
}
|
|
662
|
+
export interface JobTemplateSpec {
|
|
663
|
+
metadata?: ObjectMeta;
|
|
664
|
+
spec?: JobSpec;
|
|
665
|
+
}
|
|
666
|
+
export interface JobStatus {
|
|
667
|
+
active: number | '';
|
|
668
|
+
completionTime: string;
|
|
669
|
+
conditions: Condition[];
|
|
670
|
+
startTime: string;
|
|
671
|
+
succeeded: number;
|
|
672
|
+
failed: number;
|
|
673
|
+
}
|
|
674
|
+
export interface CronJobStatus {
|
|
675
|
+
active?: ObjectReference[];
|
|
676
|
+
lastScheduleTime: string;
|
|
677
|
+
}
|
|
678
|
+
export interface CronJob extends KubernetesResource {
|
|
679
|
+
spec?: CronJobSpec;
|
|
680
|
+
status?: CronJobStatus;
|
|
681
|
+
}
|
|
682
|
+
export type NodeStatusReason = 'KubeletHasSufficientDisk' | 'KubeletHasSufficientMemory' | 'KubeletHasNoDiskPressure' | 'KubeletReady';
|
|
683
|
+
export type NodeStatusType = 'OutOfDisk' | 'MemoryPressure' | 'DiskPressure' | 'Ready';
|
|
684
|
+
export interface NodeTaint {
|
|
685
|
+
key: string;
|
|
686
|
+
timeAdded?: string;
|
|
687
|
+
effect: TaintEffect;
|
|
688
|
+
value?: string;
|
|
689
|
+
unschedulable?: boolean;
|
|
690
|
+
}
|
|
691
|
+
export interface Node extends KubernetesResource {
|
|
692
|
+
spec?: {
|
|
693
|
+
providerID?: string;
|
|
694
|
+
taints?: NodeTaint[];
|
|
695
|
+
configSource?: string;
|
|
696
|
+
unschedulable?: boolean;
|
|
697
|
+
podCIDR?: string;
|
|
698
|
+
podCIDRs?: string[];
|
|
699
|
+
externalID?: string;
|
|
700
|
+
ip?: string;
|
|
701
|
+
};
|
|
702
|
+
status?: NodeStatus;
|
|
703
|
+
}
|
|
704
|
+
export interface NodeStatus {
|
|
705
|
+
volumesAttached: boolean;
|
|
706
|
+
daemonEndpoints: {
|
|
707
|
+
kubeletEndpoint: {
|
|
708
|
+
port: number;
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
capacity: Record<string, string>;
|
|
712
|
+
addresses: Array<{
|
|
713
|
+
type: string;
|
|
714
|
+
address: string;
|
|
715
|
+
}>;
|
|
716
|
+
allocatable: {
|
|
717
|
+
'alpha.kubernetes.io/nvidia-gpu': string;
|
|
718
|
+
'tencent.com/vcuda-core': string;
|
|
719
|
+
'tencent.com/vcuda-memory': string;
|
|
720
|
+
pods: string;
|
|
721
|
+
cpu: string;
|
|
722
|
+
memory: string;
|
|
723
|
+
};
|
|
724
|
+
images: Array<{
|
|
725
|
+
sizeBytes: number;
|
|
726
|
+
names: string[];
|
|
727
|
+
}>;
|
|
728
|
+
nodeInfo: {
|
|
729
|
+
kubeProxyVersion: string;
|
|
730
|
+
operatingSystem: string;
|
|
731
|
+
kernelVersion: string;
|
|
732
|
+
systemUUID: string;
|
|
733
|
+
containerRuntimeVersion: string;
|
|
734
|
+
osImage: string;
|
|
735
|
+
architecture: string;
|
|
736
|
+
bootID: string;
|
|
737
|
+
machineID: string;
|
|
738
|
+
kubeletVersion: string;
|
|
739
|
+
};
|
|
740
|
+
volumesInUse: boolean;
|
|
741
|
+
phase: string;
|
|
742
|
+
conditions: Condition[];
|
|
743
|
+
}
|
|
744
|
+
export interface Service extends KubernetesResource {
|
|
745
|
+
kind: 'Service';
|
|
746
|
+
spec?: ServiceSpec;
|
|
747
|
+
status?: {
|
|
748
|
+
loadBalancer?: {
|
|
749
|
+
ingress?: Array<{
|
|
750
|
+
hostname?: string;
|
|
751
|
+
ip?: string;
|
|
752
|
+
}>;
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
export declare const SERVICE_TYPES: readonly ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"];
|
|
757
|
+
export declare const SERVICE_SESSION_AFFINITIES: readonly ["None", "ClientIP"];
|
|
758
|
+
export type ServiceType = (typeof SERVICE_TYPES)[number];
|
|
759
|
+
export type ServiceSessionAffinity = (typeof SERVICE_SESSION_AFFINITIES)[number];
|
|
760
|
+
export interface ServiceSpec {
|
|
761
|
+
clusterIP?: string;
|
|
762
|
+
clusterIPs?: string[];
|
|
763
|
+
externalIPs?: string[];
|
|
764
|
+
externalName?: string;
|
|
765
|
+
ipFamilies?: ['IPv4'] | ['IPv6'] | ['IPv4', 'IPv6'] | ['IPv6', 'IPv4'];
|
|
766
|
+
ipFamilyPolicy?: 'SingleStack' | 'PreferDualStack' | 'RequireDualStack';
|
|
767
|
+
ports?: ServicePort[];
|
|
768
|
+
selector?: StringMap;
|
|
769
|
+
type?: ServiceType;
|
|
770
|
+
sessionAffinity?: ServiceSessionAffinity;
|
|
771
|
+
}
|
|
772
|
+
export declare const SERVICE_PORT_BASE_PROTOCOLS: readonly ["TCP", "UDP"];
|
|
773
|
+
export type ServicePortBaseProtocol = (typeof SERVICE_PORT_BASE_PROTOCOLS)[number];
|
|
774
|
+
export declare const SERVICE_PORT_PROTOCOLS: readonly ["TCP", "UDP", "HTTP", "HTTPS", "HTTP2", "gRPC"];
|
|
775
|
+
export type ServicePortProtocol = (typeof SERVICE_PORT_PROTOCOLS)[number];
|
|
776
|
+
export interface ServicePort {
|
|
777
|
+
name?: string;
|
|
778
|
+
nodePort?: number;
|
|
779
|
+
port?: number;
|
|
780
|
+
protocol?: ServicePortBaseProtocol;
|
|
781
|
+
appProtocol?: Lowercase<ServicePortProtocol>;
|
|
782
|
+
targetPort?: number | string;
|
|
783
|
+
}
|
|
784
|
+
export interface CustomResourceDefinitionVersion {
|
|
785
|
+
name: string;
|
|
786
|
+
served: boolean;
|
|
787
|
+
storage: boolean;
|
|
788
|
+
schema?: {
|
|
789
|
+
openAPIV3Schema: OpenAPIV3SchemaObject;
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
export interface CustomResourceDefinition extends KubernetesResource {
|
|
793
|
+
kind: 'CustomResourceDefinition';
|
|
794
|
+
spec: {
|
|
795
|
+
group: string;
|
|
796
|
+
version: string;
|
|
797
|
+
names: {
|
|
798
|
+
plural: string;
|
|
799
|
+
singular: string;
|
|
800
|
+
kind: string;
|
|
801
|
+
listKind: string;
|
|
802
|
+
};
|
|
803
|
+
scope: string;
|
|
804
|
+
validation: {
|
|
805
|
+
openAPIV3Schema: OpenAPIV3SchemaObject;
|
|
806
|
+
};
|
|
807
|
+
versions: CustomResourceDefinitionVersion[];
|
|
808
|
+
preserveUnknownFields: boolean;
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
export interface NameSpaceResourceRatio extends KubernetesResource {
|
|
812
|
+
spec: {
|
|
813
|
+
cpu: number;
|
|
814
|
+
memory: number;
|
|
815
|
+
};
|
|
816
|
+
status: {
|
|
817
|
+
clusterCPU: number;
|
|
818
|
+
clusterMemory: number;
|
|
819
|
+
};
|
|
820
|
+
}
|
|
821
|
+
export interface K8sEventSeries {
|
|
822
|
+
count: number;
|
|
823
|
+
lastObservedTime: string;
|
|
824
|
+
}
|
|
825
|
+
export interface K8sEventSource {
|
|
826
|
+
component?: string;
|
|
827
|
+
host?: string;
|
|
828
|
+
}
|
|
829
|
+
export interface K8sEvent extends KubernetesResource {
|
|
830
|
+
involvedObject?: ObjectReference;
|
|
831
|
+
reason?: string;
|
|
832
|
+
message?: string;
|
|
833
|
+
source?: K8sEventSource;
|
|
834
|
+
firstTimestamp?: string;
|
|
835
|
+
lastTimestamp?: string;
|
|
836
|
+
count?: number;
|
|
837
|
+
type?: string;
|
|
838
|
+
eventTime?: string;
|
|
839
|
+
series?: K8sEventSeries;
|
|
840
|
+
action?: string;
|
|
841
|
+
related?: ObjectReference;
|
|
842
|
+
reportingController?: string;
|
|
843
|
+
reportingInstance?: string;
|
|
844
|
+
}
|
|
845
|
+
export interface ResourcePatch extends KubernetesResource {
|
|
846
|
+
spec?: {
|
|
847
|
+
jsonPatch: Array<{
|
|
848
|
+
op: string;
|
|
849
|
+
path: string;
|
|
850
|
+
value: string;
|
|
851
|
+
}>;
|
|
852
|
+
target?: {
|
|
853
|
+
apiVersion: string;
|
|
854
|
+
kind: string;
|
|
855
|
+
name: string;
|
|
856
|
+
namespace: string;
|
|
857
|
+
};
|
|
858
|
+
release: string;
|
|
859
|
+
};
|
|
860
|
+
}
|