VsphereResources

This section describes the VsphereResources custom resource (CR) used in the Container Cloud API. The VsphereResources object contains the list of available vSphere resources such as resource pool, networks, folders, datastores and virtual machine templates.

For demonstration purposes, the Container Cloud VsphereResources CR can be split into the following sections:

Warning

The fields in this resource are available for viewing only. They are automatically generated by the vSphere cloud provider and must not be modified using the Container Cloud API.

metadata

The Container Cloud VsphereResources custom resource (CR) contains the following fields:

  • apiVersion

    Object API version that is kaas.mirantis.com/v1alpha1.

  • kind

    Object type that is VsphereResources.

The metadata object field of the VsphereResources resource contains the following fields:

  • name

    Name of the VsphereResources object

  • namespace

    Project in which the VsphereResources object is created

Configuration example:

apiVersion: kaas.mirantis.com/v1alpha1
kind: VsphereResources
metadata:
  name: cloud-config
  namespace: test

VsphereResources status

The status field of the VsphereResources object contains the list of available vSphere resources:

  • cloudProviderUser

    Resources available for the cloud provider (storage) user, for example, datastores

  • clusterApiUser

    Resources available for the virtual machine (cluster-api) user, for example:

    • datastores

      • isoFilePaths Available since 2.22.0

    • machineFolders

    • machineTemplates

    • networks

    • resourcePools

Note

Example configuration extract:

apiVersion: kaas.mirantis.com/v1alpha1
kind: VsphereResources
metadata:
  name: cloud-config
  namespace: default
status:
  <cloudProviderUser>:
    datastores:
    - name: <ds1>
      path: /DATACENTER/datastore/<ds1>
    ...
  <clusterApiUser>:
    datastoreFolders:
    - name: <dsFolder1>
      path: /DATACENTER/datastore/<dsFolder1>
    ...
    datastores:
    - name: <ds1>
      path: /DATACENTER/datastore/<ds1>
      isoFilePaths:
       - <folderName>/<isoFileName.iso>
    ...
    machineFolders:
    - name: <folder1>
      path: /DATACENTER/vm/<folder1>
    ...
    machineTemplates:
    - mccTemplate: <version>
      name: <template1>
      path: /DATACENTER/vm/<template1>
    ...
    networks:
    - name: <network1>
      path: /DATACENTER/network/<network1>
      type: DistributedVirtualPortgroup
    ...
    resourcePools:
    - name: <cluster-name>/Resources/<res-pool-name>
      path: /DATACENTER/host/<cluster-name>/Resources/<res-pool-name>
    ...