Move k8s script to docker-config-engine#14788
Conversation
Signed-off-by: Yun Li <[email protected]>
|
|
||
| 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.
This code means if $RUNTIME_OWNER=="kube" and CTR_SCRIPT exists, than I run the script
There was a problem hiding this comment.
Will run the script every time and check inside the script to decide to continue code is here.
| # 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.
Yes, I just enable it for this moment to check PR build tests pass rate. Should disable it as default.
| 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.
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.
Do you also want to change CTR_STATE_SCR_PATH -> CTRMGRD_SERVICE_PATH
There was a problem hiding this comment.
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 <[email protected]> Co-authored-by: Qi Luo <[email protected]>
|
@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 <[email protected]> Co-authored-by: Qi Luo <[email protected]>
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 <[email protected]> Co-authored-by: Qi Luo <[email protected]>
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 <[email protected]> Co-authored-by: Qi Luo <[email protected]>
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 <[email protected]> Co-authored-by: Qi Luo <[email protected]>
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 <[email protected]> Co-authored-by: Qi Luo <[email protected]>
|
@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 <[email protected]> Co-authored-by: Qi Luo <[email protected]>
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)