Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
v0.13.x: fixes for rendering plugin systemd units (#1674)
Browse files Browse the repository at this point in the history
* Changed Machine.SystemdUnits to inline rather than needing contents->content.
Fixed issue rendering systemd unit templates.
Fixed issue when RemoteFileSpec contains Template and not content.
Refactored extras.go to clean up repeative code.

* Add tests to prove that systemd units are now rendered.
  • Loading branch information
davidmccormick authored Jul 11, 2019
1 parent e5a2165 commit f073d3d
Show file tree
Hide file tree
Showing 8 changed files with 311 additions and 248 deletions.
2 changes: 1 addition & 1 deletion pkg/api/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ type SystemdUnits []SystemdUnit
type SystemdUnit struct {
Name string `yaml:"name,omitempty"`
// Contents must be a valid go text template producing a valid systemd unit definition
Contents `yaml:"contents,omitempty"`
Contents `yaml:",inline"`
}

// Kubelet represents a set of customizations to kubelets running on the nodes
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/stack_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func NewEtcdStack(conf *Config, opts api.StackTemplateOptions, extras clusterext
stack.ExtraCfnResources = extraStack.Resources
stack.ExtraCfnOutputs = extraStack.Outputs

extraEtcd, err := extras.Etcd()
extraEtcd, err := extras.Etcd(conf)
if err != nil {
return fmt.Errorf("failed to load etcd node extras from plugins: %v", err)
}
Expand Down
Loading

0 comments on commit f073d3d

Please sign in to comment.