Skip to content

Commit

Permalink
Merge pull request ksctl#364 from ksctl/make-vm-default-timezone-utc
Browse files Browse the repository at this point in the history
feat: added UTC timezone for all the VM in their init script
  • Loading branch information
dipankardas011 authored May 25, 2024
2 parents 6e690a7 + aaa309d commit 598837c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/cloudproviders/aws/awsgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ func (awsclient *AwsGoClient) setRequiredENVVAR(storage ksctlTypes.StorageFactor
msg = msg + " AWS_SECRET_ACCESS_KEY"
}

log.Warn(awsCtx, msg)
log.Note(awsCtx, msg)

credentials, err := storage.ReadCredentials(consts.CloudAws)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/cloudproviders/azure/azurego.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func (obj *AzureGoClient) setRequiredENV_VAR(storage types.StorageFactory, ctx c
msg = msg + " AZURE_CLIENT_SECRET"
}

log.Warn(azureCtx, msg)
log.Note(azureCtx, msg)

credentials, err := storage.ReadCredentials(consts.CloudAzure)
if err != nil {
Expand Down
5 changes: 3 additions & 2 deletions internal/cloudproviders/civo/helper.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package civo

import (
storageTypes "github.com/ksctl/ksctl/pkg/types/storage"
"os"

storageTypes "github.com/ksctl/ksctl/pkg/types/storage"

"github.com/ksctl/ksctl/pkg/helpers/consts"
"github.com/ksctl/ksctl/pkg/types"
)
Expand All @@ -15,7 +16,7 @@ func fetchAPIKey(storage types.StorageFactory) string {
if civoToken != "" {
return civoToken
}
log.Warn(civoCtx, "environment vars not set: `CIVO_TOKEN`")
log.Note(civoCtx, "environment vars not set: `CIVO_TOKEN`")

credentials, err := storage.ReadCredentials(consts.CloudCivo)
if err != nil {
Expand Down
5 changes: 5 additions & 0 deletions pkg/helpers/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,10 @@ func GenerateInitScriptForVM(resName string) (string, error) {
}
return fmt.Sprintf(`#!/bin/bash
sudo hostname %s-%s
sudo cp /etc/localtime /etc/localtime.backup
sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime
`, resName, postfixStr), nil
}

0 comments on commit 598837c

Please sign in to comment.