Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions chaoslib/litmus/node-restart/lib/node-restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import (
var err error

const (
secretName string = "id-rsa"
// We will add provision to pass secretName as env var
// secretName string = "id-rsa"
privateKeyMount string = "/mnt"
privateKeyPath string = "/mnt/ssh-privatekey"
emptyDirMount string = "/data"
Expand Down Expand Up @@ -172,7 +173,7 @@ func createHelperPod(ctx context.Context, experimentsDetails *experimentTypes.Ex
Name: privateKeySecret + experimentsDetails.RunID,
VolumeSource: apiv1.VolumeSource{
Secret: &apiv1.SecretVolumeSource{
SecretName: secretName,
SecretName: experimentsDetails.SSHSecretName,
},
},
},
Expand Down
1 change: 1 addition & 0 deletions pkg/generic/node-restart/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func GetENV(experimentDetails *experimentTypes.ExperimentDetails) {
experimentDetails.NodeLabel = types.Getenv("NODE_LABEL", "")
experimentDetails.TerminationGracePeriodSeconds, _ = strconv.Atoi(types.Getenv("TERMINATION_GRACE_PERIOD_SECONDS", ""))
experimentDetails.SetHelperData = types.Getenv("SET_HELPER_DATA", "true")
experimentDetails.SSHSecretName = types.Getenv("SSH_SECRET_NAME", "id-rsa")
experimentDetails.AppNS, experimentDetails.AppKind, experimentDetails.AppLabel = getAppDetails()
}

Expand Down
1 change: 1 addition & 0 deletions pkg/generic/node-restart/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ type ExperimentDetails struct {
TargetContainer string
NodeLabel string
SetHelperData string
SSHSecretName string
}