Skip to content

Add sonic-telemetry-sidecar container#23936

Merged
qiluo-msft merged 22 commits intosonic-net:masterfrom
FengPan-Frank:sidecar_container
Sep 25, 2025
Merged

Add sonic-telemetry-sidecar container#23936
qiluo-msft merged 22 commits intosonic-net:masterfrom
FengPan-Frank:sidecar_container

Conversation

@FengPan-Frank
Copy link
Contributor

@FengPan-Frank FengPan-Frank commented Sep 9, 2025

Why I did it

Create sidecar container which will stub systemd script, so that telemetry container rollout-ed via k8s could be managed by systemd script with naming change, as well as container checker logic.

Work item tracking
  • Microsoft ADO (number only):

How I did it

  1. Added systemd_stub service, which check sha256 for stub file regularly and overwrite
  2. Stub into /usr/local/bin/telemetry.sh, so that systemd cmd could keep compatible, but the implementation changes into kubectl
  3. Stub into monit container_checker, since container name will be changed when it's rollout-ed via k8s, but it will has label "raw_container_name=telemetry", thus update is in get_current_running_from_dockers
  4. Added env IS_V1_ENABLED to control telemetry.sh operation,
    IS_V1_ENABLED as true will recover system's original telemetry.sh which used as rollback case
    IS_V1_ENABLED as false will used to stub k8s supported telemetry.sh and move on upgrade.

How to verify it

image

tested on kubesonic env as well.
image

Which release branch to backport (provide reason below if selected)

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

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)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

@make1980 make1980 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@qiluo-msft qiluo-msft merged commit 894df38 into sonic-net:master Sep 25, 2025
20 checks passed
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202412: Azure/sonic-buildimage-msft#1686

@r12f
Copy link
Contributor

r12f commented Oct 7, 2025

Manual pick to 202412 for fixing build issues: Azure/sonic-buildimage-msft#1698

FengPan-Frank added a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Dec 4, 2025
Why I did it
Create sidecar container which will stub systemd script, so that telemetry container rollout-ed via k8s could be managed by systemd script with naming change, as well as container checker logic.

Work item tracking
Microsoft ADO (number only):
How I did it
Added systemd_stub service, which check sha256 for stub file regularly and overwrite
Stub into /usr/local/bin/telemetry.sh, so that systemd cmd could keep compatible, but the implementation changes into kubectl
Stub into monit container_checker, since container name will be changed when it's rollout-ed via k8s, but it will has label "raw_container_name=telemetry", thus update is in get_current_running_from_dockers
Added env IS_V1_ENABLED to control telemetry.sh operation,
IS_V1_ENABLED as true will recover system's original telemetry.sh which used as rollback case
IS_V1_ENABLED as false will used to stub k8s supported telemetry.sh and move on upgrade.

Signed-off-by: Feng Pan <[email protected]>
qiluo-msft pushed a commit to qiluo-msft/sonic-buildimage that referenced this pull request Jan 26, 2026
Why I did it
Create sidecar container which will stub systemd script, so that telemetry container rollout-ed via k8s could be managed by systemd script with naming change, as well as container checker logic.

Work item tracking
Microsoft ADO (number only):
How I did it
Added systemd_stub service, which check sha256 for stub file regularly and overwrite
Stub into /usr/local/bin/telemetry.sh, so that systemd cmd could keep compatible, but the implementation changes into kubectl
Stub into monit container_checker, since container name will be changed when it's rollout-ed via k8s, but it will has label "raw_container_name=telemetry", thus update is in get_current_running_from_dockers
Added env IS_V1_ENABLED to control telemetry.sh operation,
IS_V1_ENABLED as true will recover system's original telemetry.sh which used as rollback case
IS_V1_ENABLED as false will used to stub k8s supported telemetry.sh and move on upgrade.
qiluo-msft pushed a commit to qiluo-msft/sonic-buildimage that referenced this pull request Jan 26, 2026
Why I did it
Create sidecar container which will stub systemd script, so that telemetry container rollout-ed via k8s could be managed by systemd script with naming change, as well as container checker logic.

Work item tracking
Microsoft ADO (number only):
How I did it
Added systemd_stub service, which check sha256 for stub file regularly and overwrite
Stub into /usr/local/bin/telemetry.sh, so that systemd cmd could keep compatible, but the implementation changes into kubectl
Stub into monit container_checker, since container name will be changed when it's rollout-ed via k8s, but it will has label "raw_container_name=telemetry", thus update is in get_current_running_from_dockers
Added env IS_V1_ENABLED to control telemetry.sh operation,
IS_V1_ENABLED as true will recover system's original telemetry.sh which used as rollback case
IS_V1_ENABLED as false will used to stub k8s supported telemetry.sh and move on upgrade.
qiluo-msft pushed a commit to qiluo-msft/sonic-buildimage that referenced this pull request Jan 26, 2026
Why I did it
Create sidecar container which will stub systemd script, so that telemetry container rollout-ed via k8s could be managed by systemd script with naming change, as well as container checker logic.

Work item tracking
Microsoft ADO (number only):
How I did it
Added systemd_stub service, which check sha256 for stub file regularly and overwrite
Stub into /usr/local/bin/telemetry.sh, so that systemd cmd could keep compatible, but the implementation changes into kubectl
Stub into monit container_checker, since container name will be changed when it's rollout-ed via k8s, but it will has label "raw_container_name=telemetry", thus update is in get_current_running_from_dockers
Added env IS_V1_ENABLED to control telemetry.sh operation,
IS_V1_ENABLED as true will recover system's original telemetry.sh which used as rollback case
IS_V1_ENABLED as false will used to stub k8s supported telemetry.sh and move on upgrade.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants