mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 00:19:36 -05:00
26e9c67a00
Decouples cloud provider metadata packages from kubernetes related code Signed-off-by: Malte Poll <mp@edgeless.systems>
21 lines
384 B
Go
21 lines
384 B
Go
package gcp
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/afero"
|
|
)
|
|
|
|
// Writer implements ConfigWriter.
|
|
type Writer struct {
|
|
fs afero.Afero
|
|
}
|
|
|
|
// WriteGCEConf persists the GCE config on disk.
|
|
func (w *Writer) WriteGCEConf(config string) error {
|
|
if err := w.fs.WriteFile("/etc/gce.conf", []byte(config), 0o644); err != nil {
|
|
return fmt.Errorf("writing gce config: %w", err)
|
|
}
|
|
return nil
|
|
}
|