5.2. 将非受管组件用于依赖项
如果您有现有的组件,如 Postgres、Redis 或对象存储,则您要首先在 Quay 配置捆绑包(config.yaml)中配置它们,然后在 QuayRegistry 中引用捆绑包(作为 Kubernetes Secret),同时表示哪些组件是非受管状态。
注意
Quay 配置编辑器也可用于创建或修改现有配置捆绑包,并简化更新 Kubernetes Secret 的过程,特别是用于多项更改。当通过配置编辑器更改 Quay 配置并发送到 Operator 时,将更新 Quay 部署来反映新配置。
5.2.1. 使用现有的 Postgres 数据库 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
使用所需的数据库字段创建配置文件
config.yaml:config.yaml:
DB_URI: postgresql://test-quay-database:postgres@test-quay-database:5432/test-quay-database
DB_URI: postgresql://test-quay-database:postgres@test-quay-database:5432/test-quay-databaseCopy to Clipboard Copied! Toggle word wrap Toggle overflow 使用配置文件创建 Secret:
kubectl create secret generic --from-file config.yaml=./config.yaml config-bundle-secret
$ kubectl create secret generic --from-file config.yaml=./config.yaml config-bundle-secretCopy to Clipboard Copied! Toggle word wrap Toggle overflow 创建 QuayRegistry YAML 文件
quayregistry.yaml,将postgres组件标记为非受管状态,并引用所创建的 Secret:quayregistry.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 按照以下部分所述部署 registry。