Slide 29
Slide 29 text
設定できる項目例:
● labels, annotations, taints
● requirements:
インスタンスタイプ,AZ など
● limits:リソース合計の上限
● ttlSecondsUntilExpired:
ノードの失効時間
● ttlSecondsAfterEmpty:
スケールイン判定
Provisioner でノードの制約を定義する
29
apiVersion: karpenter.sh/v1alpha5
kind: Provisioner
metadata:
name: gitlab-runner
spec:
providerRef:
name: gitlab-runner
labels:
workload: gitlab-runner
requirements:
- key: karpenter.sh/capacity-type
operator: In
values: ["spot"]
- key: kubernetes.io/arch
operator: In
values: ["amd64"]
- key: karpenter.k8s.aws/instance-family
operator: In
values: ["c6i", "m6i", "t3", "m5"]
- key: karpenter.k8s.aws/instance-size
operator: In
values: ["large", "xlarge", "2xlarge"]
limits:
resources:
cpu: 1000
ttlSecondsUntilExpired: 86400 # 1 Day
ttlSecondsAfterEmpty: 600