云容器实例 CCI-使用镜像快照:自动匹配

时间:2024-11-05 11:16:29

自动匹配

创建CCI实例时,可以通过注解中添加以下键值来开启自动匹配镜像快照。

名称

示例值

描述

cci.io/image-snapshot-auto-match

"true"

设置是否开启自动匹配镜像快照。

以创建Deployment为例:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment-test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis
  template:
    metadata:
      labels:
        app: redis
      annotations:
        cci.io/image-snapshot-auto-match: "true"
    spec:
      containers:
        - image: redis
          name: container-0
          resources:
            limits:
              cpu: 500m
              memory: 1024Mi
            requests:
              cpu: 500m
              memory: 1024Mi
      imagePullSecrets:
        - name: imagepull-secret
support.huaweicloud.com/devg-cci/cci_05_1013.html