Add secure compilation parameters

Signed-off-by: pixiake <guofeng@yunify.com>
This commit is contained in:
pixiake 2023-03-14 13:22:24 +08:00
parent 579a59f93c
commit 6ee85c95d8
4 changed files with 4 additions and 77 deletions

View File

@ -1,49 +0,0 @@
From ab7b07c1df18a3244b1c4886383eca0e0403860f Mon Sep 17 00:00:00 2001
From: Deshi Xiao <xiaods@gmail.com>
Date: Sun, 7 Aug 2022 13:33:27 +0800
Subject: [PATCH] fix: delete k3s cluster with kubenetes version
fix issue: https://github.com/kubesphere/kubekey/issues/1148
let below cmd works
```
./kk delete cluster --with-kubenetes v1.21.6-k3s
```
Signed-off-by: Deshi Xiao <xiaods@gmail.com>
---
cmd/ctl/delete/delete_cluster.go | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/cmd/ctl/delete/delete_cluster.go b/cmd/ctl/delete/delete_cluster.go
index f533b2d8..62d8136d 100644
--- a/cmd/ctl/delete/delete_cluster.go
+++ b/cmd/ctl/delete/delete_cluster.go
@@ -27,6 +27,7 @@ import (
type DeleteClusterOptions struct {
CommonOptions *options.CommonOptions
ClusterCfgFile string
+ Kubernetes string
}
func NewDeleteClusterOptions() *DeleteClusterOptions {
@@ -53,12 +54,14 @@ func NewCmdDeleteCluster() *cobra.Command {
func (o *DeleteClusterOptions) Run() error {
arg := common.Argument{
- FilePath: o.ClusterCfgFile,
- Debug: o.CommonOptions.Verbose,
+ FilePath: o.ClusterCfgFile,
+ Debug: o.CommonOptions.Verbose,
+ KubernetesVersion: o.Kubernetes,
}
return pipelines.DeleteCluster(arg)
}
func (o *DeleteClusterOptions) AddFlags(cmd *cobra.Command) {
cmd.Flags().StringVarP(&o.ClusterCfgFile, "filename", "f", "", "Path to a configuration file")
+ cmd.Flags().StringVarP(&o.Kubernetes, "with-kubernetes", "", "", "Specify a supported version of kubernetes")
}
--
2.21.0

View File

@ -1,27 +0,0 @@
From fbd73b6c14fc9db366e68b60c9a189019777fc20 Mon Sep 17 00:00:00 2001
From: faror <hung.z.h916@gmail.com>
Date: Fri, 19 Aug 2022 11:31:36 +0800
Subject: [PATCH] fixed #1453
---
pkg/bootstrap/os/templates/init_script.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pkg/bootstrap/os/templates/init_script.go b/pkg/bootstrap/os/templates/init_script.go
index 289d2577..fd0ffe10 100644
--- a/pkg/bootstrap/os/templates/init_script.go
+++ b/pkg/bootstrap/os/templates/init_script.go
@@ -83,7 +83,9 @@ sed -r -i "s@#{0,}?vm.swappiness ?= ?([0-9]{1,})@vm.swappiness = 1@g" /etc/sysc
sed -r -i "s@#{0,}?fs.inotify.max_user_instances ?= ?([0-9]{1,})@fs.inotify.max_user_instances = 524288@g" /etc/sysctl.conf
sed -r -i "s@#{0,}?kernel.pid_max ?= ?([0-9]{1,})@kernel.pid_max = 65535@g" /etc/sysctl.conf
-awk ' !x[$0]++{print > "/etc/sysctl.conf"}' /etc/sysctl.conf
+tmpfile="$$.tmp"
+awk ' !x[$0]++{print > "'$tmpfile'"}' /etc/sysctl.conf
+mv $tmpfile /etc/sysctl.conf
systemctl stop firewalld 1>/dev/null 2>/dev/null
systemctl disable firewalld 1>/dev/null 2>/dev/null
--
2.21.0

Binary file not shown.

View File

@ -3,7 +3,7 @@
Name: kubekey
Summary: Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA.
Version: v3.0.7
Release: 1
Release: 2
License: Apache-2.0
URL: https://github.com/kubesphere/kubekey
@ -33,6 +33,9 @@ cp bin/kk $RPM_BUILD_ROOT/usr/local/bin
%changelog
* Tue Mar 14 2023 guofeng <guofeng@yunify.com> v3.0.7-2
- Add secure compilation parameters
* Mon Mar 13 2023 guofeng <guofeng@yunify.com> v3.0.7-1
- update to latest version v3.0.7