Skip to content

Commit

Permalink
Chage logsDirectory to containerLogsDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekjarosik committed Nov 28, 2024
1 parent 2b68f7c commit b192ed3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tailored to their specific macOS deployment needs.
```yaml
nodeName: mac-m1
kubeConfigPath: /Users/your_username/.kube/config
logsDirectory: /var/logs/fugaci
containerLogsDirectory: /var/logs/fugaci
curieVirtualization:
binaryPath: /usr/local/bin/curie
dataRootPath: /Users/your_username/.curie
Expand Down
22 changes: 11 additions & 11 deletions pkg/fugaci/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
)

type Config struct {
NodeName string `mapstructure:"nodeName"`
KubeConfigPath string `mapstructure:"kubeConfigPath"`
LogLevel string `mapstructure:"logLevel"`
LogsDirectory string `mapstructure:"logsDirectory"`
CurieVirtualization struct {
NodeName string `mapstructure:"nodeName"`
KubeConfigPath string `mapstructure:"kubeConfigPath"`
LogLevel string `mapstructure:"logLevel"`
ContainerLogsDirectory string `mapstructure:"containerLogsDirectory"`
CurieVirtualization struct {
BinaryPath string `mapstructure:"binaryPath"`
DataRootPath string `mapstructure:"dataRootPath"`
} `mapstructure:"curieVirtualization"`
Expand All @@ -36,12 +36,12 @@ func (c *Config) Validate() error {

// Validate the paths
paths := map[string]string{
"KubeConfigPath": c.KubeConfigPath,
"CurieBinaryPath": c.CurieVirtualization.BinaryPath,
"CurieDataRootPath": c.CurieVirtualization.DataRootPath,
"LogsDirectory": c.LogsDirectory,
"TLS.KeyPath": c.TLS.KeyPath,
"TLS.CertPath": c.TLS.CertPath,
"KubeConfigPath": c.KubeConfigPath,
"CurieBinaryPath": c.CurieVirtualization.BinaryPath,
"CurieDataRootPath": c.CurieVirtualization.DataRootPath,
"ContainerLogsDirectory": c.ContainerLogsDirectory,
"TLS.KeyPath": c.TLS.KeyPath,
"TLS.CertPath": c.TLS.CertPath,
}

for name, path := range paths {
Expand Down
2 changes: 1 addition & 1 deletion pkg/fugaci/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *Provider) allocateVM(pod *v1.Pod) (*VM, error) {
}
vm, err := NewVM(s.appContext, s.virt, s.puller,
sshrunner.NewRunner(), portforwarder.NewPortForwarder(),
s.cfg.LogsDirectory,
s.cfg.ContainerLogsDirectory,
pod, 0)
if err != nil {
return nil, err
Expand Down

0 comments on commit b192ed3

Please sign in to comment.