Skip to content

Instantly share code, notes, and snippets.

@andrewsykim
Last active October 17, 2019 20:08
Show Gist options
  • Save andrewsykim/c25ae1064e5e1db2994686e59b6efab2 to your computer and use it in GitHub Desktop.
Save andrewsykim/c25ae1064e5e1db2994686e59b6efab2 to your computer and use it in GitHub Desktop.
CPI vs CSI Config

Comparing Cloud Config of CPI & CSI

This is a gist comparing config differences between vSphere CPI and CSI. The example configs here based on what is used in CAPV.

CPI

[Global]
insecure-flag = true
secret-name = cloud-provider-vsphere-credentials
secret-namespace = kube-system

[VirtualCenter "10.2.224.4"]
datacenters = SDDC-Datacenter

[Network]
public-network = sddc-cgw-network-3
    
# probably not necessary any more w/ CSI enabled
[Workspace]
server = 10.2.224.4
datacenter = SDDC-Datacenter
folder = Workloads
default-datastore = WorkloadDatastore
resourcepool-path = */Resources/Compute-ResourcePool/asykim-capv

CSI

[Global]
insecure-flag = true
cluster-id = default/management-cluster

[VirtualCenter "10.2.224.4"]
user = <redacted>
password = <redacted>
datacenters = SDDC-Datacenter

[Network]
public-network = sddc-cgw-network-3

What's missing in CPI

  • CPI needs to support cluster-id as needed by CSI, the value can be ignored in the CCM if needed

Config types can be found here.

What's missing in CSI?

  • CSI should support vCenter credentials in a Secret resource
  • vCenter certificate thumbprint?
  • vCenter custom CA?
  • IPFamily? -- Will CSI ever care about IP family of nodes?

Config types can be found here

Initial set of shared configs that should work across both components:

Config 1

[Global]
insecure-flag = true
cluster-id = my-cluster

[VirtualCenter "10.2.224.4"]
user = <redacted>
password = <redacted>
datacenters = SDDC-Datacenter

[Network]
public-network = sddc-cgw-network-3

[Labels]
zone = <zone>
region = <region>

NOTE: Network must be parsed but can be ignored

Config 2

[Global]
cluster-id = my-cluster
insecure-flag = true
secret-name = cloud-provider-vsphere-credentials
secret-namespace = kube-system

[VirtualCenter "10.2.224.4"]
datacenters = SDDC-Datacenter

[Network]
public-network = sddc-cgw-network-3

[Labels]
zone = <zone>
region = <region>

Config 3

[Global]
insecure-flag = true
cluster-id = my-cluster

[VirtualCenter "10.2.224.4"]
user = <redacted>
password = <redacted>
datacenters = SDDC-Datacenter
ca-file = /path/to/ca/file
thumbprint = "<thumbprint"

[Network]
public-network = sddc-cgw-network-3

[Labels]
zone = <zone>
region = <region>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment