control agent can now uboot commands

This commit is contained in:
2026-04-04 20:19:25 +08:00
parent 4f490ab37e
commit 517cc2e01d
19 changed files with 579 additions and 69 deletions

View File

@@ -273,20 +273,8 @@ func applyControlAgentDaemonSet(ctx context.Context, kubeClient kubernetes.Inter
Value: "/host/opt/monok8s/config/cluster.env",
},
{
Name: "HOST_MOUNT_ROOT",
Value: "/host/mnt/control-agent",
},
{
Name: "HOST_DEV_DIR",
Value: "/host/dev",
},
{
Name: "HOST_PROC_DIR",
Value: "/host/proc",
},
{
Name: "HOST_RUN_DIR",
Value: "/host/run",
Name: "FW_ENV_CONFIG_FILE",
Value: "/host/etc/fw_env.config",
},
},
SecurityContext: &corev1.SecurityContext{
@@ -295,22 +283,18 @@ func applyControlAgentDaemonSet(ctx context.Context, kubeClient kubernetes.Inter
VolumeMounts: []corev1.VolumeMount{
{
Name: "host-dev",
MountPath: "/host/dev",
MountPath: "/dev",
},
{
Name: "host-etc",
MountPath: "/host/etc",
ReadOnly: true,
},
{
Name: "host-config",
MountPath: "/host/opt/monok8s/config",
ReadOnly: true,
},
{
Name: "host-run",
MountPath: "/host/run",
},
{
Name: "host-proc",
MountPath: "/host/proc",
ReadOnly: true,
},
},
},
},
@@ -324,6 +308,15 @@ func applyControlAgentDaemonSet(ctx context.Context, kubeClient kubernetes.Inter
},
},
},
{
Name: "host-etc",
VolumeSource: corev1.VolumeSource{
HostPath: &corev1.HostPathVolumeSource{
Path: "/etc",
Type: hostPathType(corev1.HostPathDirectory),
},
},
},
{
Name: "host-config",
VolumeSource: corev1.VolumeSource{
@@ -333,24 +326,6 @@ func applyControlAgentDaemonSet(ctx context.Context, kubeClient kubernetes.Inter
},
},
},
{
Name: "host-run",
VolumeSource: corev1.VolumeSource{
HostPath: &corev1.HostPathVolumeSource{
Path: "/run",
Type: hostPathType(corev1.HostPathDirectory),
},
},
},
{
Name: "host-proc",
VolumeSource: corev1.VolumeSource{
HostPath: &corev1.HostPathVolumeSource{
Path: "/proc",
Type: hostPathType(corev1.HostPathDirectory),
},
},
},
},
},
},