No description
  • Go 98.9%
  • Dockerfile 1.1%
Find a file
2019-01-29 10:49:17 +00:00
build v0.0.4 2019-01-18 22:29:49 +00:00
cmd/manager INITIAL COMMIT 2019-01-18 10:36:20 +00:00
deploy Added future work 2019-01-29 10:49:17 +00:00
pkg Updated CRD with status subresource, controller status updating and Readme 2019-01-18 22:12:46 +00:00
vendor INITIAL COMMIT 2019-01-18 10:36:20 +00:00
version INITIAL COMMIT 2019-01-18 10:36:20 +00:00
.gitignore Added bin and updated copy command 2019-01-18 20:02:25 +00:00
Gopkg.lock INITIAL COMMIT 2019-01-18 10:36:20 +00:00
Gopkg.toml INITIAL COMMIT 2019-01-18 10:36:20 +00:00
README.md Added future work 2019-01-29 10:49:17 +00:00

Bridging Infrastructure and Applications (BIA) - vSphereCompute

A very rough K8s operator and CRD scheme for creating and deleting vSphere compute types (VMs).

Setup

Config

Requires Kubernetes 1.13+

Update the value field for the following in deploy/operator.yaml to reflect your environment:

- name: GOVC_URL
  value: "https://username:password@vCenterFQDNorIP"

Import the vSphereCompute CRDs

kubectl create -f deploy/crds/bia_v1alpha1_vspherecompute_crd.yaml

Import the operator

kubectl create -f deploy/

Usage

Create a vSphereCompute object reflecting the VM(s) you want created, an example can be found at deploy/crds/bia_v1alpha1_vspherecompute_cr.yaml

Import the vSphereCompute object into K8s:

kubectl create -f deploy/crds/bia_v1alpha1_vspherecompute_cr.yaml

A VM will be spun up on the environment as specified in deploy/operator.yaml.

Get the current BIA deployed and managed VMs

$ kubectl get vc
NAME          VMNAME        STATUS      CPUS   MEMORY   IP    HOST
hello-world   hello-world   poweredOn   2      2048           host-28

Cleanup

kubectl delete -f deploy/crds/
kubectl delete -f deploy/

Known Issues

  • Lots of hard coded values. Tons.
  • Uses a hammer-solution of govc instead of govmomi to interact with VC via os.exec
  • Doesn't use the VMware VCP settings set on the cluster - relies on it's own ENV vars
  • Only CPU, Memory and VMName implemented from CR spec so far.
  • Doesnt resolve VC moref-ids to human-relatable names.
  • Does not update VMs with patched changes.
  • Likely uses the wrong call for deleting VMs.

Future work

  • Deploy nodes with Cluster API?
  • FCD and SPBM policy
  • Create a network and use Cluster API to bootstrap.