Skip to content

Commit

Permalink
Re-add pid in runtime config
Browse files Browse the repository at this point in the history
This is so we can support downgrades, eg run old k0s binary against
newer k0s runtime config.

Probably meaningless because we don't really support downgrading to
older version(?)

Signed-off-by: Natanael Copa <[email protected]>
  • Loading branch information
ncopa committed Jan 20, 2025
1 parent 9594472 commit d382ab3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/config/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type RuntimeConfig struct {
type RuntimeConfigSpec struct {
NodeConfig *v1beta1.ClusterConfig `json:"nodeConfig"`
K0sVars *CfgVars `json:"k0sVars"`
Pid int `json:"pid"` // unused. Delete
lockFile *os.File
}

Expand Down Expand Up @@ -136,6 +137,7 @@ func NewRuntimeConfig(k0sVars *CfgVars) (*RuntimeConfig, error) {
Spec: &RuntimeConfigSpec{
NodeConfig: nodeConfig,
K0sVars: k0sVars,
Pid: os.Getpid(),
lockFile: lockFile,
},
}
Expand Down

0 comments on commit d382ab3

Please sign in to comment.