1.4.11.4. 二级频道示例
如果存在镜像的频道(应用程序源存储库),您可以在订阅 YAML 中指定 secondaryChannel。当应用程序订阅无法使用主频道连接到仓库服务器时,它会使用二级频道连接到仓库服务器。确保存储在二级频道中的应用程序清单与主频道同步。请参阅以下使用 secondaryChannel 的订阅 YAML 示例。
apiVersion: apps.open-cluster-management.io/v1
kind: Subscription
metadata:
name: nginx
namespace: ns-sub-1
labels:
app: nginx-app-details
spec:
channel: ns-ch/predev-ch
secondaryChannel: ns-ch-2/predev-ch-2
name: nginx-ingress
1.4.11.4.1. 订阅时间窗示例 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
以下示例订阅包含多个配置的时间窗。每个周一、周三和周五的 10:20 AM 到 10:30 AM 之间有一个时间窗。一个时间窗也在每周、周三和周五的 12:40 PM 到 1:40 PM 之间发生。订阅只在这 6 个每周时间窗内开始部署。
apiVersion: apps.open-cluster-management.io/v1
kind: Subscription
metadata:
name: nginx
namespace: ns-sub-1
labels:
app: nginx-app-details
spec:
channel: ns-ch/predev-ch
name: nginx-ingress
packageFilter:
version: "1.36.x"
placement:
placementRef:
kind: PlacementRule
name: towhichcluster
timewindow:
windowtype: "active" #Enter active or blocked depending on the purpose of the type.
location: "America/Los_Angeles"
daysofweek: ["Monday", "Wednesday", "Friday"]
hours:
- start: "10:20AM"
end: "10:30AM"
- start: "12:40PM"
end: "1:40PM"