mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-11-29 07:56:47 -05:00
Create Kubernetes clients from bytes instead of filepath (#2663)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
4d6a7fa759
commit
a9cc9d8bbc
9 changed files with 94 additions and 33 deletions
|
|
@ -61,12 +61,12 @@ type Client struct {
|
|||
}
|
||||
|
||||
// NewClient returns a new Helm client.
|
||||
func NewClient(kubeConfigPath string, log debugLog) (*Client, error) {
|
||||
kubeClient, err := kubectl.NewFromConfig(kubeConfigPath)
|
||||
func NewClient(kubeConfig []byte, log debugLog) (*Client, error) {
|
||||
kubeClient, err := kubectl.NewFromConfig(kubeConfig)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("initializing kubectl: %w", err)
|
||||
}
|
||||
actionConfig, err := newActionConfig(kubeConfigPath, log)
|
||||
actionConfig, err := newActionConfig(kubeConfig, log)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("creating action config: %w", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue