69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: apisix
|
|
labels:
|
|
app.kubernetes.io/name: apisix
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: apisix
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: apisix
|
|
spec:
|
|
containers:
|
|
- name: apisix
|
|
image: "apache/apisix:3.2.2-debian"
|
|
imagePullPolicy: IfNotPresent
|
|
envFrom:
|
|
- configMapRef:
|
|
name: apisix-env-config
|
|
- secretRef:
|
|
name: apisix-senstitive
|
|
ports:
|
|
- name: http
|
|
containerPort: 9080
|
|
protocol: TCP
|
|
- name: tls
|
|
containerPort: 9443
|
|
protocol: TCP
|
|
- name: admin
|
|
containerPort: 9180
|
|
protocol: TCP
|
|
readinessProbe:
|
|
failureThreshold: 6
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
tcpSocket:
|
|
port: 9080
|
|
timeoutSeconds: 1
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- "sleep 30"
|
|
volumeMounts:
|
|
- mountPath: /usr/local/apisix/conf/config.yaml
|
|
name: apisix-config
|
|
subPath: apisix-config.yaml
|
|
resources: {}
|
|
initContainers:
|
|
- name: wait-etcd
|
|
command:
|
|
- sh
|
|
- -c
|
|
- until nc -z etcd-server 2379; do echo waiting for etcd `date`; sleep 2; done;
|
|
image: busybox:1.28
|
|
imagePullPolicy: IfNotPresent
|
|
volumes:
|
|
- name: apisix-config
|
|
configMap:
|
|
defaultMode: 420
|
|
name: apisix-config
|