-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Move k8s script to docker-config-engine #14788
Move k8s script to docker-config-engine #14788
Conversation
Signed-off-by: Yun Li <yunli1@microsoft.com>
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.
LGTM
dockers/docker-dhcp-relay/start.sh
Outdated
@@ -5,7 +5,7 @@ if [ "${RUNTIME_OWNER}" == "" ]; then | |||
fi | |||
|
|||
CTR_SCRIPT="/usr/share/sonic/scripts/container_startup.py" | |||
if test -f ${CTR_SCRIPT} | |||
if [ $RUNTIME_OWNER = "kube" ] && test -f ${CTR_SCRIPT} |
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.
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.
This code means if $RUNTIME_OWNER=="kube" and CTR_SCRIPT exists, than I run the script
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.
Will run the script every time and check inside the script to decide to continue code is here.
rules/config
Outdated
@@ -178,7 +178,7 @@ INCLUDE_ROUTER_ADVERTISER ?= y | |||
|
|||
# INCLUDE_KUBERNETES - if set to y kubernetes packages are installed to be able to | |||
# run as worker node in kubernetes cluster. | |||
INCLUDE_KUBERNETES ?= n | |||
INCLUDE_KUBERNETES ?= y |
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.
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.
Yes, I just enable it for this moment to check PR build tests pass rate. Should disable it as default.
src/sonic-ctrmgrd/ctrmgr/container
Outdated
@@ -11,7 +11,7 @@ import datetime | |||
import docker | |||
from swsscommon import swsscommon | |||
|
|||
CTR_STATE_SCR_PATH = '/usr/share/sonic/scripts/container_startup.py' | |||
CTR_STATE_SCR_PATH = '/etc/sonic/remote_ctr.config.json' |
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.
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.
The logic here is to check whether k8s feature is included. If the file exists, it means included. So just check file whether exists, don't care the content.
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.
Do you also want to change CTR_STATE_SCR_PATH -> CTRMGRD_SERVICE_PATH
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.
Thanks, changed.
Why I did it To reduce the container's dependency from host system Work item tracking Microsoft ADO (number only): 17713469 How I did it Move the k8s container startup script to config engine container, other than mount it from host. How to verify it Check file path(/usr/share/sonic/scripts/container_startup.py) inside config engine container. Signed-off-by: Yun Li <yunli1@microsoft.com> Co-authored-by: Qi Luo <qiluo-msft@users.noreply.github.com>
@lixiaoyuner PR conflicts with 202205 branch |
@lixiaoyuner PR conflicts with 202211 branch |
Why I did it To reduce the container's dependency from host system Work item tracking Microsoft ADO (number only): 17713469 How I did it Move the k8s container startup script to config engine container, other than mount it from host. How to verify it Check file path(/usr/share/sonic/scripts/container_startup.py) inside config engine container. Signed-off-by: Yun Li <yunli1@microsoft.com> Co-authored-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Why I did it To reduce the container's dependency from host system Work item tracking Microsoft ADO (number only): 17713469 How I did it Move the k8s container startup script to config engine container, other than mount it from host. How to verify it Check file path(/usr/share/sonic/scripts/container_startup.py) inside config engine container. Signed-off-by: Yun Li <yunli1@microsoft.com> Co-authored-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Why I did it To reduce the container's dependency from host system Work item tracking Microsoft ADO (number only): 17713469 How I did it Move the k8s container startup script to config engine container, other than mount it from host. How to verify it Check file path(/usr/share/sonic/scripts/container_startup.py) inside config engine container. Signed-off-by: Yun Li <yunli1@microsoft.com> Co-authored-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Why I did it To reduce the container's dependency from host system Work item tracking Microsoft ADO (number only): 17713469 How I did it Move the k8s container startup script to config engine container, other than mount it from host. How to verify it Check file path(/usr/share/sonic/scripts/container_startup.py) inside config engine container. Signed-off-by: Yun Li <yunli1@microsoft.com> Co-authored-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Why I did it To reduce the container's dependency from host system Work item tracking Microsoft ADO (number only): 17713469 How I did it Move the k8s container startup script to config engine container, other than mount it from host. How to verify it Check file path(/usr/share/sonic/scripts/container_startup.py) inside config engine container. Signed-off-by: Yun Li <yunli1@microsoft.com> Co-authored-by: Qi Luo <qiluo-msft@users.noreply.github.com>
@lixiaoyuner PR conflicts with 202305 branch |
Why I did it To reduce the container's dependency from host system Work item tracking Microsoft ADO (number only): 17713469 How I did it Move the k8s container startup script to config engine container, other than mount it from host. How to verify it Check file path(/usr/share/sonic/scripts/container_startup.py) inside config engine container. Signed-off-by: Yun Li <yunli1@microsoft.com> Co-authored-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Related work items: sonic-net#94, sonic-net#13789, sonic-net#14149, sonic-net#14515, sonic-net#14788, sonic-net#14922, sonic-net#14933, sonic-net#15284, sonic-net#15383, sonic-net#15464, sonic-net#15519, sonic-net#15521, sonic-net#15575, sonic-net#15636, sonic-net#15652, sonic-net#15684, sonic-net#15708, sonic-net#15725, sonic-net#15739, sonic-net#15755, sonic-net#15756, sonic-net#15757
Why I did it
To reduce the container's dependency from host system
Work item tracking
17852636
How I did it
Move the k8s container startup script to config engine container, other than mount it from host.
How to verify it
Check file path(/usr/share/sonic/scripts/container_startup.py) inside config engine container.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)