diff --git a/charts/cf-runtime/.ci/values-ci.yaml b/charts/cf-runtime/.ci/values-ci.yaml index e6c0b6ea..9280fea6 100644 --- a/charts/cf-runtime/.ci/values-ci.yaml +++ b/charts/cf-runtime/.ci/values-ci.yaml @@ -18,9 +18,6 @@ monitor: enabled: true rbac: namespaced: true -runner: - sidecar: - enabled: true runtime: dind: podLabels: diff --git a/charts/cf-runtime/Chart.yaml b/charts/cf-runtime/Chart.yaml index 50f3b1a6..f5a5b9da 100644 --- a/charts/cf-runtime/Chart.yaml +++ b/charts/cf-runtime/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: A Helm chart for Codefresh Runner name: cf-runtime -version: 8.3.11 +version: 8.3.12 keywords: - codefresh - runner @@ -18,13 +18,7 @@ annotations: # Supported kinds: `added`, `changed`, `deprecated`, `removed`, `fixed`, `security`: artifacthub.io/changes: | - kind: changed - description: "Update \"dind\" to 28.3.3-3.0.3" - - kind: changed - description: "Update \"engine\" to 1.180.2" - - kind: fixed - description: "Prevent DinD containers escaping the pod cgroup on cgroup v2. Rootless DinD requires additional configuration on cgroup v2, see \"Rootless DinD\" section in docs for details." - - kind: fixed - description: "Enable legacy Prometheus metrics in the \"engine\" only if METRICS_PROMETHEUS_ENABLED=true." + description: "Remove sidecar container from runner deployment" dependencies: - name: cf-common repository: oci://quay.io/codefresh/charts diff --git a/charts/cf-runtime/README.md b/charts/cf-runtime/README.md index ad825c73..32eeb50d 100644 --- a/charts/cf-runtime/README.md +++ b/charts/cf-runtime/README.md @@ -1,6 +1,6 @@ ## Codefresh Runner -![Version: 8.3.11](https://img.shields.io/badge/Version-8.3.11-informational?style=flat-square) +![Version: 8.3.12](https://img.shields.io/badge/Version-8.3.12-informational?style=flat-square) Helm chart for deploying [Codefresh Runner](https://codefresh.io/docs/docs/installation/codefresh-runner/) to Kubernetes. @@ -1297,7 +1297,6 @@ Install the Helm chart | runner.serviceAccount.annotations | object | `{}` | Additional service account annotations | | runner.serviceAccount.create | bool | `true` | Create service account | | runner.serviceAccount.name | string | `""` | Override service account name | -| runner.sidecar | object | `{"enabled":false,"env":{"RECONCILE_INTERVAL":300},"image":{"digest":"sha256:da0c9d12b4772e6cd6c1ecb93883471e8785d4d61c9108c9f7d0dc9cc2f5a149","registry":"quay.io","repository":"codefresh/kubectl","tag":"1.33.0"},"resources":{}}` | Sidecar container Reconciles runtime spec from Codefresh API for drift detection | | runner.tolerations | list | `[]` | Set tolerations | | runner.updateStrategy | object | `{"type":"RollingUpdate"}` | Upgrade strategy | | runtime | object | See below | Set runtime parameters | diff --git a/charts/cf-runtime/files/reconcile-runtime.sh b/charts/cf-runtime/files/reconcile-runtime.sh deleted file mode 100755 index 21e43735..00000000 --- a/charts/cf-runtime/files/reconcile-runtime.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -echo "-----" -echo "API_HOST: ${API_HOST}" -echo "KUBE_CONTEXT: ${KUBE_CONTEXT}" -echo "KUBE_NAMESPACE: ${KUBE_NAMESPACE}" -echo "OWNER_NAME: ${OWNER_NAME}" -echo "RUNTIME_NAME: ${RUNTIME_NAME}" -echo "CONFIGMAP_NAME: ${CONFIGMAP_NAME}" -echo "RECONCILE_INTERVAL: ${RECONCILE_INTERVAL}" -echo "-----" - -msg() { echo -e "\e[32mINFO ---> $1\e[0m"; } -err() { echo -e "\e[31mERR ---> $1\e[0m" ; return 1; } - - -if [ -z "${USER_CODEFRESH_TOKEN}" ]; then - err "missing codefresh user token. must supply \".global.codefreshToken\" if agent-codefresh-token does not exist" - exit 1 -fi - -codefresh auth create-context --api-key ${USER_CODEFRESH_TOKEN} --url ${API_HOST} - -while true; do - msg "Reconciling ${RUNTIME_NAME} runtime" - - sleep $RECONCILE_INTERVAL - - codefresh get re \ - --name ${RUNTIME_NAME} \ - -o yaml \ - | yq 'del(.version, .metadata.changedBy, .metadata.creationTime)' > /tmp/runtime.yaml - - kubectl get cm ${CONFIGMAP_NAME} -n ${KUBE_NAMESPACE} -o yaml \ - | yq 'del(.metadata.resourceVersion, .metadata.uid)' \ - | yq eval '.data["runtime.yaml"] = load_str("/tmp/runtime.yaml")' \ - | kubectl apply -f - -done diff --git a/charts/cf-runtime/templates/_components/runner/_deployment.yaml b/charts/cf-runtime/templates/_components/runner/_deployment.yaml index dcc1dbe5..b1ebdaab 100644 --- a/charts/cf-runtime/templates/_components/runner/_deployment.yaml +++ b/charts/cf-runtime/templates/_components/runner/_deployment.yaml @@ -69,23 +69,6 @@ spec: volumeMounts: {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.sidecar.enabled }} - - name: reconcile-runtime - image: {{ include (printf "%s.image.name" $cfCommonTplSemver ) (dict "image" .Values.sidecar.image "context" .) }} - imagePullPolicy: {{ .Values.sidecar.image.pullPolicy | default "IfNotPresent" }} - command: - - /bin/bash - args: - - -ec - - | - {{- .Files.Get "files/reconcile-runtime.sh" | nindent 10 }} - env: - {{- include "runner-sidecar.environment-variables" . | nindent 8 }} - {{- with .Values.sidecar.resources }} - resources: - {{- toYaml . | nindent 10 }} - {{- end }} - {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/cf-runtime/templates/_components/runner/environment-variables/_sidecar-container.yaml b/charts/cf-runtime/templates/_components/runner/environment-variables/_sidecar-container.yaml deleted file mode 100644 index 3adcbe5d..00000000 --- a/charts/cf-runtime/templates/_components/runner/environment-variables/_sidecar-container.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- define "runner-sidecar.environment-variables.defaults" }} -HOME: /tmp -{{- end }} - -{{- define "runner-sidecar.environment-variables.calculated" }} -API_HOST: {{ include "runtime.runtime-environment-spec.codefresh-host" . }} -USER_CODEFRESH_TOKEN: {{ include "runtime.installation-token-env-var-value" . | nindent 2 }} -KUBE_CONTEXT: {{ include "runtime.runtime-environment-spec.context-name" . }} -KUBE_NAMESPACE: {{ .Release.Namespace }} -OWNER_NAME: {{ include "runner.fullname" . }} -RUNTIME_NAME: {{ include "runtime.runtime-environment-spec.runtime-name" . }} -CONFIGMAP_NAME: {{ printf "%s-%s" (include "runtime.fullname" .) "spec" }} -{{- end }} - -{{- define "runner-sidecar.environment-variables" }} - {{- $cfCommonTplSemver := printf "cf-common-%s" (index .Subcharts "cf-common").Chart.Version }} - {{- $defaults := (include "runner-sidecar.environment-variables.defaults" . | fromYaml) }} - {{- $calculated := (include "runner-sidecar.environment-variables.calculated" . | fromYaml) }} - {{- $overrides := .Values.sidecar.env }} - {{- $mergedValues := mergeOverwrite (merge $defaults $calculated) $overrides }} - {{- include (printf "%s.env-vars" $cfCommonTplSemver) (dict "Values" $mergedValues "context" .) }} -{{- end }} diff --git a/charts/cf-runtime/values.yaml b/charts/cf-runtime/values.yaml index c0aada75..6f82f75a 100644 --- a/charts/cf-runtime/values.yaml +++ b/charts/cf-runtime/values.yaml @@ -90,18 +90,6 @@ runner: requests: memory: 256Mi cpu: '0.2' - # -- Sidecar container - # Reconciles runtime spec from Codefresh API for drift detection - sidecar: - enabled: false - image: - registry: quay.io - repository: codefresh/kubectl - tag: 1.33.0 - digest: sha256:da0c9d12b4772e6cd6c1ecb93883471e8785d4d61c9108c9f7d0dc9cc2f5a149 - env: - RECONCILE_INTERVAL: 300 - resources: {} # -- Add additional env vars env: {} # E.g.