Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
platform/kvmlibvirt: add charts to be installed
Browse files Browse the repository at this point in the history
This commit adds the control plane charts that need to be installed once
the bootstrap control plane is running.

Signed-off-by: Imran Pochi <imran@kinvolk.io>
  • Loading branch information
ipochi committed Oct 21, 2020
1 parent 9b28bd4 commit 08a65cb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pkg/platform/kvmlibvirt/kvmlibvirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,28 @@ func (c *config) Initialize(ex *terraform.Executor) error {
return err
}

// TODO: A transient change which shall be reverted in a follow up PR to handle
// https://github.com/kinvolk/lokomotive/issues/716.
// Extract control plane chart files to cluster assets directory.
for _, c := range platform.CommonControlPlaneCharts() {
src := filepath.Join(assets.ControlPlaneSource, c.Name)
dst := filepath.Join(assetDir, "cluster-assets", "charts", c.Namespace, c.Name)
if err := assets.Extract(src, dst); err != nil {
return fmt.Errorf("extracting charts: %w", err)
}
}

// TODO: A transient change which shall be reverted in a follow up PR to handle
// https://github.com/kinvolk/lokomotive/issues/716.
// Extract self-hosted kubelet chart only when enabled in config.
if !c.DisableSelfHostedKubelet {
src := filepath.Join(assets.ControlPlaneSource, "kubelet")
dst := filepath.Join(assetDir, "cluster-assets", "charts", "kube-system", "kubelet")
if err := assets.Extract(src, dst); err != nil {
return fmt.Errorf("extracting kubelet chart: %w", err)
}
}

terraformRootDir := terraform.GetTerraformRootDir(assetDir)

return createTerraformConfigFile(c, terraformRootDir)
Expand Down

0 comments on commit 08a65cb

Please sign in to comment.