3.3. 配置数据库
3.3.1. 使用现有的 Postgres 数据库
使用所需的数据库字段创建配置文件
config.yaml
:config.yaml:
DB_URI: postgresql://test-quay-database:postgres@test-quay-database:5432/test-quay-database
使用配置文件创建 Secret:
$ kubectl create secret generic --from-file config.yaml=./config.yaml config-bundle-secret
创建 QuayRegistry YAML 文件
quayregistry.yaml
,将postgres
组件标记为非受管状态,并引用所创建的 Secret:quayregistry.yaml
apiVersion: quay.redhat.com/v1 kind: QuayRegistry metadata: name: example-registry namespace: quay-enterprise spec: configBundleSecret: config-bundle-secret components: - kind: postgres managed: false
- 按照以下部分所述部署 registry。