demo

apiVersion: bursting.cci.io/v1
kind: ClusterExtensionProfile
metadata:
  name: test-cluster-profile
spec:
  actions:
    annotations:
      resource.cci.io/memory-burst-size: 'false'
      resource.cci.io/memory-reservation: 'true'
      resource.cci.io/resizing-large-size-instance-greater-than-32-cores: 'true'
      monitoring.cci.io/enable-pod-metrics: 'false'
      resource.cci.io/swap-size-in-GiB: '1'
      networking.cci.io/custom-dns-servers: '223.6.6.6'
      authority.cci.io/systemd-container-list: "*"
    labels:
      label1: value1
  namespaceLabels: {}
  policy: override
---
apiVersion: v1
kind: Pod
metadata:
  name: test-pod-hw-serverless-sysadmin-test
  annotations:
    resource.cci.io/extra-ephemeral-storage-in-GiB: "50"
#    cci.io/image-snapshot-specified-name: "imagesnapshot-001"
spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
          - matchExpressions:
              - key: type
                operator: In
                values:
                  - virtual-kubelet
  containers:
  - command:
    - /sbin/init
    image:  swr.cn-north-4.myhuaweicloud.com/testapp/mt_centos:online_java_240829_centos7_v1
    imagePullPolicy: Always
    securityContext:
      capabilities:
        add:
        - SYS_PTRACE
        - SYS_ADMIN
        - NET_ADMIN
        - NET_RAW
    name: app
    resources:
      requests:
        cpu: "2"
        memory: "4Gi"
      limits:
        cpu: "2"
        memory: "4Gi"
    volumeMounts:
    - mountPath: /docker
      name: hw-volume
  dnsConfig:
    searches:
    - mt
    - gh.sankuai.com
    - yf.sankuai.com
    - dx.sankuai.com
    - cq.sankuai.com
    - rz.sankuai.com
    options:
    - name: attempts
      value: "1"
    - name: timeout
      value: "1"
    - name: rotate
    - name: ndots
      value: "1"
  imagePullSecrets:
  - name: mt-idc-to-cci
  restartPolicy: Never
  tolerations:
    - effect: NoSchedule
      key: bursting.cci.io/no-schedule
      operator: Exists
    - effect: PreferNoSchedule
      key: virtual-kubelet.io/huawei
      operator: Exists
  volumes:
  - emptyDir: {}
    name: hw-volume

  

posted @ 2024-11-27 14:36  夜辰雪扬  阅读(7)  评论(0)    收藏  举报