88 lines
2.2 KiB
YAML
88 lines
2.2 KiB
YAML
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: skywalking-oap
|
||
|
|
namespace: default
|
||
|
|
labels:
|
||
|
|
app: skywalking-oap
|
||
|
|
spec:
|
||
|
|
replicas: 1
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: skywalking-oap
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: skywalking-oap
|
||
|
|
spec:
|
||
|
|
nodeSelector:
|
||
|
|
node-role.kubernetes.io/control-plane: "true"
|
||
|
|
containers:
|
||
|
|
- name: skywalking-oap
|
||
|
|
image: registry.t-aaron.com/apache/skywalking-oap-server:8.9.1
|
||
|
|
ports:
|
||
|
|
- containerPort: 11800
|
||
|
|
name: grpc
|
||
|
|
- containerPort: 12800
|
||
|
|
name: rest
|
||
|
|
env:
|
||
|
|
- name: SW_STORAGE
|
||
|
|
value: "elasticsearch"
|
||
|
|
- name: SW_STORAGE_ES_CLUSTER_NODES
|
||
|
|
value: "elasticsearch:9200"
|
||
|
|
- name: SW_HEALTH_CHECKER
|
||
|
|
value: "default"
|
||
|
|
- name: SW_TELEMETRY
|
||
|
|
value: "prometheus"
|
||
|
|
- name: TZ
|
||
|
|
value: "Asia/Shanghai"
|
||
|
|
- name: JAVA_OPTS
|
||
|
|
value: "-Xms1024m -Xmx1024m"
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
memory: "1Gi"
|
||
|
|
cpu: "500m"
|
||
|
|
limits:
|
||
|
|
memory: "2Gi"
|
||
|
|
cpu: "1000m"
|
||
|
|
livenessProbe:
|
||
|
|
exec:
|
||
|
|
command:
|
||
|
|
- /bin/sh
|
||
|
|
- -c
|
||
|
|
- "/skywalking/bin/swctl ch"
|
||
|
|
initialDelaySeconds: 30
|
||
|
|
periodSeconds: 30
|
||
|
|
timeoutSeconds: 10
|
||
|
|
failureThreshold: 3
|
||
|
|
readinessProbe:
|
||
|
|
exec:
|
||
|
|
command:
|
||
|
|
- /bin/sh
|
||
|
|
- -c
|
||
|
|
- "/skywalking/bin/swctl ch"
|
||
|
|
initialDelaySeconds: 10
|
||
|
|
periodSeconds: 30
|
||
|
|
timeoutSeconds: 10
|
||
|
|
failureThreshold: 3
|
||
|
|
volumeMounts:
|
||
|
|
- name: data
|
||
|
|
mountPath: /skywalking/data
|
||
|
|
volumes:
|
||
|
|
- name: data
|
||
|
|
hostPath:
|
||
|
|
path: /opt/skywalking-oap
|
||
|
|
type: DirectoryOrCreate
|
||
|
|
initContainers:
|
||
|
|
- name: wait-for-elasticsearch
|
||
|
|
image: registry.t-aaron.com/busybox:1.35
|
||
|
|
command:
|
||
|
|
- sh
|
||
|
|
- -c
|
||
|
|
- |
|
||
|
|
until wget --spider -q 'http://elasticsearch:9200/_cluster/health'; do
|
||
|
|
echo "Waiting for Elasticsearch to be ready..."
|
||
|
|
sleep 5
|
||
|
|
done
|
||
|
|
echo "Elasticsearch is ready!"
|