Update k8s resource file.

This commit is contained in:
fumingwei
2024-05-22 16:11:58 +08:00
parent 8937d211d6
commit 243041625b
2 changed files with 32 additions and 15 deletions

View File

@@ -2,13 +2,13 @@
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-client
namespace: tsg-os-system
name: br-dign-client
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"master": "ens4f1",
"mode": "bridge",
"type": "bridge",
"bridge": "br_dign_c",
"ipam": {
"type": "host-local",
"ranges": [
@@ -23,14 +23,14 @@ spec:
}'
---
apiVersion: apps/v1
kind: Deployment
kind: DaemonSet
metadata:
namespace: tsg-os-system
name: dign-client
labels:
app: dign-client
spec:
replicas: 1
selector:
matchLabels:
app: dign-client
@@ -39,7 +39,7 @@ spec:
labels:
app: dign-client
annotations:
k8s.v1.cni.cncf.io/networks: macvlan-client
k8s.v1.cni.cncf.io/networks: br-dign-client
spec:
containers:
- name: dign-client
@@ -74,5 +74,8 @@ spec:
- name: config-path
hostPath:
path: /opt/tsg/tsg-diagnose/etc
- name: service-function-config-path
hostPath:
path: /opt/tsg/tsg-diagnose/etc
---

View File

@@ -2,13 +2,13 @@
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: macvlan-server
namespace: tsg-os-system
name: br-dign-server
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"master": "ens4f0",
"mode": "bridge",
"type": "bridge",
"bridge": "br_dign_s",
"ipam": {
"type": "host-local",
"ranges": [
@@ -23,14 +23,14 @@ spec:
}'
---
apiVersion: apps/v1
kind: Deployment
kind: DaemonSet
metadata:
namespace: tsg-os-system
name: dign-server
labels:
app: dign-server
spec:
replicas: 1
selector:
matchLabels:
app: dign-server
@@ -39,7 +39,7 @@ spec:
labels:
app: dign-server
annotations:
k8s.v1.cni.cncf.io/networks: macvlan-server
k8s.v1.cni.cncf.io/networks: br-dign-server
spec:
containers:
@@ -49,6 +49,13 @@ spec:
command: ["/bin/sh", "-c", "echo 66.66.66.66 www.1testanswer-cname.com >> /etc/hosts; webproc --config /etc/dnsmasq.conf -- dnsmasq --no-daemon"]
securityContext:
privileged: true
livenessProbe:
exec:
command:
- ifconfig
- net1
initialDelaySeconds: 5
periodSeconds: 5
volumeMounts:
- name: localtime-node
mountPath: /etc/localtime
@@ -64,6 +71,13 @@ spec:
command: ["/bin/bash", "-c", "make inside-docker;nginx;tail -f /dev/null"]
securityContext:
privileged: true
livenessProbe:
exec:
command:
- ifconfig
- net1
initialDelaySeconds: 5
periodSeconds: 5
volumeMounts:
- name: localtime-node
mountPath: /etc/localtime
@@ -79,7 +93,7 @@ spec:
- name: tsg-dign-init
image: "dign-server-dns:latest"
imagePullPolicy: Never
command: ["/bin/sh","-c","i=1;while [ \"$i\" -le 32 ]; do ip_suffix=$(( i + 100 ));ifconfig net1:$i 192.0.2.$ip_suffix;i=$(( i + 1 ));done;"]
command: ["/bin/sh","-c","i=1;while [ \"$i\" -le 64 ]; do ip_suffix=$(( i + 100 ));ifconfig net1:$i 192.0.2.$ip_suffix;i=$(( i + 1 ));done;"]
securityContext:
privileged: true