Skip to content

Commit

Permalink
GITBOOK-236: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
mouuii authored and gitbook-bot committed Jan 13, 2025
1 parent 14113fb commit b72e902
Show file tree
Hide file tree
Showing 27 changed files with 47 additions and 13 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1) (1) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .gitbook/assets/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,15 @@
* [01、c# 之旅](bian-cheng-yu-yan/c-ru-men/01c-zhi-l.md)
* [02、VScode编辑器上编译C#](bian-cheng-yu-yan/c-ru-men/02vscode-bian-ji-qi-shang-bian-yi-c.md)

***

* [软件推广](ruan-jian-tui-guang/README.md)
* [01-运行在 docker 中的 windows](ruan-jian-tui-guang/01-yun-xing-zai-docker-zhong-de-windows.md)

## 变现

* [01-2025年技术人如何变现](bian-xian/012025-nian-ji-shu-ren-ru-he-bian-xian.md)

## AI 讲 k8s 源码

* [delta\_fifo](ai-jiang-k8s-yuan-ma/delta_fifo.md)
* [k8s 之父教你使用 AI 二次开发 k8s](ai-jiang-k8s-yuan-ma/k8s-zhi-fu-jiao-ni-shi-yong-ai-er-ci-kai-fa-k8s.md)
2 changes: 0 additions & 2 deletions ai-jiang-k8s-yuan-ma/delta_fifo.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# k8s 之父教你使用 AI 二次开发 k8s

不是吧不是吧,现在还有人不会二次开发 k8s 
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 07-workqueue

<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

今天我们来详细研究下 workqueue 相关代码。client-go 的 util/workqueue 包里主要有三个队列,分别是普通队列,延时队列,限速队列,后一个队列以前一个队列的实现为基础,层层添加新功能,我们按照 Queue、DelayingQueue、RateLimitingQueue 的顺序层层拨开来看限速队列是如何实现的。

Expand Down Expand Up @@ -419,7 +419,7 @@ func (r *TypedBucketRateLimiter[T]) Forget(item T) {

```

<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

令牌桶算法内部实现了一个存放token(令牌)的“桶”,初始时“桶”是空的,token会以固定速率往“桶”里填充,直到将其填满为止,多余的token会被丢弃。每个元素都会从令牌桶得到一个token,只有得到token的元素才允许通过(accept),而没有得到token的元素处于等待状态。令牌桶算法通过控制发放token来达到限速目的。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: controller

比如当某个Pod出现故障时,Deployment Controller会及时发现故障并执行自动化修复流程,确保集群里的Pod始终处于预期的工作状态。

<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

## 工作原理

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,5 +746,5 @@ func (ssc *defaultStatefulSetControl) updateStatefulSet(
}
</code></pre>

<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ kubectl delete deployment nginx-deployment --cascade=orphan

### GarbageCollector 架构图 <a href="#garbagecollector" id="garbagecollector"></a>

<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

<pre class="language-go"><code class="lang-go"><strong>// GarbageCollector 对象表示垃圾回收控制器,是实现垃圾回收功能的核心对象。
</strong><strong>// 通过 reflector 监视受管API对象的更改,将结果汇集到单线程的dependencyGraphBuilder中
Expand Down Expand Up @@ -161,7 +161,7 @@ B对应一个node,owner列表里有A,dependent列表里有C;
C对应一个node,owner列表里有B,无dependent。
```
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
#### **2个处理器**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

当前容器产品在企业中的使用已经非常普遍,对于运维和开发团队而言,熟练掌握容器技术的使用也成为一门必不可少的技能。

<figure><img src="../../.gitbook/assets/image (1) (1).png" alt="" width="563"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1) (1).png" alt="" width="563"><figcaption></figcaption></figure>

## Docker desktop

Expand Down Expand Up @@ -46,7 +46,7 @@ docker build -t welcome-to-docker .

**-t** 标志为你的镜像指定一个名称(在这个例子中是 **welcome-to-docker**)。而 **.** 让 Docker 知道它可以在哪里找到 Dockerfile。构建完成后,镜像将出现在 **镜像** 标签中。选择镜像名称以查看其详细信息。选择 **运行** 以将其作为容器运行。在 **可选设置** 中记得指定一个端口号(比如 **8080**)。

<figure><img src="../../.gitbook/assets/image.png" alt="" width="563"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1).png" alt="" width="563"><figcaption></figcaption></figure>

你也可以通过命令来启动一个容器:

Expand All @@ -58,7 +58,7 @@ docker run -d -p 8080:80 docker/welcome-to-docker

您可以通过转到 Docker 桌面仪表板的**容器**视图来查看所有容器。

<figure><img src="../../.gitbook/assets/image (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (1) (1).png" alt=""><figcaption></figcaption></figure>

该容器运行一个显示简单网站的 Web 服务器。当处理更复杂的项目时,您将在不同的容器中运行不同的部分。例如,您可以为前端、后端和数据库运行不同的容器。

Expand Down
2 changes: 1 addition & 1 deletion readme/1-zai-k8s-shang-bu-shu-ying-yong.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Kubernetes 是一个用于部署容器的平台。所有部署到 Kubernetes 的

这就引出了容器。容器是一种只打包你的应用程序及其所需的依赖,然后在一个隔离的环境中运行的方式,就像虚拟机一样,但不需要安装和管理操作系统。

<figure><img src="../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

## 1.2 容器的好处

Expand Down
26 changes: 26 additions & 0 deletions ruan-jian-tui-guang/01-yun-xing-zai-docker-zhong-de-windows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 01-运行在 docker 中的 windows

今天给大家介绍个非常有趣的项目 dockur/windows ,该项目能让你在 docker 中一键启动 windows,非常适合 linux , mac 用户在有需要windows的场景下使用。

### 功能

* ISO 下载器
* KVM 加速
* 网页操作

docker 启动 :

```
docker run -it --rm -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN --stop-timeout 120 dockurr/windows
```



Github项目地址:[https://github.com/dockur/windows](https://github.com/dockur/windows)



🌟 公众号直接点击 「加群」,可加入技术交流微信群。有兴趣的同学快快加入吧,群里有不少业界大神哟!\
\
\
📕 关注『CIT云原生』公众号,带你开启有趣新生活!更多好用好玩的软件资源,尽在这里。
2 changes: 2 additions & 0 deletions ruan-jian-tui-guang/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 软件推广

0 comments on commit b72e902

Please sign in to comment.