File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,9 @@ type Environment struct {
126
126
// loading.
127
127
Config * rest.Config
128
128
129
+ // KubeConfig provides []byte of a kubeconfig file to talk to the apiserver
130
+ KubeConfig []byte
131
+
129
132
// CRDInstallOptions are the options for installing CRDs.
130
133
CRDInstallOptions CRDInstallOptions
131
134
@@ -221,6 +224,10 @@ func (te *Environment) Start() (*rest.Config, error) {
221
224
if err != nil {
222
225
return nil , fmt .Errorf ("unable to get configuration for existing cluster: %w" , err )
223
226
}
227
+ te .KubeConfig , err = controlplane .KubeConfigFromREST (te .Config )
228
+ if err != nil {
229
+ return nil , fmt .Errorf ("unable to convert configuration to kubeconfig: %w" , err )
230
+ }
224
231
}
225
232
} else {
226
233
apiServer := te .ControlPlane .GetAPIServer ()
You can’t perform that action at this time.
0 commit comments