From 2d405076f4bab0d21bda8f25ef0b0c92bcc925b5 Mon Sep 17 00:00:00 2001 From: Maciek Pytel Date: Mon, 17 Jan 2022 11:12:32 +0100 Subject: [PATCH] Add FAQ entry about the go version used --- cluster-autoscaler/FAQ.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cluster-autoscaler/FAQ.md b/cluster-autoscaler/FAQ.md index 5b569457db5a..16722edb662b 100644 --- a/cluster-autoscaler/FAQ.md +++ b/cluster-autoscaler/FAQ.md @@ -57,6 +57,7 @@ this document: * [My cluster is below minimum / above maximum number of nodes, but CA did not fix that! Why?](#my-cluster-is-below-minimum--above-maximum-number-of-nodes-but-ca-did-not-fix-that-why) * [What happens in scale-up when I have no more quota in the cloud provider?](#what-happens-in-scale-up-when-i-have-no-more-quota-in-the-cloud-provider) * [Developer](#developer) + * [What go version should be used to compile CA?](#what-go-version-should-be-used-to-compile-ca) * [How can I run e2e tests?](#how-can-i-run-e2e-tests) * [How should I test my code before submitting PR?](#how-should-i-test-my-code-before-submitting-pr) * [How can I update CA dependencies (particularly k8s.io/kubernetes)?](#how-can-i-update-ca-dependencies-particularly-k8siokubernetes) @@ -920,6 +921,21 @@ Depending on how long scale-ups have been failing, it may wait up to 30 minutes # Developer: +### What go version should be used to compile CA? + +Cluster Autoscaler generally tries to use the same go version that is used by embedded Kubernetes code. +For example CA 1.21 will use the same go version as Kubernetes 1.21. Only the officially used go +version is supported and CA may not compile using other versions. + +The source of truth for the used go version is builder/Dockerfile. + +Warning: do NOT rely on go version specified in go.mod file. It is only meant to control go mod +behavior and is not indicative of the go version actually used by CA. In particular go 1.17 changes go mod +behavior in a way that is incompatible with existing Kubernetes tooling. +Following [Kubernetes example](https://github.com/kubernetes/kubernetes/pull/105563#issuecomment-960915506) +we have decided to pin version specified in go.mod to 1.16 for now (even though both Kubernetes +and CA no longer compile using go 1.16). + ### How can I run e2e tests? 1. Set up environment and build e2e.go as described in the [Kubernetes docs](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/e2e-tests.md#building-and-running-the-tests).