python常用(1)
# encoding: utf-8 from openpyxl.reader.excel import load_workbook # FOR xlsx import os import openpyxl from decimal import Decimal import shutil import zipfile path = os.getcwd() testplan = path + "\\testplan.xlsx" mapping_path = os.path.join(path, "MUT_Product_Mapping.xlsx") #print(mapping_path) workbook = load_workbook(mapping_path) worksheet = workbook.worksheets[0] mapping = {} for index, item in enumerate(worksheet.rows): # START with age row ...
k8s之Service
kind: Service apiVersion: v1 metadata: name: mysql-svc namespace: default labels: name: mysql-svc spec: ports: - name: http protocol: TCP port: 3306 targetPort: 3306 nodePort: 33306 selector: name: mysql-pod type: NodePort
k8s之PersistentVolume&PersistentVolumeClaim
kind:PersistentVolume apiVersion: v1 metadata: name: mysql-pv spec: capacity: storage:1Gi hostPath: path:/home/work/share/mysql type:'' accessModes: -ReadWriteOnce claimRef: kind:PersistentVolumeClaim namespace:default name: mysql-pvc persistentVolumeReclaimPolicy:Retain volumeMode:Filesystem kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mysql-pvc namespace: default labels: app: mysql-pvc spec: accessM...
k8s之ReplicationController
kind: ReplicationController apiVersion: v1 metadata: name: mysql-rc namespace: default uid: 946f2c6a-f7ac-4412-b3c9-3741fe668717 resourceVersion: '1299573' generation: 3 creationTimestamp: '2021-05-17T09:16:19Z' labels: name: mysql-rc spec: replicas: 1 selector: name: mysql-pod template: metadata: labels: name: mysql-pod spec: volumes: - name: mysql-storage persistentVolumeClaim: claimN...
k8s deployment with persistentVolume
kind: Deployment apiVersion: apps/v1 metadata: name: mut-deployment namespace: default labels: app: mut spec: replicas: 1 selector: matchLabels: app: mut template: metadata: labels: app: mut spec: volumes: - name: testcase-storage persistentVolumeClaim: claimName: mut-pvc containers: - name: mut image: 'mut:20210531' ports: - containerPort: 80...
k8s之java-deployment
kind: Deployment apiVersion: apps/v1 metadata: name: pejava-deployment namespace: default labels: app: pejava spec: replicas: 1 selector: matchLabels: app: pejava template: metadata: labels: app: pejava spec: volumes: - name: git-storage persistentVolumeClaim: claimName: pejava-pvc containers: - name: pejava image: 'pejava:20210611' ports: - c...
k8s之mongo-deployment
kind: Deployment apiVersion: apps/v1 metadata: name: mongo-deployment namespace: default labels: app: mongo spec: replicas: 1 selector: matchLabels: app: mongo template: metadata: labels: app: mongo spec: containers: - name: mongo image: mongo ports: - containerPort: 27017 protocol: TCP
pe-deployment
kind: Deployment apiVersion: apps/v1 metadata: name: pe-deployment namespace: default labels: app: pe spec: replicas: 1 selector: matchLabels: app: pe template: metadata: labels: app: pe spec: containers: - name: pe image: 'pe:20210531' ports: - containerPort: 3001 protocol: TCP