Skip to content

Commit

Permalink
Delete vsphere-deployer, tf-deployer. Add deprecation note on
Browse files Browse the repository at this point in the history
gcp-deployer
  • Loading branch information
karan committed Jun 6, 2018
1 parent 6aecf9c commit 7e94409
Show file tree
Hide file tree
Showing 32 changed files with 4 additions and 2,773 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You can find an example implementation for GCE [here](https://github.com/kuberne

##### GCE Implementation

For GCE, a [yaml file](https://github.com/kubernetes-sigs/cluster-api/blob/master/gcp-deployer/machine_setup_configs.yaml) holds the list of valid machine setup configs,
For GCE, a [config map](https://github.com/kubernetes-sigs/cluster-api/blob/6aecf9c80a1ca29b45cb43ebfd50ac0d57eb7132/clusterctl/examples/google/provider-components.yaml.template#L118) holds the list of valid machine setup configs,
and the yaml file is volume mounted into the machine controller using a ConfigMap named `machine-setup`.

A [config type](https://github.com/kubernetes-sigs/cluster-api/blob/master/cloud/google/machinesetup/config_types.go#L45) defines a set of parameters that can be taken from the machine object being created, and maps those parameters to startup scripts and other relevant information.
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ To learn more, see the [Cluster API KEP][cluster-api-kep].
## Getting Started
### Prerequisites
* `kubectl` is required, see [here](http://kubernetes.io/docs/user-guide/prereqs/).

### Prototype implementations
* [gcp](gcp-deployer/README.md)

* `clusterctl` is a SIG-cluster-lifecycle sponsored tool to manage Cluster API clusters. See [here](clusterctl)

## How to use the API

To see how to build tooling on top of the Cluster API, please check out a few examples below:
Expand Down
73 changes: 0 additions & 73 deletions cloud/vsphere/machineactuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@ import (

"github.com/golang/glog"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer"

"encoding/base64"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"sigs.k8s.io/cluster-api/cloud/vsphere/namedmachines"
vsphereconfig "sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig"
vsphereconfigv1 "sigs.k8s.io/cluster-api/cloud/vsphere/vsphereproviderconfig/v1alpha1"
Expand Down Expand Up @@ -94,40 +91,6 @@ func NewMachineActuator(kubeadmToken string, machineClient client.MachineInterfa
}, nil
}

// DEPRECATED: Remove when vsphere-deployer is deleted.
func (vc *VsphereClient) CreateMachineController(cluster *clusterv1.Cluster, initialMachines []*clusterv1.Machine, clientSet kubernetes.Clientset) error {
if err := CreateExtApiServerRoleBinding(); err != nil {
return err
}

// Create the named machines ConfigMap.
// After pivot-based bootstrap is done, the named machine should be a ConfigMap and this logic will be removed.
namedMachines, err := vc.namedMachineWatch.NamedMachines()

if err != nil {
return err
}
yaml, err := namedMachines.GetYaml()
if err != nil {
return err
}
nmConfigMap := corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{Name: "named-machines"},
Data: map[string]string{
NamedMachinesFilename: yaml,
},
}
configMaps := clientSet.CoreV1().ConfigMaps(corev1.NamespaceDefault)
if _, err := configMaps.Create(&nmConfigMap); err != nil {
return err
}

if err := CreateApiServerAndController(vc.kubeadmToken); err != nil {
return err
}
return nil
}

func saveFile(contents, path string, perm os.FileMode) error {
return ioutil.WriteFile(path, []byte(contents), perm)
}
Expand Down Expand Up @@ -669,42 +632,6 @@ func (vc *VsphereClient) GetKubeConfig(master *clusterv1.Machine) (string, error
return result, nil
}

// DEPRECATED. Remove after vsphere-deployer is deleted.
// This method exists because during bootstrap some artifacts need to be transferred to the
// remote master. These include the IP address for the master, terraform state file.
// In GCE, we set this kind of data as GCE metadata. Unfortunately, vSphere does not have
// a comparable API.
func (vc *VsphereClient) SetupRemoteMaster(master *clusterv1.Machine) error {
machineName := master.ObjectMeta.Name
glog.Infof("Setting up the remote master[%s] with terraform config.", machineName)

ip, err := vc.GetIP(master)
if err != nil {
return err
}

glog.Infof("Copying the staging directory to master.")
machinePath := fmt.Sprintf(MachinePathStageFormat, machineName)
_, err = vc.remoteSshCommand(master, fmt.Sprintf("mkdir -p %s", machinePath), "~/.ssh/vsphere_tmp", "ubuntu")
if err != nil {
glog.Infof("remoteSshCommand failed while creating remote machine stage: %+v", err)
return err
}

cmd := exec.Command(
"scp", "-i", "~/.ssh/vsphere_tmp",
"-o", "StrictHostKeyChecking=no",
"-o", "UserKnownHostsFile=/dev/null",
"-r",
machinePath,
fmt.Sprintf("ubuntu@%s:%s", ip, StageDir))
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run()

return nil
}

// We are storing these as annotations and not in Machine Status because that's intended for
// "Provider-specific status" that will usually be used to detect updates. Additionally,
// Status requires yet another version API resource which is too heavy to store IP and TF state.
Expand Down
2 changes: 1 addition & 1 deletion clusterctl/main_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func setupPrerequisites() error {
}
err = cleanAndBuildClusterctl()
if err != nil {
return fmt.Errorf("unable to build gcp-deployer: %v", err)
return fmt.Errorf("unable to build clusterctl: %v", err)
}
return nil
}
Expand Down
2 changes: 0 additions & 2 deletions tf-deployer/.gitignore

This file was deleted.

136 changes: 0 additions & 136 deletions tf-deployer/CONTRIBUTING.md

This file was deleted.

82 changes: 0 additions & 82 deletions tf-deployer/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions tf-deployer/cluster.yaml

This file was deleted.

Loading

0 comments on commit 7e94409

Please sign in to comment.