Merge "Integrate clusterctl client into phases"
This commit is contained in:
commit
f50998935e
@ -22,6 +22,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
|
||||||
"opendev.org/airship/airshipctl/pkg/api/v1alpha1"
|
"opendev.org/airship/airshipctl/pkg/api/v1alpha1"
|
||||||
|
cctlclient "opendev.org/airship/airshipctl/pkg/clusterctl/client"
|
||||||
"opendev.org/airship/airshipctl/pkg/document"
|
"opendev.org/airship/airshipctl/pkg/document"
|
||||||
"opendev.org/airship/airshipctl/pkg/events"
|
"opendev.org/airship/airshipctl/pkg/events"
|
||||||
"opendev.org/airship/airshipctl/pkg/k8s/kubeconfig"
|
"opendev.org/airship/airshipctl/pkg/k8s/kubeconfig"
|
||||||
@ -89,12 +90,22 @@ func (p *phase) Executor() (ifc.Executor, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cctlClient, err := cctlclient.NewClient(
|
||||||
|
p.helper.PhaseBundleRoot(),
|
||||||
|
log.DebugEnabled(),
|
||||||
|
v1alpha1.DefaultClusterctl())
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
kubeconf := kubeconfig.NewBuilder().
|
kubeconf := kubeconfig.NewBuilder().
|
||||||
WithBundle(p.helper.PhaseBundleRoot()).
|
WithBundle(p.helper.PhaseBundleRoot()).
|
||||||
WithClusterMap(cMap).
|
WithClusterMap(cMap).
|
||||||
WithClusterName(p.apiObj.ClusterName).
|
WithClusterName(p.apiObj.ClusterName).
|
||||||
WithPath(p.kubeconfig).
|
WithPath(p.kubeconfig).
|
||||||
WithTempRoot(wd).
|
WithTempRoot(wd).
|
||||||
|
WithClusterctClient(cctlClient).
|
||||||
Build()
|
Build()
|
||||||
|
|
||||||
return executorFactory(
|
return executorFactory(
|
||||||
|
Loading…
Reference in New Issue
Block a user