Files
github-actions[bot] 4cf5233f6a fix(lifecycle): support Kubernetes 1.33 upgrade flow (#6993)
fix(lifecycle): support Kubernetes 1.33 upgrade flow (#6929)

* fix: wait for registry before pulling kubeadm images

* fix: support kubeadm upgrade to newer minors

* fix: recover kubelet config during upgrades

* fix: handle kubelet upgrade recovery edge cases

* fix: refresh rootfs sealctl before use

* fix: tolerate existing temporary registry

* fix: ignore kubeadm upgrade health check job

* fix(kubernetes): align cert identity handling with kubeadm v1.29+ (#83)

* build(lifecycle): auto-detect C compiler and CC

Add CC and CC_<platform> Makefile options and implement compiler
resolution for CGO-enabled sealos/sealctl builds. Update DEVELOPGUIDE
with usage and a cross-compile example.



* fix(kubernetes): align cert identity handling with kubeadm v1.29+

- migrate remote control-plane certs across the v1.29 identity boundary
- repair remote admin.conf on all masters during upgrade
- keep local sealos PKI and kubeconfigs aligned with the v1.29+ model
- keep super-admin.conf local-only during renew and upgrade flows
- preserve pre-v1.31 long-lived cert policy and use v1beta4 fields on
  v1.31+
- fix v1.31 remote admin.conf migration config distribution across
  masters



---------



* fix(lifecycle): sync and upgrade codex

* fix: cert and add timeout for cluster role binding create

---------

Signed-off-by: Yun Pan <dinoallo@netc.it>
Co-authored-by: yy <56745951+lingdie@users.noreply.github.com>
Co-authored-by: Yun Pan <dinoallo@netc.it>
2026-06-10 16:49:44 +08:00

147 lines
4.2 KiB
Makefile

# Copyright © 2022 sealos.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
# Build options
ROOT_PACKAGE=github.com/labring/sealos
VERSION_PACKAGE=github.com/labring/sealos/pkg/version
# ==============================================================================
# Includes
include scripts/make-rules/common.mk # must be the first to include
include scripts/make-rules/golang.mk
include scripts/make-rules/gen.mk
include scripts/make-rules/license.mk
include scripts/make-rules/tools.mk
# ==============================================================================
# Usage
define USAGE_OPTIONS
Options:
DEBUG Whether or not to generate debug symbols. Default is 0.
BINS Binaries to build. Default is all binaries under cmd.
This option is available when using: make {build}(.multiarch)
Example: make build BINS="sealos sealctl"
PLATFORMS Platform to build for. Default is linux_arm64 and linux_amd64.
This option is available when using: make {build}.multiarch
Example: make build.multiarch PLATFORMS="linux_arm64 linux_amd64"
CC Override the C compiler for CGO-enabled binaries in single-platform builds.
Example: make build BINS="sealos" CC=gcc
CC_<platform> Override the C compiler for a specific platform in multi-platform builds.
Example: make build.multiarch BINS="sealos" CC_linux_arm64=aarch64-linux-gnu-gcc
V Set to 1 enable verbose build. Default is 0.
endef
export USAGE_OPTIONS
# ==============================================================================
# Targets
.DEFAULT_GOAL = build
## build: Build source code for host platform.
.PHONY: build
build:
@$(MAKE) go.build
## build.multiarch: Build source code for multiple platforms. See option PLATFORMS.
.PHONY: build.multiarch
build.multiarch:
@$(MAKE) go.build.multiarch
# ## image: Build docker images for host platform.
# .PHONY: image
# image:
# @$(MAKE) image.build
# ## image.multiarch: Build docker images for multiple platforms. See option PLATFORMS.
# .PHONY: image.multiarch
# image.multiarch:
# @$(MAKE) image.build.multiarch
# ## push: Push docker images for host platform to registry.
# .PHONY: push
# push:
# @$(MAKE) image.push
# ## push.multiarch: Push docker images for multiple platforms to registry. See option PLATFORMS.
# .PHONY: push.multiarch
# push.multiarch:
# @$(MAKE) image.push.multiarch
## lint: Check syntax and styling of go sources.
.PHONY: lint
lint:
@$(MAKE) go.lint
## format: Gofmt (reformat) package sources.
.PHONY: format
format:
@$(MAKE) go.format
## coverage: Run unit tests and output test coverage.
.PHONY: coverage
coverage:
@$(MAKE) go.coverage
## verify-license: Verify the license headers for all files.
.PHONY: verify-license
verify-license:
@$(MAKE) license.verify
## add-license: Ensure source code files have license headers.
.PHONY: add-license
add-license:
@$(MAKE) license.add
##license: Add license header to all files.
.PHONY: license
license:
@$(MAKE) license.add
.PHONY: license.controller
license.controller:
@$(MAKE) license.controller.add
## gen: Generate all necessary files.
.PHONY: gen
gen:
@$(MAKE) gen.run
## tools: Install dependent tools.
.PHONY: tools
tools:
@$(MAKE) tools.install
## clean: Remove all files that are created by building.
.PHONY: clean
clean:
@echo "===========> Cleaning all build output"
@-rm -vrf $(OUTPUT_DIR) $(BIN_DIR)
## help: Show this help info.
.PHONY: help
help: Makefile
@echo -e "\nUsage: make <TARGETS> <OPTIONS> ...\n\nTargets:"
@sed -n 's/^##//p' $< | awk -F':' '{printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | sed -e 's/^/ /'
@echo "$$USAGE_OPTIONS"