Platform infrastructure

Core infrastructure required by the platform is provisioned by a cloud-provider-specific module defined in /terraform/hosting_provider/main.tf.

The minimal set of parameters for the module includes:

  • cluster_name: K8s cluster name
  • region: Location of the cluster, e.g., region name for AWS, location for Azure, cloud-provider-specific
  • alert_emails: Email(s) that will be subscribed for alerts from cloud native monitoring
  • cluster_ssh_public_key: The SSH key used to access K8s nodes when possible, auto generated by CLI, cloud-provider-specific
  • tags: The default tags/labels applied to cloud resources; cloud-provider-specific
  • cluster_node_labels: The default labels applied to K8s cluster nodes
  • domain_name: The FQDN used by the CC cluster
  • workloads: Workload definitions loaded from the workloads.tfvars.json file.

Provisioning uses cloud-provider module specifics for the rest of parameters. Defaults are set to be the most cost-efficient with respect to instance types availability and resource limits of a new cloud account. You should adjust defaults based on your requirements.

  • cluster_network_cidr: K8s cluster network CIDR, defaults to 10.0.0.0/16
  • az_count: Number of availability zones
  • cluster_version: K8s cluster version
  • node_groups: Array of objects representing K8s node groups
    • name: Node group name, defaults to default
    • instance_types: A compute node type (size), will fall back to the next value when the first specified instance type is not available. Can be used in combination with capacity_type = "spot"; cloud-provider-specific
    • min_size: Minimum node count for K8s cluster
    • max_size: Maximum node count for K8s cluster
    • desired_size: Desired node count for K8s cluster;
    • capacity_type: Determines compute node capacity type, e.g. "on-demand" or "spot", defaults to "on-demand"; cloud-provider-specific

The infrastructure module uses workload definitions to manage access to shared resources. Definitions are provided using the workloads variable passed via the terraform.tfvars.json file.

Below is an example of a terraform.tfvars.json file containing one workload called demo-workload.

{
  "workloads": {
    "demo-workload": {
      "description": "CG DevX Demo-Workload workload definition"
    }
  }
}