调整
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Note: This dropin only works with kubeadm and kubelet v1.11+
|
||||
[Service]
|
||||
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
|
||||
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
|
||||
# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
|
||||
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
|
||||
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
|
||||
# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
|
||||
EnvironmentFile=-/etc/sysconfig/kubelet
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
|
||||
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=kubelet: The Kubernetes Node Agent
|
||||
Documentation=https://kubernetes.io/docs/
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/kubelet
|
||||
Restart=always
|
||||
StartLimitInterval=0
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+85
-3
@@ -7,7 +7,7 @@
|
||||
|
||||
**Gitea是一个轻量级的DevOps平台软件,支持Git托管、代码审查、团队协作、软件包注册和CI/CD等功能**。
|
||||
|
||||
## 开始部署
|
||||
## 开始部署Gitea
|
||||
|
||||
[Chart文件下载](https://dl.gitea.com/charts/) [官方仓库](https://gitea.com/gitea/helm-gitea/src/branch/main/values.yaml)
|
||||
|
||||
@@ -97,7 +97,13 @@
|
||||
ENABLE_CAPTCHA: true
|
||||
# 启用此项以要求登录使用验证码验证,您还必须启用 ENABLE_CAPTCHA
|
||||
REQUIRE_CAPTCHA_FOR_LOGIN: true
|
||||
|
||||
# actions:
|
||||
# 是否启用 Actions 工作流功能
|
||||
# ENABLED: true
|
||||
# 解析 uses 简写的默认来源: github = https://github.com; self = 当前实例自身;
|
||||
# 也可写完整地址. 改为 self 后 runner 从本站镜像拉 action, 不再访问 github.com
|
||||
# DEFAULT_ACTIONS_URL: self
|
||||
|
||||
# 关闭 redis 集群
|
||||
redis-cluster:
|
||||
enabled: false
|
||||
@@ -117,7 +123,7 @@
|
||||
helm install gitea --namespace gitea -f gitea-values.yaml gitea/gitea
|
||||
```
|
||||
|
||||
## 卸载
|
||||
## 卸载Gitea
|
||||
|
||||
1. 卸载 gitea
|
||||
|
||||
@@ -137,6 +143,82 @@
|
||||
kubectl delete namespace gitea
|
||||
```
|
||||
|
||||
## 安装Gitea Actions
|
||||
|
||||
[官方文档](https://gitea.com/gitea/helm-actions) [官方使用文档](https://docs.gitea.com/zh-cn/usage/actions/quickstart/)
|
||||
|
||||
### 安装 Gitea Actions
|
||||
|
||||
1. 创建密钥
|
||||
|
||||
**密钥获取**:进入 **管理后台**,点击 **工作流** 内 **运行器**,点击 **创建运行器**,获取 Runner 令牌。
|
||||
|
||||
```bash
|
||||
kubectl create secret generic gitea-runner-token \
|
||||
-n gitea \
|
||||
--from-literal=token="你的Runner令牌"
|
||||
```
|
||||
|
||||
2. 编写模版文件
|
||||
|
||||
```bash
|
||||
vi gitea-actions-values.yaml
|
||||
```
|
||||
|
||||
内容如下
|
||||
|
||||
```yaml
|
||||
enabled: true
|
||||
giteaRootURL: "https://域名"
|
||||
existingSecret: "gitea-runner-token"
|
||||
existingSecretKey: "token"
|
||||
statefulset:
|
||||
timezone: Asia/Shanghai
|
||||
persistence:
|
||||
size: 5Gi
|
||||
```
|
||||
|
||||
**其他配置**
|
||||
|
||||
- 配置镜像加速
|
||||
|
||||
```bash
|
||||
statefulset:
|
||||
dind:
|
||||
pullPolicy: IfNotPresent
|
||||
extraArgs:
|
||||
- --registry-mirror=https://docker.m.daocloud.io
|
||||
- --registry-mirror=https://docker.1ms.run
|
||||
```
|
||||
|
||||
- 连接外部 Docker
|
||||
|
||||
```bash
|
||||
statefulset:
|
||||
runner:
|
||||
config: |
|
||||
log:
|
||||
level: debug
|
||||
cache:
|
||||
enabled: false
|
||||
container:
|
||||
require_docker: true
|
||||
docker_timeout: 300s
|
||||
# 指向远程 Docker 守护进程的 TCP 地址
|
||||
docker_host: "tcp://192.168.1.100:2375"
|
||||
```
|
||||
|
||||
3. 部署
|
||||
|
||||
```bash
|
||||
helm install gitea-actions --namespace gitea -f gitea-actions-values.yaml gitea/actions
|
||||
```
|
||||
|
||||
### 卸载 Gitea Actions
|
||||
|
||||
```bash
|
||||
helm uninstall gitea-actions --namespace gitea
|
||||
```
|
||||
|
||||
## 批量清理用户和仓库
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# 二进制文件安装Kubeadm(推荐)
|
||||
|
||||
[官方文档](https://kubernetes.io/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl) [二进制文件仓库](https://dl.k8s.io/)
|
||||
|
||||
## 下载最新版Kubeadm
|
||||
|
||||
- X86-64
|
||||
|
||||
```bash
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubeadm"
|
||||
```
|
||||
|
||||
> 下载指定版本
|
||||
>
|
||||
> ```bash
|
||||
> curl -LO https://dl.k8s.io/release/v1.37.0/bin/linux/amd64/kubeadm
|
||||
> ```
|
||||
|
||||
- ARM64
|
||||
|
||||
```bash
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubeadm"
|
||||
```
|
||||
|
||||
> 下载指定版本
|
||||
>
|
||||
> ```bash
|
||||
> curl -LO https://dl.k8s.io/release/v1.37.0/bin/linux/arm64/kubeadm
|
||||
> ```
|
||||
|
||||
## 安装
|
||||
|
||||
```bash
|
||||
install -o root -g root -m 0755 kubeadm /usr/bin/kubeadm
|
||||
```
|
||||
|
||||
## 验证
|
||||
|
||||
- 查看版本
|
||||
|
||||
```bash
|
||||
kubeadm version
|
||||
```
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# 二进制文件安装Kubectl(推荐)
|
||||
|
||||
[官方文档](https://kubernetes.io/zh-cn/docs/tasks/tools/install-kubectl-linux/#install-kubectl-binary-with-curl-on-linux)
|
||||
[官方文档](https://kubernetes.io/zh-cn/docs/tasks/tools/install-kubectl-linux/#install-kubectl-binary-with-curl-on-linux) [二进制文件仓库](https://dl.k8s.io/)
|
||||
|
||||
## 下载最新版Kubectl
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
> 下载指定版本
|
||||
>
|
||||
> ```bash
|
||||
> curl -LO https://dl.k8s.io/release/v1.29.2/bin/linux/amd64/kubectl
|
||||
> curl -LO https://dl.k8s.io/release/v1.37.0/bin/linux/amd64/kubectl
|
||||
> ```
|
||||
|
||||
- ARM64
|
||||
@@ -27,7 +27,7 @@
|
||||
> 下载指定版本
|
||||
>
|
||||
> ```bash
|
||||
> curl -LO https://dl.k8s.io/release/v1.29.2/bin/linux/arm64/kubectl
|
||||
> curl -LO https://dl.k8s.io/release/v1.37.0/bin/linux/arm64/kubectl
|
||||
> ```
|
||||
|
||||
## 验证该可执行文件(可选步骤)
|
||||
Reference in New Issue
Block a user