mirror of
https://github.com/beclab/Olares
synced 2026-05-24 09:18:23 +00:00
update change for 0.10.0
This commit is contained in:
parent
2901fcfd24
commit
ff30a31748
2 changed files with 336 additions and 152 deletions
|
|
@ -7,15 +7,23 @@ outline: [2, 3]
|
|||
Every **Olares Application Chart** should include a `OlaresManifest.yaml` file in the root directory. `OlaresManifest.yaml` provides all the essential information about an Olares App. Both the **Olares Market protocol** and the Olares depend on this information to distribute and install applications.
|
||||
|
||||
:::info NOTE
|
||||
Latest Olares Manifest version: `0.9.0`
|
||||
Latest Olares Manifest version: `0.10.0`
|
||||
- Modified the `categories` field
|
||||
- Added `provider` field in the Permission section
|
||||
- Added Provider section, to allow apps to expose specific service interfaces within the cluster
|
||||
- Removed some deprecated field from the Spec section
|
||||
- Removed some deprecated field from the Option section
|
||||
- Added the `allowMultipleInstall` field, allowing the app to be installed as multiple independent instances
|
||||
- Added Envs section, to define environment variables required by the application
|
||||
:::
|
||||
:::details Changelog
|
||||
`0.9.0`
|
||||
- Added a `conflict` field in `options` to declare incompatible applications
|
||||
- Removed `analytics` field in `options`
|
||||
- Modified the format of the `tailscale` section
|
||||
- Added a `allowedOutboundPorts` field to allow non-http protocol external access through the specified port
|
||||
- Modified the format of the `ports` section
|
||||
|
||||
:::
|
||||
:::details Changelog
|
||||
`0.8.3`
|
||||
- Add a `mandatory` field in the `dependencies` section for dependent applications required for the installation
|
||||
- Add `tailscaleAcls` section to permit applications to open specified ports via Tailscale
|
||||
|
|
@ -36,7 +44,7 @@ Here's an example of what a `OlaresManifest.yaml` file might look like:
|
|||
::: details OlaresManifest.yaml Example
|
||||
|
||||
```Yaml
|
||||
olaresManifest.version: '0.8.0'
|
||||
olaresManifest.version: '0.10.0'
|
||||
olaresManifest.type: app
|
||||
metadata:
|
||||
name: helloworld
|
||||
|
|
@ -101,10 +109,8 @@ options:
|
|||
Olares currently supports 3 types of applications, each requiring different fields. This document uses `app` as an example to explain each field. For information on other types, please refer to the corresponding configuration guide.
|
||||
- [Recommend Configuration Guide](recommend.md)
|
||||
|
||||
:::info Example
|
||||
```Yaml
|
||||
olaresManifest.type: app
|
||||
```
|
||||
:::info NOTE
|
||||
`recommend` apps will not be listed in the Olares Market, but you can install recommendation algorithms for Wise by uploading a custom Chart.
|
||||
:::
|
||||
|
||||
## olaresManifest.version
|
||||
|
|
@ -179,10 +185,27 @@ The **Chart Version** of the application. It should be incremented each time the
|
|||
### categories
|
||||
|
||||
- Type: `list<string>`
|
||||
- Accepted Value: `Blockchain`, `Utilities`, `Social Network`, `Entertainment`, `Productivity`
|
||||
|
||||
Used to display your app on different category page in Olares Market.
|
||||
|
||||
Accepted Value for OS 1.11:
|
||||
|
||||
`Blockchain`, `Utilities`, `Social Network`, `Entertainment`, `Productivity`
|
||||
|
||||
Accepted Value for OS 1.12:
|
||||
- `Creativity`
|
||||
- `Productivity_v112` displayed as Productivity
|
||||
- `Developer Tools`
|
||||
- `Fun`
|
||||
- `Lifestyle`
|
||||
- `Utilities_v112` displayed as Utilities
|
||||
- `AI`
|
||||
|
||||
|
||||
:::info NOTE
|
||||
Olares Market categories were updated in OS 1.12.0. To ensure your app is compatible with both versions 1.11 and 1.12, include category values for both versions in your configuration.
|
||||
:::
|
||||
|
||||
## Entrances
|
||||
|
||||
The number of entrances through which to access the app. You must specify at least 1 access method, with a maximum of 10 allowed.
|
||||
|
|
@ -316,7 +339,8 @@ ports:
|
|||
|
||||
Olares will expose the ports you specify for an application, which are accessible via the application domain name in the local network, for example: `84864c1f.your_olares_id.olares.com:46879`. For each port you expose, Olares configures both TCP and UDP with the same port number.
|
||||
|
||||
When the `addToTailscaleAcl` field is set to `true`, the port will be automatically added to the Tailscale's ACL, and there is no need to configure in the tailscale section.
|
||||
When the `addToTailscaleAcl` field is set to `true`, the system will automatically assign a random port and add it to the Tailscale ACLs.
|
||||
|
||||
|
||||
:::info NOTE
|
||||
The exposed ports can only be accessed on the local network or through a VPN.
|
||||
|
|
@ -330,15 +354,7 @@ permission:
|
|||
appCache: true
|
||||
appData: true
|
||||
userData:
|
||||
- /Home/
|
||||
sysData:
|
||||
- dataType: legacy_prowlarr
|
||||
appName: prowlarr
|
||||
port: 9696
|
||||
group: api.prowlarr
|
||||
version: v2
|
||||
ops:
|
||||
- All
|
||||
- /Home/
|
||||
```
|
||||
:::
|
||||
|
||||
|
|
@ -370,6 +386,10 @@ Whether the app requires read and write permission to user's `Home` folder. List
|
|||
|
||||
Declare the list of APIs that this app needs to access.
|
||||
|
||||
:::info NOTE
|
||||
This configuration has been deprecated since version 1.12.0.
|
||||
:::
|
||||
|
||||
:::info Example
|
||||
```Yaml
|
||||
sysData:
|
||||
|
|
@ -404,6 +424,38 @@ All system API [providers](../advanced/provider.md) are list below:
|
|||
| secret.infisical | v1 | secret | CreateSecret, RetrieveSecret
|
||||
| secret.vault | v1 | key | List, Info, Sign
|
||||
|
||||
### provider
|
||||
|
||||
- Type: `list<map>`
|
||||
- Optional
|
||||
|
||||
Use this field to declare APIs from other applications that your app needs to access. The target application must have exposed a `providerName` in its own `provider` section (refer to the Provider section below).
|
||||
|
||||
Set the `appName` field to the `name` of the target application, and the `providerName` field to match the `name` specified in the target app’s provider configuration. You can optionally use the `podSelectors` field to specify which pods in your app should have access. If this field is omitted, all pods in your app will be injected with the `outbound envoy sidecar` to enable access.
|
||||
|
||||
:::info Example for calling app
|
||||
```Yaml
|
||||
# App requiring provider, e.g. sonarr
|
||||
permission:
|
||||
provider:
|
||||
- appName: bazarr
|
||||
providerName: bazarr-svc
|
||||
podSelectors:
|
||||
- matchLabels:
|
||||
io.kompose.service: api
|
||||
```
|
||||
:::
|
||||
:::info Example for provider app
|
||||
```Yaml
|
||||
# Provider app, e.g. bazarr
|
||||
provider:
|
||||
- name: bazarr-svc
|
||||
entrance: bazarr-svc
|
||||
paths: ["/*"]
|
||||
verbs: ["*"]
|
||||
```
|
||||
:::
|
||||
|
||||
## Tailscale
|
||||
- Type: `map`
|
||||
- Optional
|
||||
|
|
@ -429,9 +481,6 @@ Additional information about the application, primarily used for display in the
|
|||
:::info Example
|
||||
```Yaml
|
||||
spec:
|
||||
namespace: os-system
|
||||
# optional. Install the app to a specified namespace, e.g. os-system, user-space, user-system
|
||||
|
||||
versionName: '10.8.11'
|
||||
# The version of the application that this chart contains. It is recommended to enclose the version number in quotes. This value corresponds to the appVersion field in the `Chart.yaml` file. Note that it is not related to the `version` field.
|
||||
|
||||
|
|
@ -557,6 +606,10 @@ The Olares provides highly available middleware services. Developers do not need
|
|||
|
||||
Use the `scripts` field to specify scripts that should be executed after the database is created. Additionally, use the `extension` field to add the corresponding extension in the database.
|
||||
|
||||
:::info NOTE
|
||||
MongoDB, MySQL, MariaDB, MinIO, and RabbitMQ must first be installed by an admin from the Market before they can be used by other applications.
|
||||
:::
|
||||
|
||||
:::info Example
|
||||
```Yaml
|
||||
middleware:
|
||||
|
|
@ -695,54 +748,6 @@ options:
|
|||
```
|
||||
:::
|
||||
|
||||
### websocket
|
||||
- Type: `map`
|
||||
- Optional
|
||||
|
||||
Enable websocket for the app. Refer to [websocket](../advanced/websocket.md) for more information.
|
||||
|
||||
:::info Example
|
||||
```yaml
|
||||
options:
|
||||
websocket:
|
||||
url: /ws/message
|
||||
port: 8888
|
||||
```
|
||||
:::
|
||||
|
||||
### resetCookie
|
||||
- Type: `map`
|
||||
- Optional
|
||||
|
||||
If the app requires cookies, please enable this feature. Refer to [cookie](../advanced/cookie.md) for more information.
|
||||
|
||||
:::info Example
|
||||
```yaml
|
||||
options:
|
||||
resetCookie:
|
||||
enabled: true
|
||||
```
|
||||
:::
|
||||
|
||||
### upload
|
||||
- Type: `map`
|
||||
- Optional
|
||||
|
||||
The Olares Application Runtime includes a built-in file upload component designed to simplify the file upload process in your application. Refer to [upload](../advanced/file-upload.md) for more information.
|
||||
|
||||
:::info Example
|
||||
```yaml
|
||||
upload:
|
||||
# The types of files that are allowed to be uploaded, * stands for any type, The type of the uploaded file must be in the list.
|
||||
fileType:
|
||||
- pdf
|
||||
# The path of 'dest' must be a mountPath
|
||||
dest: /appdata
|
||||
# The maximum size of file, in bytes
|
||||
limitedSize: 3729747942
|
||||
```
|
||||
:::
|
||||
|
||||
### mobileSupported
|
||||
- Type: `boolean`
|
||||
- Default: `false`
|
||||
|
|
@ -803,4 +808,90 @@ allowedOutboundPorts:
|
|||
- 465
|
||||
- 587
|
||||
```
|
||||
:::
|
||||
:::
|
||||
|
||||
### allowMultipleInstall
|
||||
- Type: `boolean`
|
||||
- Default: `false`
|
||||
- Optional
|
||||
|
||||
This application supports deploying multiple independent instances within the same Olares cluster. This setting does not apply to paid applications or clients of shared applications.
|
||||
|
||||
## Envs
|
||||
|
||||
Declare the environment variables required for your application to run here. You can allow users to manually enter these values or reference existing system environment variables directly.
|
||||
|
||||
:::info NOTE
|
||||
This configuration requires Olares OS version 1.12.2 or higher to take effect.
|
||||
:::
|
||||
|
||||
:::info Example
|
||||
```yaml
|
||||
envs:
|
||||
- envName: ENV_NAME
|
||||
# This is the key that will be injected as .Values.olaresEnv.ENV_NAME during deployment.
|
||||
|
||||
required: true
|
||||
# Specifies whether a value is required for installation. If set to true and no default is provided, users must input a value, and the value cannot be deleted.
|
||||
|
||||
default: "DEFAULT"
|
||||
# The default value of the environment variable; set by the developer and not editable by users
|
||||
|
||||
type: string
|
||||
# The data type of the environment variable. Supported types: int, bool, url, ip, domain, email, string, password. If specified, system will validate user input accordingly.
|
||||
|
||||
editable: true
|
||||
# Specifies whether the environment variable can be edited after the application is deployed.
|
||||
|
||||
options:
|
||||
- title: Windows11
|
||||
value: "11"
|
||||
- title: Windows10
|
||||
value: "10"
|
||||
# List of allowed values. Users can only select value from these options.
|
||||
# "title" is a user-friendly label, while "value" is what's actually set in the system.
|
||||
|
||||
remoteOptions: https://xxx.xxx/xx
|
||||
# URL providing a list of accepted options. The response body should be a JSON-encoded options list.
|
||||
|
||||
regex: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
|
||||
# The value must match this regular expression.
|
||||
|
||||
valueFrom:
|
||||
envName: OLARES_SYSTEM_CLUSTER_DNS_SERVICE
|
||||
# Reference the value from a system environment variable. when referenced, manual input is disallowed.
|
||||
# Any fields (type, editable, etc.) in this env will be overrided by referenced variable's attributes; default/value fields are ignored.
|
||||
|
||||
applyOnChange: true
|
||||
# Whether to automatically redeploy the app when this variable changes. If false, changes take effect only on upgrade/reinstallation, not on restart.
|
||||
|
||||
description: "DESCRIPTION"
|
||||
# Description of this environment variable.
|
||||
```
|
||||
:::
|
||||
|
||||
To use the values of environment variables in your deployment YAML file, simply use `.Values.olaresEnv.ENV_NAME` in the appropriate place. The system will automatically inject the olaresEnv variables into the Values.yaml during deployment. For example:
|
||||
:::info deployment.yaml
|
||||
```yaml
|
||||
BACKEND_MAIL_HOST: "{{ .Values.olaresEnv.MAIL_HOST }}"
|
||||
BACKEND_MAIL_PORT: "{{ .Values.olaresEnv.MAIL_PORT }}"
|
||||
BACKEND_MAIL_AUTH_USER: "{{ .Values.olaresEnv.MAIL_AUTH_USER }}"
|
||||
BACKEND_MAIL_AUTH_PASS: "{{ .Values.olaresEnv.MAIL_AUTH_PASS }}"
|
||||
BACKEND_MAIL_SECURE: "{{ .Values.olaresEnv.MAIL_SECURE }}"
|
||||
BACKEND_MAIL_SENDER: "{{ .Values.olaresEnv.MAIL_SENDER }}"
|
||||
```
|
||||
:::
|
||||
|
||||
## Provider
|
||||
|
||||
Declare the interfaces that this application exposes to other applications here. The system will automatically generate a Service for each declared interface, enabling other applications within the cluster to access them through the internal network. If another application needs to access these interfaces, it must first request permission for the specific provider in the permissions section.
|
||||
|
||||
:::info Example
|
||||
```yaml
|
||||
provider:
|
||||
- name: bazarr
|
||||
entrance: bazarr-svc # The entry name of the service
|
||||
paths: ["/api*"] # API paths to expose; cannot consist of * only
|
||||
verbs: ["*"] # Supported: post, get, put, delete, patch; "*" allows all methods
|
||||
```
|
||||
:::
|
||||
|
|
@ -7,15 +7,23 @@ outline: [2, 3]
|
|||
每一个 Olares 应用的 Chart 根目录下都必须有一个名为 `OlaresManifest.yaml` 的文件。`OlaresManifest.yaml` 描述了一个 Olares 应用的所有基本信息。Olares 应用市场协议和 Olares 系统依赖这些关键信息来正确分发和安装应用。
|
||||
|
||||
:::info 提示
|
||||
最新的 Olares 系统使用的 Manifest 版本为: `0.9.0`
|
||||
最新的 Olares 系统使用的 Manifest 版本为: `0.10.0`
|
||||
- 修改 `categories` 分类
|
||||
- 增加 Permission 部分中 `provider` 权限的申请
|
||||
- 增加 Provider 部分,用于让应用对集群内暴露指定服务接口
|
||||
- 移除 Spec 部分已不支持的一些配置项
|
||||
- 移除 Option 部分已不支持的一些配置项
|
||||
- 增加 `allowMultipleInstall` 配置,允许应用克隆出多个独立的实例
|
||||
- 增加 Envs 部分,支持应用声明需要的环境变量
|
||||
:::
|
||||
:::details Changelog
|
||||
`0.9.0`
|
||||
- 在 `options` 中增加 `conflict` 字段, 用于声明不兼容的应用
|
||||
- 移除 `options` 中 `analytics` 配置项
|
||||
- 修改 `tailscale` 字段的配置格式
|
||||
- 增加 `allowedOutboundPorts` 配置,允许通过指定端口进行非 HTTP 协议的对外访问
|
||||
- 修改 `ports` 部分的配置
|
||||
|
||||
:::
|
||||
:::details Changelog
|
||||
`0.8.3`
|
||||
- 在 `dependencies` 配置项里增加 `mandatory` 字段以表示该依赖应用必须安装。
|
||||
- 增加 `tailscaleAcls` 配置项,允许 Tailscale 为应用开放指定端口
|
||||
|
|
@ -36,7 +44,7 @@ outline: [2, 3]
|
|||
::: details `OlaresManifest.yaml` 示例
|
||||
|
||||
```Yaml
|
||||
olaresManifest.version: '0.8.0'
|
||||
olaresManifest.version: '0.10.0'
|
||||
olaresManifest.type: app
|
||||
metadata:
|
||||
name: helloworld
|
||||
|
|
@ -101,10 +109,8 @@ options:
|
|||
Olares 市场目前支持 3 种类型的应用,各自对应不同场景。本文档以 “app” 为例来解释各个字段。其他类型请参考相应的配置指南。
|
||||
- [推荐算法配置指南](recommend.md)
|
||||
|
||||
:::info 示例
|
||||
```Yaml
|
||||
olaresManifest.type: app
|
||||
```
|
||||
:::info 提示
|
||||
Olares Market目前不展示 `recommend` 类型的应用,但你可以上传自定义 Chart 来给Wise安装推荐算法
|
||||
:::
|
||||
|
||||
## olaresManifest.version
|
||||
|
|
@ -179,9 +185,26 @@ Olares 应用市场中的应用名称下方显示的简短说明。
|
|||
### categories
|
||||
|
||||
- 类型: `list<string>`
|
||||
- 有效值: `Blockchain`、`Utilities`、`Social Network`、`Entertainment`、`Productivity`
|
||||
|
||||
在应用市场的哪个类别下展示应用。
|
||||
描述在应用市场的哪个类别下展示应用。
|
||||
|
||||
OS 1.11 有效值:
|
||||
- `Blockchain`, `Utilities`, `Social Network`, `Entertainment`, `Productivity`
|
||||
|
||||
OS 1.12 有效值:
|
||||
- `Creativity`:设计创作
|
||||
- `Productivity_v112`:工作效率
|
||||
- `Developer Tools`:开发工具
|
||||
- `Fun`:休闲娱乐
|
||||
- `Lifestyle`:生活方式
|
||||
- `Utilities_v112`:实用工具
|
||||
- `AI`:AI
|
||||
|
||||
|
||||
|
||||
:::info 提示
|
||||
Olares OS 1.12.0 版本对应用商店的应用分类进行了调整,因此如果应用需要同时兼容 1.11 和 1.12 版本,请同时填写两个版本所需的分类。
|
||||
:::
|
||||
|
||||
## Entrances
|
||||
|
||||
|
|
@ -316,8 +339,7 @@ ports:
|
|||
|
||||
Olares 会为你的应用暴露指定的端口,这些端口可通过应用域名在本地网络下访问,如`84864c1f.your_olares_id.olares.com:46879`。对于每个公开的端口,Olares 会自动配置相同端口号的 TCP 和 UDP。
|
||||
|
||||
当设置 `addToTailscaleAcl` 字段为 `true`时,该端口会自动增加tailscale acl中,无需再去tailscale部分配置
|
||||
|
||||
当将 `addToTailscaleAcl` 字段设置为 `true` 时,系统会为该端口分配一个随机端口,并自动将其加入到 Tailscale 的 ACL 中。
|
||||
|
||||
:::info 提示
|
||||
暴露的端口只能通过本地网络或 Olares 专用网络访问。
|
||||
|
|
@ -333,14 +355,6 @@ permission:
|
|||
appData: true
|
||||
userData:
|
||||
- /Home/
|
||||
sysData:
|
||||
- dataType: legacy_prowlarr
|
||||
appName: prowlarr
|
||||
port: 9696
|
||||
group: api.prowlarr
|
||||
version: v2
|
||||
ops:
|
||||
- All
|
||||
```
|
||||
:::
|
||||
|
||||
|
|
@ -372,6 +386,10 @@ permission:
|
|||
|
||||
声明该应用程序需要访问的 API 列表。
|
||||
|
||||
:::info 提示
|
||||
从 1.12.0 版本开始,该权限配置已经被废弃。
|
||||
:::
|
||||
|
||||
:::info 示例
|
||||
```Yaml
|
||||
sysData:
|
||||
|
|
@ -406,6 +424,39 @@ permission:
|
|||
| secret.infisical | v1 | secret | CreateSecret, RetrieveSecret
|
||||
| secret.vault | v1 | key | List, Info, Sign
|
||||
|
||||
### provider
|
||||
|
||||
- 类型:`list<map>`
|
||||
- 可选
|
||||
|
||||
用于声明本应用需访问的其他应用接口。被访问的应用需在其 `provider` 部分声明对外开放的 `providerName`,详见下方 Provider 章节。
|
||||
|
||||
此处 `appName` 应填写目标应用的 `name`,`providerName` 填写目标应用 `provider` 配置中的 `name` 字段。`podSelectors` 字段用于指定本应用中哪些 pod 需要访问目标应用。如果未声明此字段,则默认为本应用的所有 pod 注入 `outbound envoy sidecar`。
|
||||
|
||||
:::info 调用应用示例
|
||||
```Yaml
|
||||
# 需要调用其他应用的应用,如 sonarr
|
||||
permission:
|
||||
provider:
|
||||
- appName: bazarr
|
||||
providerName: bazarr-svc
|
||||
podSelectors:
|
||||
- matchLabels:
|
||||
io.kompose.service: api
|
||||
```
|
||||
:::
|
||||
:::info 被调用应用示例
|
||||
```Yaml
|
||||
# 被调用方应用,如 bazarr
|
||||
provider:
|
||||
- name: bazarr-svc
|
||||
entrance: bazarr-svc
|
||||
paths: ["/*"]
|
||||
verbs: ["*"]
|
||||
```
|
||||
:::
|
||||
|
||||
|
||||
## Tailscale
|
||||
- 类型:`map`
|
||||
- 可选
|
||||
|
|
@ -431,11 +482,8 @@ tailscale:
|
|||
:::info 示例
|
||||
```Yaml
|
||||
spec:
|
||||
namespace: os-system
|
||||
# 可选。将应用安装到指定的命名空间,如 os-system、user-space 和 user-system
|
||||
|
||||
versionName: '10.8.11'
|
||||
## 此 Chart 包含的应用程序的版本。建议将版本号括在引号中。该值对应于 Chart.yaml 文件中的 appVersion 字段。请注意,它与 version 字段无关。
|
||||
# 此 Chart 包含的应用程序的版本。建议将版本号括在引号中。该值对应于 Chart.yaml 文件中的 appVersion 字段。请注意,它与 version 字段无关。
|
||||
|
||||
featuredImage: https://app.cdn.olares.com/appstore/jellyfin/promote_image_1.jpg
|
||||
# 当应用在应用市场上推荐时,会显示特色图像。
|
||||
|
|
@ -559,6 +607,10 @@ Olares 目前不支持混合架构的集群。
|
|||
|
||||
使用 `scripts` 字段指定创建数据库后应执行的脚本。此外,使用 `extension` 字段在数据库中添加相应的扩展名。
|
||||
|
||||
:::info 提示
|
||||
MongoDB,MySQL,MariaDB,MinIO,RabbitMQ需要管理员从 Market 安装后才能被其他应用使用
|
||||
:::
|
||||
|
||||
:::info 示例
|
||||
```Yaml
|
||||
middleware:
|
||||
|
|
@ -647,7 +699,7 @@ options:
|
|||
是否为 Olares 集群中的所有用户安装此应用程序。
|
||||
|
||||
:::info 服务端示例
|
||||
```yaml
|
||||
```Yaml
|
||||
metadata:
|
||||
name: gitlab
|
||||
options:
|
||||
|
|
@ -660,7 +712,7 @@ options:
|
|||
:::
|
||||
|
||||
:::info 客户端示例
|
||||
```yaml
|
||||
```Yaml
|
||||
metadata:
|
||||
name: gitlabclienta
|
||||
options:
|
||||
|
|
@ -683,7 +735,7 @@ options:
|
|||
如果此应用程序需要依赖其他应用程序才能正确安装,则应将 `mandatory` 字段设置为 `true`。
|
||||
|
||||
:::info 示例
|
||||
```yaml
|
||||
```Yaml
|
||||
options:
|
||||
dependencies:
|
||||
- name: olares
|
||||
|
|
@ -696,54 +748,6 @@ options:
|
|||
```
|
||||
:::
|
||||
|
||||
### websocket
|
||||
- 类型:`map`
|
||||
- 可选
|
||||
|
||||
为应用启用 websocket。请参阅 [websocket](../advanced/websocket.md) 了解更多信息。
|
||||
|
||||
:::info 示例
|
||||
```yaml
|
||||
options:
|
||||
websocket:
|
||||
url: /ws/message
|
||||
port: 8888
|
||||
```
|
||||
:::
|
||||
|
||||
### resetCookie
|
||||
- 类型:`map`
|
||||
- 可选
|
||||
|
||||
如果应用需要 cookie,请启用此功能。更多信息请参考 [cookie](../advanced/cookie.md)。
|
||||
|
||||
:::info 示例
|
||||
```yaml
|
||||
options:
|
||||
resetCookie:
|
||||
enabled: true
|
||||
```
|
||||
:::
|
||||
|
||||
### upload
|
||||
- 类型: `map`
|
||||
- 可选
|
||||
|
||||
Olares 应用运行时包含一个内置文件上传组件,旨在简化应用程序中的文件上传过程。请参阅 [上传](../advanced/file-upload.md) 了解更多信息。
|
||||
|
||||
:::info Example
|
||||
```yaml
|
||||
upload:
|
||||
# 允许上传的文件类型,*为任意类型, 上传时会指定 file_type,必须在允许的文件类型中
|
||||
fileType:
|
||||
- pdf
|
||||
# dest 的路径必须为某一个 mountPath
|
||||
dest: /appdata
|
||||
# 文件上传的最大大小,单位为字节
|
||||
limitedSize: 3729747942
|
||||
```
|
||||
:::
|
||||
|
||||
### mobileSupported
|
||||
- 类型: `boolean`
|
||||
- 默认值: `false`
|
||||
|
|
@ -752,7 +756,7 @@ upload:
|
|||
确定应用是否与移动网络浏览器兼容并且可以在移动版本的 Olares 桌面上显示。如果应用程序针对移动网络浏览器进行了优化,请启用此选项。这将使该应用程序在移动版 Olares 桌面上可见并可访问。
|
||||
|
||||
:::info 示例
|
||||
```yaml
|
||||
```Yaml
|
||||
mobileSupported: true
|
||||
```
|
||||
:::
|
||||
|
|
@ -762,7 +766,7 @@ mobileSupported: true
|
|||
- 可选
|
||||
|
||||
Olares 包含内置的 OpenID Connect 身份验证组件,以简化用户的身份验证。启用此选项可在你的应用中使用 OpenID。
|
||||
```yaml
|
||||
```Yaml
|
||||
# yaml 中 OpenID 相关变量
|
||||
{{ .Values.oidc.client.id }}
|
||||
{{ .Values.oidc.client.secret }}
|
||||
|
|
@ -770,7 +774,7 @@ Olares 包含内置的 OpenID Connect 身份验证组件,以简化用户的身
|
|||
```
|
||||
|
||||
:::info 示例
|
||||
```yaml
|
||||
```Yaml
|
||||
oidc:
|
||||
enabled: true
|
||||
redirectUri: /path/to/uri
|
||||
|
|
@ -785,7 +789,7 @@ oidc:
|
|||
指定 API 提供程序的超时限制(以秒为单位)。默认值为 `15`。使用 `0` 允许无限制的 API 连接。
|
||||
|
||||
:::info 示例
|
||||
```yaml
|
||||
```Yaml
|
||||
apiTimeout: 0
|
||||
```
|
||||
:::
|
||||
|
|
@ -797,9 +801,98 @@ apiTimeout: 0
|
|||
要求开通以下端口进行非 HTTP 协议的对外访问,例如 SMTP 服务等。
|
||||
|
||||
:::info 示例
|
||||
```yaml
|
||||
```Yaml
|
||||
allowedOutboundPorts:
|
||||
- 465
|
||||
- 587
|
||||
```
|
||||
:::
|
||||
:::
|
||||
|
||||
### allowMultipleInstall
|
||||
- 类型: `boolean`
|
||||
- 默认值: `false`
|
||||
- 可选
|
||||
|
||||
该应用支持在同一 Olares 集群中部署多个独立实例。此设置对付费应用和共享应用客户端无效。
|
||||
|
||||
## Envs
|
||||
|
||||
在此声明应用运行所需的环境变量,既支持用户手动输入,也可以直接引用已有的系统环境变量值。
|
||||
|
||||
:::info 提示
|
||||
该配置需要 Olares OS 版本在 1.12.2 以上才生效
|
||||
:::
|
||||
|
||||
:::info 示例
|
||||
```Yaml
|
||||
envs:
|
||||
- envName: ENV_NAME
|
||||
# 在部署应用时,注入的value的key,最终注入为.Values.olaresEnv.ENV_NAME
|
||||
|
||||
required: true
|
||||
# 是否安装必须有值,若必填,则:若开发者未设置default,用户安装应用时必须提供,且修改value时不允许清空
|
||||
|
||||
default: "DEFAULT"
|
||||
# 环境变量的默认值,开发者可在编写时提供,用户不可修改。
|
||||
|
||||
type: string
|
||||
# 环境变量的类型,目前有int/bool/url/ip/domain/email/string/password。如果声明,会对value进行类型校验
|
||||
|
||||
editable: true
|
||||
# 是否可在应用部署后编辑
|
||||
|
||||
options:
|
||||
- title: Windows11
|
||||
value: "11"
|
||||
- title: Windows10
|
||||
value: "10"
|
||||
# 允许值列表,此环境变量的值只允许从该列表中选择
|
||||
# title表示展示给用户的描述,value是实际提供给系统的值
|
||||
|
||||
remoteOptions: https://xxx.xxx/xx
|
||||
# 提供允许值列表的一个url,response的body格式为JSON编码的options列表
|
||||
|
||||
regex: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
|
||||
# 该环境变量的值必须符合此正则表达式
|
||||
|
||||
valueFrom:
|
||||
envName: OLARES_SYSTEM_CLUSTER_DNS_SERVICE
|
||||
# 引用系统环境变量的值。如果采用该方式,将不允许用户手动指定/修改其value
|
||||
# 引用包含了带引用的环境变量的所有可声明字段(type,editable),应用环境变量里的同名属性会失效,default/value字段也会失效
|
||||
|
||||
applyOnChange: true
|
||||
# 是否在此环境变量的值变化时自动重新部署应用,使变化生效
|
||||
# 若该字段为false,在环境变量变化时,即使停止/启动应用,也不会生效,只有升级/重装会生效
|
||||
|
||||
description: "DESCRIPTION"
|
||||
# 对环境变量的描述
|
||||
```
|
||||
:::
|
||||
|
||||
如需在部署 YAML 文件中使用环境变量的值,只需在相应位置使用 `.Values.olaresEnv.ENV_NAME` 即可。系统会在应用部署时自动将对应的 olaresEnv 变量注入到 values 中。例如
|
||||
|
||||
:::info 示例
|
||||
```Yaml
|
||||
BACKEND_MAIL_HOST: "{{ .Values.olaresEnv.MAIL_HOST }}"
|
||||
BACKEND_MAIL_PORT: "{{ .Values.olaresEnv.MAIL_PORT }}"
|
||||
BACKEND_MAIL_AUTH_USER: "{{ .Values.olaresEnv.MAIL_AUTH_USER }}"
|
||||
BACKEND_MAIL_AUTH_PASS: "{{ .Values.olaresEnv.MAIL_AUTH_PASS }}"
|
||||
BACKEND_MAIL_SECURE: "{{ .Values.olaresEnv.MAIL_SECURE }}"
|
||||
BACKEND_MAIL_SENDER: "{{ .Values.olaresEnv.MAIL_SENDER }}"
|
||||
```
|
||||
:::
|
||||
|
||||
## Provider
|
||||
|
||||
在此声明本应用向其他应用开放的接口。系统会自动为这些接口生成 Service,让集群内其他应用能够通过内部网络访问。如果其他应用要调用这些接口,需要在 permission 部分申请访问该 provider 的权限。
|
||||
|
||||
:::info 示例
|
||||
```Yaml
|
||||
provider:
|
||||
- name: bazarr
|
||||
entrance: bazarr-svc # 该服务的入口名称
|
||||
paths: ["/api*"] # 开放的接口路径,不能只包含通配符 *
|
||||
verbs: ["*"] # 支持post,get,put,delete,patch,"*"允许所有方法
|
||||
|
||||
```
|
||||
:::
|
||||
|
|
|
|||
Loading…
Reference in a new issue