This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| affinity: | |
| nodeAffinity: | |
| requiredDuringSchedulingIgnoredDuringExecution: | |
| nodeSelectorTerms: | |
| - matchExpressions: | |
| - key: "fanduel.com/storage-optimized" | |
| operator: In | |
| values: | |
| - ebs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aggressiveMode: true | |
| managedByCASTAI: false | |
| customConfig: | | |
| evictionConfig: | |
| - podSelector: | |
| kind: StatefulSet | |
| settings: | |
| disposable: | |
| enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl --request POST \ | |
| --url https://api.cast.ai/v1/kubernetes/external-clusters/fc5dac97-6e52-4d16-a6b1-ad4d1bcf8754/disconnect \ | |
| --header 'X-API-Key: <>' \ | |
| --header 'accept: application/json' \ | |
| --header 'content-type: application/json' \ | |
| --data ' | |
| { | |
| "deleteProvisionedNodes": false, | |
| "keepKubernetesResources": true | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| RETRY_SEC=${RETRY_SEC:-1} | |
| RETRY_TIMES=${RETRY_TIMES:-30} | |
| retry() { | |
| local -r cmd="$@" | |
| local -i retries=1 | |
| until $cmd; do | |
| sleep $RETRY_SEC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| RETRY_SEC=${RETRY_SEC:-1} | |
| RETRY_TIMES=${RETRY_TIMES:-30} | |
| retry() { | |
| local -r cmd="$@" | |
| local -i retries=1 | |
| until $cmd; do | |
| sleep $RETRY_SEC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| RETRY_SEC=${RETRY_SEC:-1} | |
| RETRY_TIMES=${RETRY_TIMES:-30} | |
| retry() { | |
| local -r cmd="$@" | |
| local -i retries=1 | |
| until $cmd; do | |
| sleep $RETRY_SEC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data "castai_workload_scaling_policy_order" "cluster" { | |
| cluster_id = castai_eks_clusterid.cluster_id.id | |
| } | |
| locals { | |
| ordered_policy_ids = [ | |
| castai_workload_scaling_policy.default.id, | |
| castai_workload_scaling_policy.default-statefulset.id, | |
| ] | |
| unordered_policy_ids = tolist(setsubtract(data.castai_workload_scaling_policy_order.cluster.policy_ids, local.ordered_policy_ids)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| echo "Starting AWS integration setup" | |
| : ${INTEGRATION_NAME:="AWS discovery"} | |
| : ${CASTAI_API_URL:="https://api.cast.ai"} | |
| : ${ROLE_NAME:="castai-discovery-role"} | |
| : ${STACKSET_NAME:="castai-discovery-roles"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Hardcoded credentials - Replace these placeholder values with your actual credentials | |
| SUBSCRIPTION_ID="your-subscription-id-here" | |
| TENANT_ID="your-tenant-id-here" | |
| CLIENT_ID="your-client-id-here" | |
| FEDERATION_ID="your-federation-id-here" | |
| CASTAI_CLUSTER_ID="your-cluster-id-here" | |
| CASTAI_API_TOKEN="your-api-token-here" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREDENTIALS='{ | |
| "subscriptionId": "'"$SUBSCRIPTION_ID"'", | |
| "tenantId": "'"$TENANT_ID"'", | |
| "clientId": "'"$CLIENT_ID"'", | |
| "federationId": "'"$FEDERATION_ID"'" | |
| }' | |
| echo $CREDENTIALS | |
| echo "Sending credentials to CAST AI console..." | |
| API_URL="https://api.cast.ai/v1/kubernetes/external-clusters/${CASTAI_CLUSTER_ID}" | |
| BODY=$(jq -c -n --arg CREDENTIALS "$CREDENTIALS" '{credentials:$CREDENTIALS}') |