-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add init cni process #526
Add init cni process #526
Conversation
build/agent/init-cni.sh
Outdated
echo "Edgecore process is running. Continuing with the initialization steps." | ||
|
||
# copy cni to host | ||
cp -f /usr/local/bin/edgemesh-cni /opt/cni/bin/egdemesh-cni |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议参照, multus-CNI的做法
rm -f /host/opt/cni/bin/spiderpool.old || true
( [ -f "/host/opt/cni/bin/spiderpool" ] && mv /host/opt/cni/bin/spiderpool /host/opt/cni/bin/spiderpool.old ) || true
cp /usr/bin/spiderpool /host/opt/cni/bin/spiderpool
rm -f /host/opt/cni/bin/spiderpool.old &>/dev/null || true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的已经修改
build/agent/Dockerfile
Outdated
@@ -14,6 +14,7 @@ FROM alpine:3.11 | |||
RUN apk update && apk --no-cache add iptables && apk --no-cache add dpkg | |||
|
|||
COPY --from=builder /code/_output/local/bin/edgemesh-agent /usr/local/bin/edgemesh-agent | |||
COPY --from=builder /code/_output/local/bin/edgemesh-cni /usr/local/bin/edgemesh-cni |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么不新增一个 build/cni/Dockerfile 去放?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
欧克,已经分离出单独的安装容器
initContainers: | ||
- name: install-edgemesh-cni | ||
image: kubeedge/edgemesh-agent:v1.14.0 | ||
command: | ||
- sh | ||
- -c | ||
- /usr/local/init-cni.sh | ||
volumeMounts: | ||
- name: cni-plugin | ||
mountPath: /opt/cni/bin | ||
- name: cni-cfg | ||
mountPath: /etc/cni/net.d | ||
- name: edgemesh-cfg | ||
mountPath: /etc/edgemesh/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IdeaMeshDyx
如果说{{- if .Values.modules.edgeCNI }}开关控制是否安装edgeMesh CNI,则可给initContainer处加上该判断语句。
并给spiderpool的helm install的最外层也包上该判断语句,即可实现helm安装edgemesh CNI时,自动带上spiderpool IPAM插件无需额外手动安装
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,改用 subcharts 去做
Signed-off-by: ideameshdyx <[email protected]>
先给
|
额外需要一个脚本,可以将最新的spiderpool的charts覆盖 |
Signed-off-by: ideameshdyx <[email protected]>
更新values的方式还是依照helm的规则做,放在上一级value中 |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Poorunga The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
this pr provide an init process for cni install , when detect that the node is edge and the following two step will be doing:
/opt/cni/bin/egdemesh-cni
/etc/cni/net.d/
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: