1.3. 订阅报告
订阅报告是来自您的所有受管集群的应用程序状态集合。具体来说,父应用程序资源可以从可扩展的受管集群保存报告。
弃用: 应用程序订阅,以及使用应用程序订阅的所有进程都已弃用。有关更新的功能,请参阅 GitOps 概述。
受管集群的详细应用程序状态可用,而 hub 集群上的 subscriptionReports 则轻便且更具扩展性。请参阅以下三种类型的子状态报告:
-
软件包级的
SubscriptionStatus:这是受管集群上的应用程序软件包状态,且应用程序在appsub命名空间中部署的所有资源的详细状态。 -
集群级
SubscriptionReport:这是与特定集群部署的所有应用程序的整体状态报告。 应用程序级
SubscriptionReport:这是部署特定应用程序的所有受管集群的总体状态报告。
1.3.1. SubscriptionStatus 软件包级别 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
软件包级别的受管集群状态位于受管集群上的 <namespace:<your-appsub-namespace> 中,其中包含应用程序部署的所有资源的详细状态。对于部署到受管集群的每个 appsub,在受管集群的 appsub 命名空间中创建了 SubscriptionStatus CR。如果存在错误,则会报告每个资源,并带有详细错误。
软件包状态仅指示单个软件包的状态。您可以通过引用字段 .status.subscription 来查看整个订阅状态。
请参阅以下 SubscriptionStatus 示例 YAML 文件:
apiVersion: apps.open-cluster-management.io/v1alpha1
kind: SubscriptionStatus
metadata:
labels:
apps.open-cluster-management.io/cluster: <your-managed-cluster>
apps.open-cluster-management.io/hosting-subscription: <your-appsub-namespace>.<your-appsub-name>
name: <your-appsub-name>
namespace: <your-appsub-namespace>
statuses:
packages:
- apiVersion: v1
kind: Service
lastUpdateTime: "2021-09-13T20:12:34Z"
Message: <detailed error. visible only if the package fails>
name: frontend
namespace: test-ns-2
phase: Deployed
- apiVersion: apps/v1
kind: Deployment
lastUpdateTime: "2021-09-13T20:12:34Z"
name: frontend
namespace: test-ns-2
phase: Deployed
- apiVersion: v1
kind: Service
lastUpdateTime: "2021-09-13T20:12:34Z"
name: redis-master
namespace: test-ns-2
phase: Deployed
- apiVersion: apps/v1
kind: Deployment
lastUpdateTime: "2021-09-13T20:12:34Z"
name: redis-master
namespace: test-ns-2
phase: Deployed
- apiVersion: v1
kind: Service
lastUpdateTime: "2021-09-13T20:12:34Z"
name: redis-slave
namespace: test-ns-2
phase: Deployed
- apiVersion: apps/v1
kind: Deployment
lastUpdateTime: "2021-09-13T20:12:34Z"
name: redis-slave
namespace: test-ns-2
phase: Deployed
subscription:
lastUpdateTime: "2021-09-13T20:12:34Z"
phase: Deployed