3.2. Quay 组件
Quay 是一个强大的容器 registry 平台,因此,需要大量依赖项。这包括数据库、对象存储、Redis 等。Quay Operator 管理 Quay 及其对 Kubernetes 的依赖部署。这些依赖项被视为 组件,并通过 QuayRegistry API 配置。
在 QuayRegistry 自定义资源中,spec.components 字段配置组件。每个组件包含两个字段: kind - 组件的名称,以及组件生命周期是否由 Operator 处理的 - 布尔值。默认情况下(忽略此字段),管理所有组件并在协调后自动填充,以了解可见性:
spec:
components:
- managed: true
kind: clair
- managed: true
kind: postgres
- managed: true
kind: objectstorage
- managed: true
kind: redis
- managed: true
kind: horizontalpodautoscaler
- managed: true
kind: route
- managed: true
kind: mirror
- managed: true
kind: monitoring
除非 QuayRegistry 自定义资源另有指定,否则 Operator 将对以下受管组件使用默认值:
-
postgres存储 registry 元数据。使用 Software Collections 中的 Postgres 10 版本。 -
redisHandles Quay 构建器协调和一些内部日志记录。 -
Objectstorage存储镜像层 blob。利用由 Noobaa/RHOCS 提供的ObjectBucketClaimKubernetes API。 -
Clair提供镜像漏洞扫描。 -
HorizontalPodAutoscaler根据内存/cpu 消耗调整 Quay pod 的数量。 -
镜像配置
存储库镜像worker (支持可选存储库镜像)。 -
从 OpenShift 外部向 Quay registry 提供外部入口点。
-
监控功能包括 Grafana 仪表板、访问单个指标和警报,用于通知经常重启 Quay pod。