webhook
apiVersion: v1
kind: Service
metadata:
name: wxwork-webhook
spec:
selector:
app: wxwork-webhook
ports:
- name: test-webhook
nodePort: 31118
protocol: TCP
port: 5233
targetPort: 5233
type: NodePort
sessionAffinity: None
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wxwork-webhook
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: wxwork-webhook
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: wxwork-webhook
spec:
automountServiceAccountToken: false
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- wxwork-webhook
weight: 100
securityContext:
runAsNonRoot: true
runAsUser: 65534
dnsPolicy: ClusterFirst
containers:
- name: wxwork-webhook1
image: yuw0192/webhook:0.1.6
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
memory: 100Mi
requests:
cpu: 10m
memory: 20Mi
ports:
- containerPort: 5233
workingDir: /usr/local/wxwork-webhook/
command:
- "python"
- "app.py"
- "--wxwork-webhook"
- "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxx"
- "--port"
- "5233"
volumeMounts:
- name: timezone-volume
mountPath: /etc/localtime
readOnly: true
volumes:
- name: timezone-volume
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
镜像下载
阿里云的地址为 registry.cn-shanghai.aliyuncs.com/yuw01/public:webhook
本文来自博客园,作者:小星奕的快乐,转载请注明原文链接:https://www.cnblogs.com/superzed/p/16981295.html

浙公网安备 33010602011771号