Files
Kubernetes/File/Yaml/ingress-values-hostnetwork.yaml
offends b44594def6
All checks were successful
continuous-integration/drone Build is passing
修改和新增
2025-12-23 01:53:01 +08:00

67 lines
1.5 KiB
YAML

controller:
# 开启监控
metrics:
enabled: true
serviceMonitor:
enabled: false
# 配置镜像加速
image:
registry: k8s.mirror.nju.edu.cn
# 使用主机网络时,利用 Kubernetes 集群内的 DNS 解析服务
dnsPolicy: ClusterFirstWithHostNet
# 使用本地网络
hostNetwork: true
# Pod 使用 DaemonSet 方式运行 Deployment 或 DaemonSet
kind: DaemonSet
# 只允许调度到具有 ingress="true" 的节点上,[ kubectl label node xxx ingress="true" ]
nodeSelector:
kubernetes.io/os: linux
ingress: "true"
# 禁用后状态字段会报告 Ingress 控制器 Pod 所在节点的 IP 地址或节点列表的 IP 地址
publishService:
enabled: false
# 启用 Kubernetes Service
service:
enabled: false
# 配置镜像加速
admissionWebhooks:
patch:
image:
registry: k8s.mirror.nju.edu.cn
# 设置为集群默认 ingress 控制器
ingressClassResource:
default: true
# 配置资源限制
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 1000m
memory: 1Gi
# 配置 Pod 安全上下文
podSecurityContext:
fsGroup: 101
runAsUser: 101
# 配置安全上下文
containerSecurityContext:
allowPrivilegeEscalation: false # 禁止特权提升
capabilities:
add: ["NET_BIND_SERVICE"]
drop:
- ALL # 去除所有能力
runAsNonRoot: true # 以非 root 用户运行
seccompProfile:
type: RuntimeDefault # 启用默认系统调用过滤