Skip to content

Conversation

@sandlbn
Copy link

@sandlbn sandlbn commented Jun 2, 2025

This PR adds support for deploying 5G core network functions in confidential containers using Kata Containers runtime.
Changes:

  • Added configurable runtime class support for all core NFs (AMF, SMF, NRF, UDR, UDM, AUSF, PCF, NSSF)

  • Added optional attestation init container with configurable timeout

  • Added Kata-specific pod annotations with customizable kernel parameters

  • Updated _helpers.tpl with reusable templates for confidential container configuration

  • Added new configuration section in values.yaml with flexible enable/disable options

  • Tested with Kata Containers kata-qemu runtime

  • Confirmed backward compatibility with existing deployments

Signed-off-by: Marcin Spoczynski <[email protected]>
@gab-arrobo
Copy link
Contributor

@sandlbn, please resolve the conflict. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for confidential containers for 5G core network functions using Kata Containers. Key changes include:

  • Introducing configurable runtime classes, pod annotations, and an attestation init container.
  • Extending values.yaml with a new confidential container configuration section.
  • Updating deployment templates and helper templates to embed the new confidential container behavior.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

File Description
5g-control-plane/values.yaml Adds configuration for confidential container and attestation info
templates/deployment-*.yaml Updates deployment templates (AMF, SMF, NRF, PCF) to conditionally apply runtime settings and annotations
templates/_helpers.tpl Introduces helper templates for confidential container annotations and attestation init container

helm.sh/hook-weight: "5"
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.confidentialContainers.enabled }}
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

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

Consider aligning the annotation condition here with the other deployment templates by checking 'or .Values.confidentialContainers.enabled .Values.confidentialContainers.annotation.enabled' to ensure consistent handling of confidential container annotations.

Suggested change
{{- if .Values.confidentialContainers.enabled }}
{{- if or .Values.confidentialContainers.enabled .Values.confidentialContainers.annotation.enabled }}

Copilot uses AI. Check for mistakes.
*/}}
{{- define "5g-control-plane.confidential_annotations" -}}
{{- if or .Values.confidentialContainers.enabled .Values.confidentialContainers.annotation.enabled }}
io.containerd.cri.runtime-handler: kata-qemu
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

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

To improve maintainability, consider using the runtimeClassName defined in the configuration (e.g., .Values.confidentialContainers.runtimeClassName) instead of hardcoding 'kata-qemu'.

Suggested change
io.containerd.cri.runtime-handler: kata-qemu
io.containerd.cri.runtime-handler: {{ .Values.confidentialContainers.runtimeClassName | default "kata-qemu" }}

Copilot uses AI. Check for mistakes.
Comment on lines +171 to +172
sleep 5;
elapsed=$((elapsed + 5));
Copy link

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider parameterizing the retry sleep interval (currently hardcoded as 5 seconds) to allow tuning of the attestation check frequency based on deployment needs.

Suggested change
sleep 5;
elapsed=$((elapsed + 5));
sleep {{ .Values.confidentialContainers.attestation.retryInterval | default 5 }};
elapsed=$((elapsed + {{ .Values.confidentialContainers.attestation.retryInterval | default 5 }}));

Copilot uses AI. Check for mistakes.
repository: "" #default docker hub
tags:
init: omecproject/pod-init:rel-1.1.2
attestation: storytel/alpine-bash-curl:latest

Choose a reason for hiding this comment

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

I think we should find a better image for this, it seems unmaintained, and the organization is unknown to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants