Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
92860cf
refactor: drop unnecessary sudoer isolation
bcho Feb 12, 2026
2d802d9
ci: suppress nosec warning temporary
bcho Feb 12, 2026
c2361a0
Merge branch 'hbc/drop-sudoer' into hbc/kubeadm
bcho Feb 12, 2026
b7dfcb5
Merge remote-tracking branch 'origin/main' into hbc/kubeadm
bcho Feb 13, 2026
5c3c585
feat: init kubeadm join executor
bcho Feb 13, 2026
12f877d
refactor: take ca cert as raw []byte
bcho Feb 13, 2026
debd246
Revert "refactor: take ca cert as raw []byte"
bcho Feb 13, 2026
3b25027
feat: minimal poc
bcho Feb 13, 2026
3264cc2
feat: check systemd unit status
bcho Feb 13, 2026
261f4b3
feat: prepare kubelet systemd unit
bcho Feb 13, 2026
28872ab
feat: write files with renameio
bcho Feb 13, 2026
f6705d6
refactor: simplify tar.gz download handling
bcho Feb 13, 2026
5038808
refactor: download via remoteio
bcho Feb 13, 2026
d9350a4
refactor: download with remoteio
bcho Feb 13, 2026
5c62f92
refactor: download with DownloadToLocalFile
bcho Feb 13, 2026
abfd0ac
refactor: rename to utilio
bcho Feb 13, 2026
4e23009
refactor: consolidate to utilio
bcho Feb 13, 2026
610dd2c
refactor: consolidate to utilio
bcho Feb 13, 2026
4e79976
fix: restrict mkdir permissions
bcho Feb 13, 2026
d75f1e6
refactor: stricter validation
bcho Feb 13, 2026
79d49b7
refactor: refactor and harden io operations
bcho Feb 13, 2026
5c09409
doc: TODO note
bcho Feb 13, 2026
d9fee6c
lint: fix lint issues
bcho Feb 13, 2026
e9a265a
lint: exclude error check
bcho Feb 13, 2026
c8c269d
fix: debug log
bcho Feb 13, 2026
c7972ee
Merge remote-tracking branch 'origin/hbc/io' into hbc/kubeadm
bcho Feb 13, 2026
faecbcf
poc
bcho Feb 13, 2026
98bbd92
Merge remote-tracking branch 'origin/main' into hbc/kubeadm
bcho Feb 13, 2026
cb57ee8
feat: define components action model
bcho Feb 13, 2026
6cc46ce
feat: quick impl for kube binaries download action
bcho Feb 14, 2026
ed1d17c
chore: refine filter logic
bcho Feb 14, 2026
d74f7eb
feat: return status
bcho Feb 14, 2026
3ac463e
feat: imlpement cri binaries download action
bcho Feb 14, 2026
5e51f12
refactor: simplify GetArch impl
bcho Feb 14, 2026
b2072b4
feat: implement containerd service start action
bcho Feb 14, 2026
62d9c75
feat: add minimal os configuration
bcho Feb 17, 2026
e2598dd
feat: install required packages
bcho Feb 17, 2026
f9ab721
fix: update kubelet version check
bcho Feb 17, 2026
0718790
chore: minimal progress ui
bcho Feb 17, 2026
d41a920
doc: describe component api
bcho Feb 17, 2026
4686bdb
fix: exec with utilexec
bcho Feb 17, 2026
d9a8f2b
fix: drop unused file
bcho Feb 17, 2026
de9eef1
doc: revert change
bcho Feb 17, 2026
34767ed
doc: update sample
bcho Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*.proto]
indent_size = 2
indent_style = space
35 changes: 35 additions & 0 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

_ "go.goms.io/aks/AKSFlexNode/components"
"go.goms.io/aks/AKSFlexNode/pkg/bootstrapper"
"go.goms.io/aks/AKSFlexNode/pkg/config"
"go.goms.io/aks/AKSFlexNode/pkg/logger"
Expand All @@ -25,6 +26,18 @@ var (
BuildTime = "unknown"
)

func NewApplyCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "apply",
Short: "Apply the AKS node configuration and join the cluster",
RunE: func(cmd *cobra.Command, args []string) error {
return runApply(cmd.Context())
},
}

return cmd
}

// NewAgentCommand creates a new agent command
func NewAgentCommand() *cobra.Command {
cmd := &cobra.Command{
Expand Down Expand Up @@ -67,6 +80,28 @@ func NewVersionCommand() *cobra.Command {
return cmd
}

// runApply applies the node configuration and joins the cluster.
func runApply(ctx context.Context) error {
// logger := logger.GetLoggerFromContext(ctx)

// cfg, err := config.LoadConfig(configPath)
// if err != nil {
// return fmt.Errorf("failed to load config from %s: %w", configPath, err)
// }

// exectuor := bootstrapper.NewMinimal(cfg, logger)
// result, err := exectuor.Bootstrap(ctx)
// if err != nil {
// return fmt.Errorf("bootstrap failed: %w", err)
// }

// if err := handleExecutionResult(result, "bootstrap", logger); err != nil {
// return fmt.Errorf("bootstrap execution failed: %w", err)
// }

return nil
}

// runAgent executes the bootstrap process and then runs as daemon
func runAgent(ctx context.Context) error {
logger := logger.GetLoggerFromContext(ctx)
Expand Down
33 changes: 33 additions & 0 deletions components/api/api.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package api

import "google.golang.org/protobuf/proto"

// Action represents an action to be applied.
// It is a protobuf message with a standard metadata field.
type Action interface {
proto.Message
GetMetadata() *Metadata
Redact()
}

type WithDefaulting interface {
Defaulting()
}

type WithValidation interface {
Validate() error
}

func DefaultAndValidate[M any](m M) (M, error) {
if d, ok := any(m).(WithDefaulting); ok {
d.Defaulting()
}

if v, ok := any(m).(WithValidation); ok {
if err := v.Validate(); err != nil {
return m, err
}
}

return m, nil
}
252 changes: 252 additions & 0 deletions components/api/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions components/api/api.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
edition = "2024";

package aks.flex.components.api;

option go_package = "go.goms.io/aks/AKSFlexNode/components/api";

// Metadata represents the metadata of an action to be applied.
message Metadata {
// type refers to the type of action.
string type = 1;
// name refers to the name of the action.
string name = 2;
}

message Base {
Metadata metadata = 1;
}
25 changes: 25 additions & 0 deletions components/cri/assets/containerd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[Unit]
Description=containerd container runtime
Documentation=https://containerd.io
After=network.target local-fs.target

[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart={{.ContainerdBinPath}}
Type=notify
Delegate=yes
KillMode=process
Restart=always
RestartSec=5
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNPROC=infinity
LimitCORE=infinity
LimitNOFILE=infinity
# Comment TasksMax if your systemd version does not supports it.
# Only systemd 226 and above support this version.
TasksMax=infinity
OOMScoreAdjust=-999

[Install]
WantedBy=multi-user.target
Loading
Loading