k8s模板model

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    creator: za-zhangyanhong001
    description: create from ship
    owner_name: 38732-za-dyw-uitesting-demo1111
  creationTimestamp: null
  labels:
    app: 38732-za-dyw-uitesting-demo1111
    app_id: "3807"
    appversion: 6d8642cc-1687859247-bkl5q
    base_name: za-dyw-uitesting-demo1111
    company_id: "79002"
    flow_id: 7ea20974557a
    prime_department_id: "1341011"
    project_id: "9"
    publish_version: v1-38732
    version: ww2z5
  name: 38732-za-dyw-uitesting-demo1111-ww2z5
  namespace: zainfo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: 38732-za-dyw-uitesting-demo1111
      version: ww2z5
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      annotations:
        creator: za-zhangyanhong001
        description: create from ship
        owner_name: 38732-za-dyw-uitesting-demo1111
      creationTimestamp: null
      labels:
        app: 38732-za-dyw-uitesting-demo1111
        app_id: "3807"
        appversion: 6d8642cc-1687859247-bkl5q
        base_name: za-dyw-uitesting-demo1111
        company_id: "79002"
        flow_id: 7ea20974557a
        prime_department_id: "1341011"
        project_id: "9"
        publish_version: v1-38732
        version: ww2z5
      name: 38732-za-dyw-uitesting-demo1111-ww2z5
      namespace: zainfo
    spec:
      affinity: {}
      containers:
      - env:
        - name: DEPLOY_ENV
          value: test
        - name: DEPLOY_BIZ_ENV
          value: test
        - name: APP_ID
          value: "3807"
        - name: PROJECT_ID
          value: "38732"
        - name: SERVICE_CHECK_HTTP
          value: /health
        - name: SERVICE_CHECK_INTERVAL
          value: 30s
        - name: SERVICE_CHECK_TIMEOUT
          value: 8s
        - name: COMPANY_ID
          value: "79002"
        - name: BIZ_ENV_UUID
          value: 79002-test-test
        - name: HOST_IP
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: status.hostIP
        - name: PUBLISH_ENV
          value: test
        - name: PUBLISH_VERSION
          value: v1-38732
        - name: JACOCOAGENT
          value: /root/jacoco/agent/jacocoagent.jar
        - name: AGENTPORT
          value: "8888"
        image: poc-registry.zhonganinfo.com/zainfo/za-dyw-uitesting-demo1111:6d8642cc-1687859247
        imagePullPolicy: Always
        lifecycle:
          preStop:
            exec:
              command:
              - /bin/sh
              - -c
              - sleep 10
        name: 38732-za-dyw-uitesting-demo1111
        resources:
          limits:
            cpu: "1"
            memory: 1792Mi
          requests:
            cpu: 100m
            memory: 1792Mi
        securityContext:
          privileged: false
        volumeMounts:
        - mountPath: /alidata1/admin/za-dyw-uitesting-demo1111/logs
          name: 38732-za-dyw-uitesting-demo1111-1641000
        - mountPath: /etc/localtime
          name: 38732-za-dyw-uitesting-demo1111-1641001
          readOnly: true
        - mountPath: /etc/timezone
          name: 38732-za-dyw-uitesting-demo1111-1641002
          readOnly: true
        - mountPath: /usr/local/lib/libEncrypt.so
          name: 38732-za-dyw-uitesting-demo1111-1641003
          readOnly: true
          subPath: libEncrypt.so
        - mountPath: /usr/local/lib/libzaenc.so
          name: 38732-za-dyw-uitesting-demo1111-1641004
          readOnly: true
          subPath: libzaenc.so
        - mountPath: /usr/local/lib/keyEncrypt.txt
          name: 38732-za-dyw-uitesting-demo1111-1641005
          readOnly: true
          subPath: keyEncrypt.txt
      dnsPolicy: ClusterFirst
      enableServiceLinks: false
      imagePullSecrets:
      - name: harbor-base-registry
      nodeSelector:
        com.zhonganinfo.bizcluster: zainfo
      restartPolicy: Always
      terminationGracePeriodSeconds: 60
      volumes:
      - hostPath:
          path: /alidata1/admin/logs/za-dyw-uitesting-demo1111
        name: 38732-za-dyw-uitesting-demo1111-1641000
      - hostPath:
          path: /etc/localtime
        name: 38732-za-dyw-uitesting-demo1111-1641001
      - hostPath:
          path: /etc/timezone
        name: 38732-za-dyw-uitesting-demo1111-1641002
      - hostPath:
          path: /usr/local/lib/
        name: 38732-za-dyw-uitesting-demo1111-1641003
      - hostPath:
          path: /usr/local/lib/
        name: 38732-za-dyw-uitesting-demo1111-1641004
      - hostPath:
          path: /usr/local/lib/
        name: 38732-za-dyw-uitesting-demo1111-1641005
status: {}
---
apiVersion: v1
kind: Service
metadata:
  annotations:
    creator: za-zhangyanhong001
    description: create from ship
    owner_name: 38732-za-dyw-uitesting-demo1111
  creationTimestamp: null
  labels:
    app: 38732-za-dyw-uitesting-demo1111
    app_id: "3807"
    appversion: 6d8642cc-1687859247-bkl5q
    base_name: za-dyw-uitesting-demo1111
    company_id: "79002"
    flow_id: 7ea20974557a
    prime_department_id: "1341011"
    project_id: "9"
    publish_version: v1-38732
    version: ww2z5
  name: svc-38732-za-dyw-uitesting-demo1111
  namespace: zainfo
spec:
  ports:
  - name: http-8080-8080
    port: 8080
    protocol: TCP
    targetPort: 8080
  - name: http-8081-8081
    port: 8081
    protocol: TCP
    targetPort: 8081
  selector:
    app: 38732-za-dyw-uitesting-demo1111
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}
---
apiVersion: networking/v1
kind: Ingress
metadata:
  annotations:
    created_default: "true"
    creator: za-zhangyanhong001
    description: create from ship
    kubernetes.io/ingress.class: traefik
    owner_name: 38732-za-dyw-uitesting-demo1111
  creationTimestamp: null
  labels:
    app: 38732-za-dyw-uitesting-demo1111
    app_id: "3807"
    appversion: 6d8642cc-1687859247-bkl5q
    base_name: za-dyw-uitesting-demo1111
    company_id: "79002"
    flow_id: 7ea20974557a
    prime_department_id: "1341011"
    project_id: "9"
    publish_version: v1-38732
    version: ww2z5
  name: ing-38732-za-dyw-uitesting-demo1111
  namespace: zainfo
spec:
  rules:
  - host: 38732-za-dyw-uitesting-demo1111.yanjj.test
    http:
      paths:
      - backend:
          service:
            name: svc-38732-za-dyw-uitesting-demo1111
            port:
              number: 8080
        path: /
        pathType: ImplementationSpecific
  - host: 38732-za-dyw-uitesting-demo1111-8081.yanjj.test
    http:
      paths:
      - backend:
          service:
            name: svc-38732-za-dyw-uitesting-demo1111
            port:
              number: 8081
        path: /
        pathType: ImplementationSpecific
status:
  loadBalancer: {}
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值