sync naming

This commit is contained in:
typescreep
2025-11-21 11:00:42 +03:00
parent 744a4e9661
commit efa0329042
6 changed files with 87 additions and 86 deletions

16
.env
View File

@@ -7,8 +7,8 @@ VITE_CUSTOM_TENANT_TEXT=
VITE_CUSTOMIZATION_API_GROUP=incloud.io
VITE_CUSTOMIZATION_API_VERSION=v1alpha
VITE_CUSTOMIZATION_NAVIGATION_RESOURCE_NAME=navigations
VITE_CUSTOMIZATION_NAVIGATION_RESOURCE=navigation
VITE_CUSTOMIZATION_NAVIGATION_RESOURCE_PLURAL=navigations
VITE_CUSTOMIZATION_NAVIGATION_RESOURCE_NAME=navigation
VITE_CUSTOMIZATION_SIDEBAR_FALLBACK_ID = fallback
@@ -19,15 +19,15 @@ VITE_HIDE_INSIDE=false
VITE_NAVIGATE_FROM_CLUSTERLIST=/openapi-ui/~recordValue~/builtin-table/namespaces
VITE_PROJECTS_API_GROUP=incloud.io
VITE_PROJECTS_VERSION=v1alpha
VITE_PROJECTS_RESOURCE_NAME=projects
VITE_PROJECTS_API_VERSION=v1alpha
VITE_PROJECTS_PLURAL=projects
VITE_MARKETPLACE_RESOURCE_NAME=marketplacepanels
VITE_MARKETPLACE_PLURAL=marketplacepanels
VITE_MARKETPLACE_KIND=MarketplacePanel
VITE_INSTANCES_API_GROUP=incloud.io
VITE_INSTANCES_VERSION=v1alpha1
VITE_INSTANCES_RESOURCE_NAME=v1alpha1
VITE_INSTANCES_API_VERSION=v1alpha1
VITE_INSTANCES_PLURAL=v1alpha1
VITE_BFF_URL=
@@ -52,4 +52,4 @@ VITE_BASE_NAMESPACE_FACTORY_KEY=base-factory-clusterscoped-builtin
VITE_CUSTOM_NAMESPACE_API_RESOURCE_API_GROUP=
VITE_CUSTOM_NAMESPACE_API_RESOURCE_API_VERSION=
VITE_CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME=
VITE_CUSTOM_NAMESPACE_API_RESOURCE_PLURAL=

View File

@@ -9,8 +9,8 @@ KUBE_API_URL=
CUSTOMIZATION_API_GROUP=
CUSTOMIZATION_API_VERSION=
CUSTOMIZATION_NAVIGATION_RESOURCE_PLURAL=
CUSTOMIZATION_NAVIGATION_RESOURCE_NAME=
CUSTOMIZATION_NAVIGATION_RESOURCE=
CUSTOMIZATION_SIDEBAR_FALLBACK_ID=
@@ -21,15 +21,15 @@ HIDE_INSIDE=
NAVIGATE_FROM_CLUSTERLIST=
PROJECTS_API_GROUP=
PROJECTS_VERSION=
PROJECTS_RESOURCE_NAME=
PROJECTS_API_VERSION=
PROJECTS_PLURAL=
MARKETPLACE_RESOURCE_NAME=
MARKETPLACE_PLURAL
MARKETPLACE_KIND=
INSTANCES_API_GROUP=
INSTANCES_VERSION=
INSTANCES_RESOURCE_NAME=
INSTANCES_API_VERSION=
INSTANCES_PLURAL=
BFF_URL=
@@ -54,4 +54,4 @@ BASE_NAMESPACE_FACTORY_KEY=
CUSTOM_NAMESPACE_API_RESOURCE_API_GROUP=
CUSTOM_NAMESPACE_API_RESOURCE_API_VERSION=
CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME=
CUSTOM_NAMESPACE_API_RESOURCE_PLURAL=

View File

@@ -9,46 +9,46 @@ Define interfaces in YAML; the app discovers CRDs, watches their objects, and bu
This app can be configured through environment variables.
| Variable | Type | Description |
| --------------------------------------------- | --------- | --------------------------------------------------------------------------------------- |
| `BASEPREFIX` | `string` | Base URL for the app. `/openapi-ui` |
| `KUBE_API_URL` | `string` | URL for the Kubernetes API. `http://api.incloud-web.svc.default.in-cloud.internal:8081` |
| `BFF_URL` | `string` | URL for the BFF |
| `TITLE_TEXT` | `string` | Page title |
| `LOGO_TEXT` | `string` | Logo text near icon |
| `ICON_SVG` | `string` | Favicon base64 encoded |
| `FOOTER_TEXT` | `string` | Footer text |
| `CUSTOM_LOGO_SVG` | `string` | Base64 encoded svg |
| `CUSTOM_TENANT_TEXT` | `string` | Custom tenant text override |
| `LOGIN_URL` | `string` | Login endpoint. `/oauth/token` |
| `LOGOUT_URL` | `string` | Logout endpoint. `/oauth/logout` |
| `LOGIN_USERNAME_FIELD` | `string` | Field from login endpoint response. `name` |
| `CUSTOMIZATION_API_GROUP` | `string` | API group for customization resources. `front.in-cloud.io` |
| `CUSTOMIZATION_API_VERSION` | `string` | API version for customization resources. `v1alpha1` |
| `CUSTOMIZATION_NAVIGATION_RESOURCE_NAME` | `string` | Resource plural name for navigation settings. `navigations` |
| `CUSTOMIZATION_NAVIGATION_RESOURCE` | `string` | Resource name for navigation settings. `navigation` |
| `CUSTOMIZATION_SIDEBAR_FALLBACK_ID` | `string` | `spec.id` to find in `sidebars` to fallback. Use `-namespaced` for NS-pages |
| `USE_NAMESPACE_NAV` | `boolean` | Use namespaces instead of project/instances. `true` |
| `HIDE_INSIDE` | `boolean` | Use namespaces instead of project/instances. `true` |
| `NAVIGATE_FROM_CLUSTERLIST` | `string` | Location to be navigated after selecting cluster. `/openapi-ui/clusters/~recordValue~` |
| `PROJECTS_API_GROUP` | `string` | API group for projects resources. If not using namespace nav. |
| `PROJECTS_VERSION` | `string` | API version for projects resources. If not using namespace nav. |
| `PROJECTS_RESOURCE_NAME` | `string` | Plural name for projects resources. If not using namespace nav. |
| `INSTANCES_API_GROUP` | `string` | API group for instances resources. If not using namespace nav. |
| `INSTANCES_VERSION` | `string` | API version for instances resources. If not using namespace nav. |
| `INSTANCES_RESOURCE_NAME` | `string` | Plural name for instances resources. If not using namespace nav. |
| `MARKETPLACE_RESOURCE_NAME` | `string` | Plural name for marketplace resources for related factory component. |
| `MARKETPLACE_KIND` | `string` | Kind name for marketplace resources for related factory component. |
| `NODE_TERMINAL_DEFAULT_PROFILE` | `string` | Default profile for node terminal component. `baseline` |
| `REMOVE_BACKLINK` | `boolean` | Remove backlink arrow from right-side navigation |
| `REMOVE_BACKLINK_TEXT` | `boolean` | Remove backlink text from right-side navigation |
| `DOCS_URL` | `string` | URL to navigate from question mark |
| `SEARCH_TABLE_CUSTOMIZATION_PREFIX` | `string` | Search tables Customization id prefix |
| `BASE_FACTORY_NAMESPACED_API_KEY` | `string` | Base factory key for namespaced API resources |
| `BASE_FACTORY_CLUSTERSCOPED_API_KEY` | `string` | Base factory key for clusterscoped API resources |
| `BASE_FACTORY_NAMESPACED_BUILTIN_KEY` | `string` | Base factory key for namespaced builtin (v1) resources |
| `BASE_FACTORY_CLUSTERSCOPED_BUILTIN_KEY` | `string` | Base factory key for clusterscoped builtin (v1) resources |
| `BASE_NAMESPACE_FACTORY_KEY` | `string` | Base factory key for namespaces |
| `CUSTOM_NAMESPACE_API_RESOURCE_API_GROUP` | `string` | Custom namespace resource: api group |
| `CUSTOM_NAMESPACE_API_RESOURCE_API_VERSION` | `string` | Custom namespace resource: api version |
| `CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME` | `string` | Custom namespace resource: resource name |
| Variable | Type | Description |
| ------------------------------------------- | --------- | --------------------------------------------------------------------------------------- |
| `BASEPREFIX` | `string` | Base URL for the app. `/openapi-ui` |
| `KUBE_API_URL` | `string` | URL for the Kubernetes API. `http://api.incloud-web.svc.default.in-cloud.internal:8081` |
| `BFF_URL` | `string` | URL for the BFF |
| `TITLE_TEXT` | `string` | Page title |
| `LOGO_TEXT` | `string` | Logo text near icon |
| `ICON_SVG` | `string` | Favicon base64 encoded |
| `FOOTER_TEXT` | `string` | Footer text |
| `CUSTOM_LOGO_SVG` | `string` | Base64 encoded svg |
| `CUSTOM_TENANT_TEXT` | `string` | Custom tenant text override |
| `LOGIN_URL` | `string` | Login endpoint. `/oauth/token` |
| `LOGOUT_URL` | `string` | Logout endpoint. `/oauth/logout` |
| `LOGIN_USERNAME_FIELD` | `string` | Field from login endpoint response. `name` |
| `CUSTOMIZATION_API_GROUP` | `string` | API group for customization resources. `front.in-cloud.io` |
| `CUSTOMIZATION_API_VERSION` | `string` | API version for customization resources. `v1alpha1` |
| `CUSTOMIZATION_NAVIGATION_RESOURCE_PLURAL` | `string` | Resource plural name for navigation settings. `navigations` |
| `CUSTOMIZATION_NAVIGATION_RESOURCE_NAME` | `string` | Resource name for navigation settings. `navigation` |
| `CUSTOMIZATION_SIDEBAR_FALLBACK_ID` | `string` | `spec.id` to find in `sidebars` to fallback. Use `-namespaced` for NS-pages |
| `USE_NAMESPACE_NAV` | `boolean` | Use namespaces instead of project/instances. `true` |
| `HIDE_INSIDE` | `boolean` | Use namespaces instead of project/instances. `true` |
| `NAVIGATE_FROM_CLUSTERLIST` | `string` | Location to be navigated after selecting cluster. `/openapi-ui/clusters/~recordValue~` |
| `PROJECTS_API_GROUP` | `string` | API group for projects resources. If not using namespace nav. |
| `PROJECTS_API_VERSION` | `string` | API version for projects resources. If not using namespace nav. |
| `PROJECTS_PLURAL` | `string` | Plural name for projects resources. If not using namespace nav. |
| `INSTANCES_API_GROUP` | `string` | API group for instances resources. If not using namespace nav. |
| `INSTANCES_API_VERSION` | `string` | API version for instances resources. If not using namespace nav. |
| `INSTANCES_PLURAL` | `string` | Plural name for instances resources. If not using namespace nav. |
| `MARKETPLACE_PLURAL` | `string` | Plural name for marketplace resources for related factory component. |
| `MARKETPLACE_KIND` | `string` | Kind name for marketplace resources for related factory component. |
| `NODE_TERMINAL_DEFAULT_PROFILE` | `string` | Default profile for node terminal component. `baseline` |
| `REMOVE_BACKLINK` | `boolean` | Remove backlink arrow from right-side navigation |
| `REMOVE_BACKLINK_TEXT` | `boolean` | Remove backlink text from right-side navigation |
| `DOCS_URL` | `string` | URL to navigate from question mark |
| `SEARCH_TABLE_CUSTOMIZATION_PREFIX` | `string` | Search tables Customization id prefix |
| `BASE_FACTORY_NAMESPACED_API_KEY` | `string` | Base factory key for namespaced API resources |
| `BASE_FACTORY_CLUSTERSCOPED_API_KEY` | `string` | Base factory key for clusterscoped API resources |
| `BASE_FACTORY_NAMESPACED_BUILTIN_KEY` | `string` | Base factory key for namespaced builtin (v1) resources |
| `BASE_FACTORY_CLUSTERSCOPED_BUILTIN_KEY` | `string` | Base factory key for clusterscoped builtin (v1) resources |
| `BASE_NAMESPACE_FACTORY_KEY` | `string` | Base factory key for namespaces |
| `CUSTOM_NAMESPACE_API_RESOURCE_API_GROUP` | `string` | Custom namespace resource: api group |
| `CUSTOM_NAMESPACE_API_RESOURCE_API_VERSION` | `string` | Custom namespace resource: api version |
| `CUSTOM_NAMESPACE_API_RESOURCE_PLURAL` | `string` | Custom namespace resource: plural name |

8
package-lock.json generated
View File

@@ -11,7 +11,7 @@
"@ant-design/icons": "5.6.0",
"@monaco-editor/react": "4.6.0",
"@originjs/vite-plugin-federation": "1.3.6",
"@prorobotech/openapi-k8s-toolkit": "^1.1.0-alpha.13",
"@prorobotech/openapi-k8s-toolkit": "^1.1.0-alpha.14",
"@readme/openapi-parser": "4.0.0",
"@reduxjs/toolkit": "2.2.5",
"@tanstack/react-query": "5.62.2",
@@ -2802,9 +2802,9 @@
}
},
"node_modules/@prorobotech/openapi-k8s-toolkit": {
"version": "1.1.0-alpha.13",
"resolved": "https://registry.npmjs.org/@prorobotech/openapi-k8s-toolkit/-/openapi-k8s-toolkit-1.1.0-alpha.13.tgz",
"integrity": "sha512-qAa394TvcAziVbFEXQ7/xJcpvHIFu5p8ZIo7kdlLKBeR2Ln2CikyJYqVgPNOVhTfiJrkf/nmkd4Qs1fGKJpX6g==",
"version": "1.1.0-alpha.14",
"resolved": "https://registry.npmjs.org/@prorobotech/openapi-k8s-toolkit/-/openapi-k8s-toolkit-1.1.0-alpha.14.tgz",
"integrity": "sha512-9sIflaPQ3wNzwVGguRSZNgBe1ww4RUcvz848LnkhUi0Lhvb3rqx4azo4TgEEwVh+k780D+iifv0i1Ep35JJjJw==",
"license": "MIT",
"dependencies": {
"@monaco-editor/react": "4.6.0",

View File

@@ -20,7 +20,7 @@
"@ant-design/icons": "5.6.0",
"@monaco-editor/react": "4.6.0",
"@originjs/vite-plugin-federation": "1.3.6",
"@prorobotech/openapi-k8s-toolkit": "1.1.0-alpha.13",
"@prorobotech/openapi-k8s-toolkit": "1.1.0-alpha.14",
"@readme/openapi-parser": "4.0.0",
"@reduxjs/toolkit": "2.2.5",
"@tanstack/react-query": "5.62.2",

View File

@@ -29,14 +29,14 @@ const CUSTOMIZATION_API_GROUP =
const CUSTOMIZATION_API_VERSION =
process.env.LOCAL === 'true' ? options?.CUSTOMIZATION_API_VERSION : process.env.CUSTOMIZATION_API_VERSION
const CUSTOMIZATION_NAVIGATION_RESOURCE_PLURAL =
process.env.LOCAL === 'true'
? options?.CUSTOMIZATION_NAVIGATION_RESOURCE_PLURAL
: process.env.CUSTOMIZATION_NAVIGATION_RESOURCE_PLURAL
const CUSTOMIZATION_NAVIGATION_RESOURCE_NAME =
process.env.LOCAL === 'true'
? options?.CUSTOMIZATION_NAVIGATION_RESOURCE_NAME
: process.env.CUSTOMIZATION_NAVIGATION_RESOURCE_NAME
const CUSTOMIZATION_NAVIGATION_RESOURCE =
process.env.LOCAL === 'true'
? options?.CUSTOMIZATION_NAVIGATION_RESOURCE
: process.env.CUSTOMIZATION_NAVIGATION_RESOURCE
const CUSTOMIZATION_SIDEBAR_FALLBACK_ID =
process.env.LOCAL === 'true'
@@ -50,19 +50,18 @@ const NAVIGATE_FROM_CLUSTERLIST =
process.env.LOCAL === 'true' ? options?.NAVIGATE_FROM_CLUSTERLIST : process.env.NAVIGATE_FROM_CLUSTERLIST
const PROJECTS_API_GROUP = process.env.LOCAL === 'true' ? options?.PROJECTS_API_GROUP : process.env.PROJECTS_API_GROUP
const PROJECTS_VERSION = process.env.LOCAL === 'true' ? options?.PROJECTS_VERSION : process.env.PROJECTS_VERSION
const PROJECTS_RESOURCE_NAME =
process.env.LOCAL === 'true' ? options?.PROJECTS_RESOURCE_NAME : process.env.PROJECTS_RESOURCE_NAME
const PROJECTS_API_VERSION =
process.env.LOCAL === 'true' ? options?.PROJECTS_API_VERSION : process.env.PROJECTS_API_VERSION
const PROJECTS_PLURAL = process.env.LOCAL === 'true' ? options?.PROJECTS_PLURAL : process.env.PROJECTS_PLURAL
const MARKETPLACE_RESOURCE_NAME =
process.env.LOCAL === 'true' ? options?.MARKETPLACE_RESOURCE_NAME : process.env.MARKETPLACE_RESOURCE_NAME
const MARKETPLACE_PLURAL = process.env.LOCAL === 'true' ? options?.MARKETPLACE_PLURAL : process.env.MARKETPLACE_PLURAL
const MARKETPLACE_KIND = process.env.LOCAL === 'true' ? options?.MARKETPLACE_KIND : process.env.MARKETPLACE_KIND
const INSTANCES_API_GROUP =
process.env.LOCAL === 'true' ? options?.INSTANCES_API_GROUP : process.env.INSTANCES_API_GROUP
const INSTANCES_VERSION = process.env.LOCAL === 'true' ? options?.INSTANCES_VERSION : process.env.INSTANCES_VERSION
const INSTANCES_RESOURCE_NAME =
process.env.LOCAL === 'true' ? options?.INSTANCES_RESOURCE_NAME : process.env.INSTANCES_RESOURCE_NAME
const INSTANCES_API_VERSION =
process.env.LOCAL === 'true' ? options?.INSTANCES_API_VERSION : process.env.INSTANCES_API_VERSION
const INSTANCES_PLURAL = process.env.LOCAL === 'true' ? options?.INSTANCES_PLURAL : process.env.INSTANCES_PLURAL
const BFF_URL = process.env.LOCAL === 'true' ? options?.BFF_URL : process.env.BFF_URL
@@ -110,10 +109,10 @@ const CUSTOM_NAMESPACE_API_RESOURCE_API_VERSION =
process.env.LOCAL === 'true'
? options?.CUSTOM_NAMESPACE_API_RESOURCE_API_VERSION
: process.env.CUSTOM_NAMESPACE_API_RESOURCE_API_VERSION
const CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME =
const CUSTOM_NAMESPACE_API_RESOURCE_PLURAL =
process.env.LOCAL === 'true'
? options?.CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME
: process.env.CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME
? options?.CUSTOM_NAMESPACE_API_RESOURCE_PLURAL
: process.env.CUSTOM_NAMESPACE_API_RESOURCE_PLURAL
const healthcheck = require('express-healthcheck')
const promBundle = require('express-prom-bundle')
@@ -225,6 +224,9 @@ app.get(`${basePrefix ? basePrefix : ''}/env.js`, (_, res) => {
${CUSTOM_TENANT_TEXT ? ` CUSTOM_TENANT_TEXT: "${CUSTOM_TENANT_TEXT}",` : ''}
CUSTOMIZATION_API_GROUP: ${JSON.stringify(CUSTOMIZATION_API_GROUP) || '"check envs"'},
CUSTOMIZATION_API_VERSION: ${JSON.stringify(CUSTOMIZATION_API_VERSION) || '"check envs"'},
CUSTOMIZATION_NAVIGATION_RESOURCE_PLURAL: ${
JSON.stringify(CUSTOMIZATION_NAVIGATION_RESOURCE_PLURAL) || '"check envs"'
},
CUSTOMIZATION_NAVIGATION_RESOURCE_NAME: ${
JSON.stringify(CUSTOMIZATION_NAVIGATION_RESOURCE_NAME) || '"check envs"'
},
@@ -239,23 +241,22 @@ app.get(`${basePrefix ? basePrefix : ''}/env.js`, (_, res) => {
: ''
}
${
CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME
? ` CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME: "${CUSTOM_NAMESPACE_API_RESOURCE_RESOURCE_NAME}",`
CUSTOM_NAMESPACE_API_RESOURCE_PLURAL
? ` CUSTOM_NAMESPACE_API_RESOURCE_PLURAL: "${CUSTOM_NAMESPACE_API_RESOURCE_PLURAL}",`
: ''
}
CUSTOMIZATION_NAVIGATION_RESOURCE: ${JSON.stringify(CUSTOMIZATION_NAVIGATION_RESOURCE) || '"check envs"'},
CUSTOMIZATION_SIDEBAR_FALLBACK_ID: ${JSON.stringify(CUSTOMIZATION_SIDEBAR_FALLBACK_ID) || '"check envs"'},
USE_NAMESPACE_NAV: ${USE_NAMESPACE_NAV ? JSON.stringify(USE_NAMESPACE_NAV).toLowerCase() : '"false"'},
HIDE_INSIDE: ${HIDE_INSIDE ? JSON.stringify(HIDE_INSIDE).toLowerCase() : '"false"'},
NAVIGATE_FROM_CLUSTERLIST: ${JSON.stringify(NAVIGATE_FROM_CLUSTERLIST) || '"check envs"'},
PROJECTS_API_GROUP: ${JSON.stringify(PROJECTS_API_GROUP) || '"check envs"'},
PROJECTS_VERSION: ${JSON.stringify(PROJECTS_VERSION) || '"check envs"'},
PROJECTS_RESOURCE_NAME: ${JSON.stringify(PROJECTS_RESOURCE_NAME) || '"check envs"'},
MARKETPLACE_RESOURCE_NAME: ${JSON.stringify(MARKETPLACE_RESOURCE_NAME) || '"check envs"'},
PROJECTS_API_VERSION: ${JSON.stringify(PROJECTS_API_VERSION) || '"check envs"'},
PROJECTS_PLURAL: ${JSON.stringify(PROJECTS_PLURAL) || '"check envs"'},
MARKETPLACE_PLURAL: ${JSON.stringify(MARKETPLACE_PLURAL) || '"check envs"'},
MARKETPLACE_KIND: ${JSON.stringify(MARKETPLACE_KIND) || '"check envs"'},
INSTANCES_API_GROUP: ${JSON.stringify(INSTANCES_API_GROUP) || '"check envs"'},
INSTANCES_VERSION: ${JSON.stringify(INSTANCES_VERSION) || '"check envs"'},
INSTANCES_RESOURCE_NAME: ${JSON.stringify(INSTANCES_RESOURCE_NAME) || '"check envs"'},
INSTANCES_API_VERSION: ${JSON.stringify(INSTANCES_API_VERSION) || '"check envs"'},
INSTANCES_PLURAL: ${JSON.stringify(INSTANCES_PLURAL) || '"check envs"'},
NODE_TERMINAL_DEFAULT_PROFILE: ${JSON.stringify(NODE_TERMINAL_DEFAULT_PROFILE) || '"general"'},
LOGIN_URL: ${JSON.stringify(LOGIN_URL) || '"check envs"'},
LOGOUT_URL: ${JSON.stringify(LOGOUT_URL) || '"check envs"'},