Skip to content

Commit

Permalink
Trim space for all values in backup secret in order to pass the longh…
Browse files Browse the repository at this point in the history
…orn webhook

Signed-off-by: futuretea <Hang.Yu@suse.com>
  • Loading branch information
futuretea committed Aug 17, 2023
1 parent a58ac82 commit 04c258b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controller/master/backup/backup_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ func getBackupSecretData(target *settings.BackupTarget) (map[string]string, erro
data[util.HTTPSProxyEnv] = httpProxyConfig.HTTPSProxy
data[util.NoProxyEnv] = util.AddBuiltInNoProxy(httpProxyConfig.NoProxy)

// trim spaces for all values in order to pass the Longhorn webhook, refer to https://github.com/longhorn/longhorn-manager/pull/970
for k, v := range data {
data[k] = strings.TrimSpace(v)
}

return data, nil
}

Expand Down

0 comments on commit 04c258b

Please sign in to comment.