Skip to content

Commit

Permalink
Remove vsphere cloud provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Markus With committed May 25, 2020
1 parent 1698069 commit 4181230
Show file tree
Hide file tree
Showing 215 changed files with 72 additions and 106,656 deletions.
28 changes: 1 addition & 27 deletions Makefile
Expand Up @@ -50,7 +50,7 @@ UPLOAD_CMD=$(KOPS_ROOT)/hack/upload
# Unexport environment variables that can affect tests and are not used in builds
unexport AWS_ACCESS_KEY_ID AWS_REGION AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN CNI_VERSION_URL DNS_IGNORE_NS_CHECK DNSCONTROLLER_IMAGE DO_ACCESS_TOKEN GOOGLE_APPLICATION_CREDENTIALS
unexport KOPS_BASE_URL KOPS_CLUSTER_NAME KOPS_RUN_OBSOLETE_VERSION KOPS_STATE_STORE KOPS_STATE_S3_ACL KUBE_API_VERSIONS NODEUP_URL OPENSTACK_CREDENTIAL_FILE PROTOKUBE_IMAGE SKIP_PACKAGE_UPDATE
unexport SKIP_REGION_CHECK S3_ACCESS_KEY_ID S3_ENDPOINT S3_REGION S3_SECRET_ACCESS_KEY VSPHERE_USERNAME VSPHERE_PASSWORD
unexport SKIP_REGION_CHECK S3_ACCESS_KEY_ID S3_ENDPOINT S3_REGION S3_SECRET_ACCESS_KEY

# Keep in sync with upup/models/cloudup/resources/addons/dns-controller/
DNS_CONTROLLER_TAG=1.18.0-alpha.3
Expand Down Expand Up @@ -291,32 +291,6 @@ version-dist: nodeup-dist kops-dist protokube-export utils-dist
cp ${DIST}/linux/amd64/utils.tar.gz.sha1 ${UPLOAD}/kops/${VERSION}/linux/amd64/utils.tar.gz.sha1
cp ${DIST}/linux/amd64/utils.tar.gz.sha256 ${UPLOAD}/kops/${VERSION}/linux/amd64/utils.tar.gz.sha256

.PHONY: vsphere-version-dist
vsphere-version-dist: nodeup-dist protokube-export
rm -rf ${UPLOAD}
mkdir -p ${UPLOAD}/kops/${VERSION}/linux/amd64/
mkdir -p ${UPLOAD}/kops/${VERSION}/darwin/amd64/
mkdir -p ${UPLOAD}/kops/${VERSION}/images/
mkdir -p ${UPLOAD}/utils/${VERSION}/linux/amd64/
cp ${DIST}/nodeup ${UPLOAD}/kops/${VERSION}/linux/amd64/nodeup
cp ${DIST}/nodeup.sha1 ${UPLOAD}/kops/${VERSION}/linux/amd64/nodeup.sha1
cp ${DIST}/nodeup.sha256 ${UPLOAD}/kops/${VERSION}/linux/amd64/nodeup.sha256
cp ${IMAGES}/protokube.tar.gz ${UPLOAD}/kops/${VERSION}/images/protokube.tar.gz
cp ${IMAGES}/protokube.tar.gz.sha1 ${UPLOAD}/kops/${VERSION}/images/protokube.tar.gz.sha1
cp ${IMAGES}/protokube.tar.gz.sha256 ${UPLOAD}/kops/${VERSION}/images/protokube.tar.gz.sha256
scp -r .build/dist/nodeup* ${TARGET}:${TARGET_PATH}/nodeup
scp -r .build/dist/images/protokube.tar.gz* ${TARGET}:${TARGET_PATH}/protokube/
make kops-dist
cp ${DIST}/linux/amd64/kops ${UPLOAD}/kops/${VERSION}/linux/amd64/kops
cp ${DIST}/linux/amd64/kops.sha1 ${UPLOAD}/kops/${VERSION}/linux/amd64/kops.sha1
cp ${DIST}/linux/amd64/kops.sha256 ${UPLOAD}/kops/${VERSION}/linux/amd64/kops.sha256
cp ${DIST}/darwin/amd64/kops ${UPLOAD}/kops/${VERSION}/darwin/amd64/kops
cp ${DIST}/darwin/amd64/kops.sha1 ${UPLOAD}/kops/${VERSION}/darwin/amd64/kops.sha1
cp ${DIST}/darwin/amd64/kops.sha256 ${UPLOAD}/kops/${VERSION}/darwin/amd64/kops.sha256
cp ${DIST}/windows/amd64/kops.exe ${UPLOAD}/kops/${VERSION}/windows/amd64/kops.exe
cp ${DIST}/windows/amd64/kops.exe.sha1 ${UPLOAD}/kops/${VERSION}/windows/amd64/kops.exe.sha1
cp ${DIST}/windows/amd64/kops.exe.sha256 ${UPLOAD}/kops/${VERSION}/windows/amd64/kops.exe.sha256

.PHONY: upload
upload: version-dist # Upload kops to S3
aws s3 sync --acl public-read ${UPLOAD}/ ${S3_BUCKET}
Expand Down
56 changes: 1 addition & 55 deletions cmd/kops/create_cluster.go
Expand Up @@ -138,16 +138,6 @@ type CreateClusterOptions struct {
// Allow custom public master name
MasterPublicName string

// vSphere options
VSphereServer string
VSphereDatacenter string
VSphereResourcePool string
VSphereCoreDNSServer string
// Note: We need open-vm-tools to be installed for vSphere Cloud Provider to work
// We need VSphereDatastore to support Kubernetes vSphere Cloud Provider (v1.5.3)
// We can remove this once we support higher versions.
VSphereDatastore string

// Spotinst options
SpotinstProduct string
SpotinstOrientation string
Expand Down Expand Up @@ -299,7 +289,7 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command {
cmd.Flags().StringVar(&options.ConfigBase, "config-base", options.ConfigBase, "A cluster-readable location where we mirror configuration information, separate from the state store. Allows for a state store that is not accessible from the cluster.")
}

cmd.Flags().StringVar(&options.Cloud, "cloud", options.Cloud, "Cloud provider to use - gce, aws, vsphere, openstack")
cmd.Flags().StringVar(&options.Cloud, "cloud", options.Cloud, "Cloud provider to use - gce, aws, openstack")

cmd.Flags().StringSliceVar(&options.Zones, "zones", options.Zones, "Zones in which to run the cluster")
cmd.Flags().StringSliceVar(&options.MasterZones, "master-zones", options.MasterZones, "Zones in which to run masters (must be an odd number)")
Expand Down Expand Up @@ -382,15 +372,6 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command {
cmd.Flags().StringVar(&options.Project, "project", options.Project, "Project to use (must be set on GCE)")
cmd.Flags().StringVar(&options.GCEServiceAccount, "gce-service-account", options.GCEServiceAccount, "Service account with which the GCE VM runs. Warning: if not set, VMs will run as default compute service account.")

if featureflag.VSphereCloudProvider.Enabled() {
// vSphere flags
cmd.Flags().StringVar(&options.VSphereServer, "vsphere-server", options.VSphereServer, "vsphere-server is required for vSphere. Set vCenter URL Ex: 10.192.10.30 or myvcenter.io (without https://)")
cmd.Flags().StringVar(&options.VSphereDatacenter, "vsphere-datacenter", options.VSphereDatacenter, "vsphere-datacenter is required for vSphere. Set the name of the datacenter in which to deploy Kubernetes VMs.")
cmd.Flags().StringVar(&options.VSphereResourcePool, "vsphere-resource-pool", options.VSphereDatacenter, "vsphere-resource-pool is required for vSphere. Set a valid Cluster, Host or Resource Pool in which to deploy Kubernetes VMs.")
cmd.Flags().StringVar(&options.VSphereCoreDNSServer, "vsphere-coredns-server", options.VSphereCoreDNSServer, "vsphere-coredns-server is required for vSphere.")
cmd.Flags().StringVar(&options.VSphereDatastore, "vsphere-datastore", options.VSphereDatastore, "vsphere-datastore is required for vSphere. Set a valid datastore in which to store dynamic provision volumes.")
}

if featureflag.Spotinst.Enabled() {
// Spotinst flags
cmd.Flags().StringVar(&options.SpotinstProduct, "spotinst-product", options.SpotinstProduct, "Set the product description (valid values: Linux/UNIX, Linux/UNIX (Amazon VPC), Windows and Windows (Amazon VPC))")
Expand Down Expand Up @@ -933,41 +914,6 @@ func RunCreateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Cr
}

if c.Cloud != "" {
if c.Cloud == "vsphere" {
if !featureflag.VSphereCloudProvider.Enabled() {
return fmt.Errorf("Feature flag VSphereCloudProvider is not set. Cloud vSphere will not be supported.")
}

if cluster.Spec.CloudConfig == nil {
cluster.Spec.CloudConfig = &api.CloudConfiguration{}
}

if c.VSphereServer == "" {
return fmt.Errorf("vsphere-server is required for vSphere. Set vCenter URL Ex: 10.192.10.30 or myvcenter.io (without https://)")
}
cluster.Spec.CloudConfig.VSphereServer = fi.String(c.VSphereServer)

if c.VSphereDatacenter == "" {
return fmt.Errorf("vsphere-datacenter is required for vSphere. Set the name of the datacenter in which to deploy Kubernetes VMs.")
}
cluster.Spec.CloudConfig.VSphereDatacenter = fi.String(c.VSphereDatacenter)

if c.VSphereResourcePool == "" {
return fmt.Errorf("vsphere-resource-pool is required for vSphere. Set a valid Cluster, Host or Resource Pool in which to deploy Kubernetes VMs.")
}
cluster.Spec.CloudConfig.VSphereResourcePool = fi.String(c.VSphereResourcePool)

if c.VSphereCoreDNSServer == "" {
return fmt.Errorf("A coredns server is required for vSphere.")
}
cluster.Spec.CloudConfig.VSphereCoreDNSServer = fi.String(c.VSphereCoreDNSServer)

if c.VSphereDatastore == "" {
return fmt.Errorf("vsphere-datastore is required for vSphere. Set a valid datastore in which to store dynamic provision volumes.")
}
cluster.Spec.CloudConfig.VSphereDatastore = fi.String(c.VSphereDatastore)
}

if featureflag.Spotinst.Enabled() {
if cluster.Spec.CloudConfig == nil {
cluster.Spec.CloudConfig = &api.CloudConfiguration{}
Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/root.go
Expand Up @@ -58,7 +58,7 @@ var (
kops helps you create, destroy, upgrade and maintain production-grade, highly available,
Kubernetes clusters from the command line. AWS (Amazon Web Services) is currently
officially supported, with GCE and VMware vSphere in alpha support.
officially supported, with GCE and OpenStack in beta support.
`))

rootShort = i18n.T(`kops is Kubernetes ops.`)
Expand Down
3 changes: 0 additions & 3 deletions docs/README.md
Expand Up @@ -71,8 +71,6 @@ For a better viewing experience please check out our live documentation site at
* [Moving from a Single Master to Multiple HA Masters](single-to-multi-master.md)
* [Upgrading Kubernetes](tutorial/upgrading-kubernetes.md)
* [Working with Instance Groups](tutorial/working-with-instancegroups.md)
* [Developers guide for vSphere support](vsphere-dev.md)
* [vSphere support status](vsphere-development-status.md)
* [Running `kops` in a CI environment](continuous_integration.md)

## Networking
Expand Down Expand Up @@ -110,7 +108,6 @@ For a better viewing experience please check out our live documentation site at
## Development

* [Developing using Docker](development/Docker.md)
* [Development with vSphere](vsphere-dev.md)
* [Documentation Guidelines](development/documentation.md)
* [E2E testing with `kops` clusters](development/testing.md)
* [Example on how to add a feature](development/adding_a_feature.md)
Expand Down
1 change: 0 additions & 1 deletion docs/advanced/experimental.md
Expand Up @@ -6,7 +6,6 @@ Enable experimental features with:

The following experimental features are currently available:

* `+VSphereCloudProvider` - Enable vSphere cloud provider.
* `+EnableExternalDNS` - Enable external-dns with default settings (ingress sources only).
* `+EnableLaunchTemplates` - Enable using launch templates rather than launchconfigurations (AWS only)
* `+VPCSkipEnableDNSSupport` - Enables creation of a VPC that does not need DNSSupport enabled.
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops.md
Expand Up @@ -11,7 +11,7 @@ kops is Kubernetes ops.

kops is the easiest way to get a production grade Kubernetes cluster up and running. We like to think of it as kubectl for clusters.

kops helps you create, destroy, upgrade and maintain production-grade, highly available, Kubernetes clusters from the command line. AWS (Amazon Web Services) is currently officially supported, with GCE and VMware vSphere in alpha support.
kops helps you create, destroy, upgrade and maintain production-grade, highly available, Kubernetes clusters from the command line. AWS (Amazon Web Services) is currently officially supported, with GCE and OpenStack in beta support.

### Options

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_create_cluster.md
Expand Up @@ -72,7 +72,7 @@ kops create cluster [flags]
--authorization string Authorization mode to use: AlwaysAllow or RBAC (default "RBAC")
--bastion Pass the --bastion flag to enable a bastion instance group. Only applies to private topology.
--channel string Channel for default versions and configuration to use (default "stable")
--cloud string Cloud provider to use - gce, aws, vsphere, openstack
--cloud string Cloud provider to use - gce, aws, openstack
--cloud-labels string A list of KV pairs used to tag all instance groups in AWS (e.g. "Owner=John Doe,Team=Some Team").
--container-runtime string Container runtime to use: containerd, docker (default "docker")
--disable-subnet-tags Set to disable automatic subnet tagging
Expand Down
3 changes: 1 addition & 2 deletions docs/index.md
Expand Up @@ -21,8 +21,7 @@ We like to think of it as `kubectl` for clusters.

`kops` helps you create, destroy, upgrade and maintain production-grade, highly
available, Kubernetes clusters from the command line. AWS (Amazon Web Services)
is currently officially supported, with GCE and OpenStack in beta support, and VMware vSphere
in alpha, and other platforms planned.
is currently officially supported, with GCE and OpenStack in beta support, and other platforms planned.

## Can I see it in action?

Expand Down

0 comments on commit 4181230

Please sign in to comment.