apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
  name: ai-us-west-2
  region: us-west-2

nodeGroups:
  - name: p3spot
    labels:  
      project: zip
      lifecycle: Ec2Spot
      aws.amazon.com/spot: "true"
      computetype: gpu
    maxSize: 10
    minSize: 0
    ssh:
      allow: true
      publicKeyPath: ~/.ssh/id_rsa.pub
    instancesDistribution:
      instanceTypes: ["p3.2xlarge","p3.8xlarge"]
      onDemandPercentageAboveBaseCapacity: 0
      onDemandBaseCapacity: 0
      spotAllocationStrategy: "capacity-optimized"
    taints:
      spotInstance: "true:PreferNoSchedule"
    tags:
      k8s.io/cluster-autoscaler/node-template/label/lifecycle: Ec2Spot
      k8s.io/cluster-autoscaler/node-template/label/project: zip
      k8s.io/cluster-autoscaler/node-template/taint/spotInstance: "true:PreferNoSchedule"
      k8s.io/cluster-autoscaler/node-template/label/aws.amazon.com/spot: "true"
      k8s.io/cluster-autoscaler/node-template/label/computetype: gpu
    iam:
      withAddonPolicies:
        autoScaler: true
        cloudWatch: true
        albIngress: true
cloudWatch:
  clusterLogging:
    enableTypes: ["*"]