This is an automated email from the ASF dual-hosted git repository.

shahar1 pushed a commit to branch gha-arc-rebase
in repository https://gitbox.apache.org/repos/asf/airflow-ci-infra.git

commit 091f6e4c96cc73c0136c173e43112750757e5d2f
Author: Hussein Awala <[email protected]>
AuthorDate: Sat Jul 22 00:17:45 2023 +0200

    split the helmfile in two and update autoscaler conf
---
 helm/ci-helmfile.yaml                              | 16 ++++++++
 helm/cluster-config/templates/_helpers.tpl         | 43 ----------------------
 helm/cluster-config/templates/namespaces/ci.yaml   |  2 -
 .../cluster-config/templates/namespaces/infra.yaml |  2 -
 helm/{helmfile.yaml => infra-helmfile.yaml}        | 13 -------
 helm/values/cluster-autoscaler.yaml                |  5 +++
 6 files changed, 21 insertions(+), 60 deletions(-)

diff --git a/helm/ci-helmfile.yaml b/helm/ci-helmfile.yaml
new file mode 100644
index 0000000..535a103
--- /dev/null
+++ b/helm/ci-helmfile.yaml
@@ -0,0 +1,16 @@
+---
+repositories:
+  - name: actions-runner-controller
+    url: https://actions-runner-controller.github.io/actions-runner-controller
+
+releases:
+  - name: actions-runner-controller
+    chart: actions-runner-controller/actions-runner-controller
+    namespace: ci
+    version: 0.23.3
+    values:
+      - ./values/actions-runner-controller.yaml
+
+  - name: runners-config
+    chart: ./runners-config
+    namespace: ci
diff --git a/helm/cluster-config/templates/_helpers.tpl 
b/helm/cluster-config/templates/_helpers.tpl
deleted file mode 100644
index 0144d79..0000000
--- a/helm/cluster-config/templates/_helpers.tpl
+++ /dev/null
@@ -1,43 +0,0 @@
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "chart.name" -}}
-{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
-{{- end }}
-
-{{/*
-Create a default fully qualified app name.
-We truncate at 63 chars because some Kubernetes name fields are limited to 
this (by the DNS naming spec).
-If release name contains chart name it will be used as a full name.
-*/}}
-{{- define "chart.fullname" -}}
-{{- if .Values.fullnameOverride }}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- $name := default .Chart.Name .Values.nameOverride }}
-{{- if contains $name .Release.Name }}
-{{- .Release.Name | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
-{{- end }}
-{{- end }}
-{{- end }}
-
-{{/*
-Create chart name and version as used by the chart label.
-*/}}
-{{- define "chart.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | 
trimSuffix "-" }}
-{{- end }}
-
-{{/*
-Common labels
-*/}}
-{{- define "chart.labels" -}}
-helm.sh/chart: {{ include "chart.chart" . }}
-{{- if .Chart.AppVersion }}
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
-{{- end }}
-app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- end }}
-
diff --git a/helm/cluster-config/templates/namespaces/ci.yaml 
b/helm/cluster-config/templates/namespaces/ci.yaml
index 66fd39f..feecd98 100644
--- a/helm/cluster-config/templates/namespaces/ci.yaml
+++ b/helm/cluster-config/templates/namespaces/ci.yaml
@@ -2,5 +2,3 @@ apiVersion: v1
 kind: Namespace
 metadata:
   name: ci
-  labels:
-    {{- include "chart.labels" . | nindent 4 }}
diff --git a/helm/cluster-config/templates/namespaces/infra.yaml 
b/helm/cluster-config/templates/namespaces/infra.yaml
index fac8d1d..58ff182 100644
--- a/helm/cluster-config/templates/namespaces/infra.yaml
+++ b/helm/cluster-config/templates/namespaces/infra.yaml
@@ -2,5 +2,3 @@ apiVersion: v1
 kind: Namespace
 metadata:
   name: infra
-  labels:
-    {{- include "chart.labels" . | nindent 4 }}
diff --git a/helm/helmfile.yaml b/helm/infra-helmfile.yaml
similarity index 63%
rename from helm/helmfile.yaml
rename to helm/infra-helmfile.yaml
index f30e329..a2831cb 100644
--- a/helm/helmfile.yaml
+++ b/helm/infra-helmfile.yaml
@@ -2,8 +2,6 @@
 repositories:
   - name: jetstack
     url: https://charts.jetstack.io
-  - name: actions-runner-controller
-    url: https://actions-runner-controller.github.io/actions-runner-controller
   - name: autoscaler
     url: https://kubernetes.github.io/autoscaler
 
@@ -27,14 +25,3 @@ releases:
     version: 9.29.1
     values:
       - ./values/cluster-autoscaler.yaml
-
-  - name: actions-runner-controller
-    chart: actions-runner-controller/actions-runner-controller
-    namespace: ci
-    version: 0.23.3
-    values:
-      - ./values/actions-runner-controller.yaml
-
-  - name: runners-config
-    chart: ./runners-config
-    namespace: ci
diff --git a/helm/values/cluster-autoscaler.yaml 
b/helm/values/cluster-autoscaler.yaml
index 8328c96..b3c73e9 100644
--- a/helm/values/cluster-autoscaler.yaml
+++ b/helm/values/cluster-autoscaler.yaml
@@ -11,3 +11,8 @@ rbac:
     name: "cluster-autoscaler"
     annotations:
       eks.amazonaws.com/role-arn: 
arn:aws:iam::827901512104:role/eks-autoscaler-role
+
+extraArgs:
+  scan-interval: 10s
+  scale-down-delay-after-add: 5m
+  scale-down-unneeded-time: 5m
\ No newline at end of file

Reply via email to