mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Remove unnecessary ETCD_UNSUPPORTED_ARCH for arm64
we should only use this env var for `arm`, since `arm64` is fully supported by etcd folks, let us drop this! (ex - https://github.com/etcd-io/etcd/releases/tag/v3.5.6) ppc64le comment should be dropped as well Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
		@@ -179,10 +179,10 @@ else
 | 
				
			|||||||
	done
 | 
						done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# Add this ENV variable in order to workaround an unsupported arch blocker
 | 
						# Add this ENV variable in order to workaround an unsupported arch blocker
 | 
				
			||||||
	# The multiarch feature is in an limited and experimental state right now, and etcd should work fine on arm64
 | 
						# On arm (which is 32-bit), it can't handle >1GB data in-memory
 | 
				
			||||||
	# On arm (which is 32-bit), it can't handle >1GB data in-memory, but it is very unlikely someone tinkering with their limited arm devices would reach such a high usage
 | 
						ifeq ($(ARCH),arm)
 | 
				
			||||||
	# ppc64le is still quite untested, but compiles and is probably in the process of being validated by IBM.
 | 
							cd $(TEMP_DIR) && echo "ENV ETCD_UNSUPPORTED_ARCH=$(ARCH)" >> $(DOCKERFILE)
 | 
				
			||||||
	cd $(TEMP_DIR) && echo "ENV ETCD_UNSUPPORTED_ARCH=$(ARCH)" >> $(DOCKERFILE)
 | 
						endif
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	docker run --rm --privileged multiarch/qemu-user-static:$(QEMUVERSION) --reset -p yes
 | 
						docker run --rm --privileged multiarch/qemu-user-static:$(QEMUVERSION) --reset -p yes
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -51,9 +51,7 @@ kube::etcd::validate() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  # need set the env of "ETCD_UNSUPPORTED_ARCH" on unstable arch.
 | 
					  # need set the env of "ETCD_UNSUPPORTED_ARCH" on unstable arch.
 | 
				
			||||||
  arch=$(uname -m)
 | 
					  arch=$(uname -m)
 | 
				
			||||||
  if [[ $arch =~ aarch* ]]; then
 | 
					  if [[ $arch =~ arm* ]]; then
 | 
				
			||||||
	  export ETCD_UNSUPPORTED_ARCH=arm64
 | 
					 | 
				
			||||||
  elif [[ $arch =~ arm* ]]; then
 | 
					 | 
				
			||||||
	  export ETCD_UNSUPPORTED_ARCH=arm
 | 
						  export ETCD_UNSUPPORTED_ARCH=arm
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  # validate installed version is at least equal to minimum
 | 
					  # validate installed version is at least equal to minimum
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,6 @@ import (
 | 
				
			|||||||
	"net"
 | 
						"net"
 | 
				
			||||||
	"os"
 | 
						"os"
 | 
				
			||||||
	"os/exec"
 | 
						"os/exec"
 | 
				
			||||||
	"runtime"
 | 
					 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"syscall"
 | 
						"syscall"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
@@ -64,10 +63,6 @@ func getAvailablePort() (int, error) {
 | 
				
			|||||||
// startEtcd executes an etcd instance. The returned function will signal the
 | 
					// startEtcd executes an etcd instance. The returned function will signal the
 | 
				
			||||||
// etcd process and wait for it to exit.
 | 
					// etcd process and wait for it to exit.
 | 
				
			||||||
func startEtcd() (func(), error) {
 | 
					func startEtcd() (func(), error) {
 | 
				
			||||||
	if runtime.GOARCH == "arm64" {
 | 
					 | 
				
			||||||
		os.Setenv("ETCD_UNSUPPORTED_ARCH", "arm64")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	etcdURL := env.GetEnvAsStringOrFallback("KUBE_INTEGRATION_ETCD_URL", "http://127.0.0.1:2379")
 | 
						etcdURL := env.GetEnvAsStringOrFallback("KUBE_INTEGRATION_ETCD_URL", "http://127.0.0.1:2379")
 | 
				
			||||||
	conn, err := net.Dial("tcp", strings.TrimPrefix(etcdURL, "http://"))
 | 
						conn, err := net.Dial("tcp", strings.TrimPrefix(etcdURL, "http://"))
 | 
				
			||||||
	if err == nil {
 | 
						if err == nil {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user