mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 06:16:08 -04: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
|
@ -47,7 +47,12 @@ func runStatus(cmd *cobra.Command, _ []string) error {
|
|||
|
||||
fileHandler := file.NewHandler(afero.NewOsFs())
|
||||
|
||||
helmClient, err := helm.NewReleaseVersionClient(constants.AdminConfFilename, log)
|
||||
kubeConfig, err := fileHandler.Read(constants.AdminConfFilename)
|
||||
if err != nil {
|
||||
return fmt.Errorf("reading kubeconfig: %w", err)
|
||||
}
|
||||
|
||||
helmClient, err := helm.NewReleaseVersionClient(kubeConfig, log)
|
||||
if err != nil {
|
||||
return fmt.Errorf("setting up helm client: %w", err)
|
||||
}
|
||||
|
@ -56,7 +61,7 @@ func runStatus(cmd *cobra.Command, _ []string) error {
|
|||
}
|
||||
|
||||
fetcher := attestationconfigapi.NewFetcher()
|
||||
kubeClient, err := kubecmd.New(cmd.OutOrStdout(), constants.AdminConfFilename, fileHandler, log)
|
||||
kubeClient, err := kubecmd.New(cmd.OutOrStdout(), kubeConfig, fileHandler, log)
|
||||
if err != nil {
|
||||
return fmt.Errorf("setting up kubernetes client: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue