Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
chore: remove commented out code
Browse files Browse the repository at this point in the history
Signed-off-by: Abdullah Mobeen <[email protected]>
  • Loading branch information
aybidi committed Mar 20, 2023
1 parent 5cc5cce commit b528e3d
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions go/tasks/plugins/k8s/ray/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,6 @@ import (

//go:generate pflags Config --default-var=defaultConfig

// type ClusterConfig struct {
// Name string `json:"name" pflag:",Friendly name of the remote cluster"`
// Endpoint string `json:"endpoint" pflag:", Remote K8s cluster endpoint"`
// Auth Auth `json:"auth" pflag:"-, Auth setting for the cluster"`
// Enabled bool `json:"enabled" pflag:", Boolean flag to enable or disable"`
// }

// type Auth struct {
// TokenPath string `json:"tokenPath" pflag:", Token path"`
// CaCertPath string `json:"caCertPath" pflag:", Certificate path"`
// }

// func (auth Auth) GetCA() ([]byte, error) {
// cert, err := ioutil.ReadFile(auth.CaCertPath)
// if err != nil {
// return nil, errors.Wrap(err, "failed to read k8s CA cert from configured path")
// }
// return cert, nil
// }

// func (auth Auth) GetToken() (string, error) {
// token, err := ioutil.ReadFile(auth.TokenPath)
// if err != nil {
// return "", errors.Wrap(err, "failed to read k8s bearer token from configured path")
// }
// return string(token), nil
// }

// // KubeClientConfig ...
// func KubeClientConfig(host string, auth Auth) (*restclient.Config, error) {
// tokenString, err := auth.GetToken()
// if err != nil {
// return nil, errors.New(fmt.Sprintf("Failed to get auth token: %+v", err))
// }

// caCert, err := auth.GetCA()
// if err != nil {
// return nil, errors.New(fmt.Sprintf("Failed to get auth CA: %+v", err))
// }

// tlsClientConfig := restclient.TLSClientConfig{}
// tlsClientConfig.CAData = caCert
// return &restclient.Config{
// Host: host,
// TLSClientConfig: tlsClientConfig,
// BearerToken: tokenString,
// }, nil
// }

var (
defaultConfig = Config{
ShutdownAfterJobFinishes: true,
Expand Down

0 comments on commit b528e3d

Please sign in to comment.