mirror of
https://github.com/kairos-io/provider-k3s.git
synced 2025-04-27 19:05:39 +00:00
Fix filter Agent config (#103)
This commit is contained in:
parent
2dea81b509
commit
36a500d332
@ -88,7 +88,7 @@ func parseOptions(cluster clusterplugin.Cluster) ([]byte, []byte, []byte) {
|
||||
// Data received from upstream contains config for both control plane and worker. Thus, for worker,
|
||||
// config is being filtered via unmarshal into agent config.
|
||||
var agentCfg api.K3sAgentConfig
|
||||
if err := yaml.Unmarshal([]byte(cluster.Options), &agentCfg); err == nil {
|
||||
if err := yaml.Unmarshal(userOptionConfig, &agentCfg); err == nil {
|
||||
userOptionConfig, _ = yaml.Marshal(agentCfg)
|
||||
} else {
|
||||
logrus.Fatalf("failed to un-marshal cluster options in k3s agent config %s", err)
|
||||
|
Loading…
Reference in New Issue
Block a user