<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>《使用Go开发Kubernetes Operator：基本结构》的评论</title>
	<atom:link href="http://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/feed/" rel="self" type="application/rss+xml" />
	<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/</link>
	<description>一个程序员的心路历程</description>
	<lastBuildDate>Wed, 25 Mar 2026 09:21:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>作者：Coir0710</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7758</link>
		<dc:creator>Coir0710</dc:creator>
		<pubDate>Thu, 20 Jun 2024 02:51:48 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7758</guid>
		<description>白老师提到的回复：“试试下面两个方法之一： 1. git 管理 role.yaml ; 2. 修改 makefile target ”，我是初学者，想问问，这两个方法更具体的解决步骤，有哪位好心人能帮忙分享一个链接吗</description>
		<content:encoded><![CDATA[<p>白老师提到的回复：“试试下面两个方法之一： 1. git 管理 role.yaml ; 2. 修改 makefile target ”，我是初学者，想问问，这两个方法更具体的解决步骤，有哪位好心人能帮忙分享一个链接吗</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7667</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Tue, 10 Jan 2023 14:26:11 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7667</guid>
		<description>试试下面两个方法之一：
1. 试着用git管理本地源文件，make后，再git checkout 被重置的文件（role.yaml）
2. 修改Makefile，模仿install或docker-build增加一个target，让其不执行重置role.yaml的命令。</description>
		<content:encoded><![CDATA[<p>试试下面两个方法之一：<br />
1. 试着用git管理本地源文件，make后，再git checkout 被重置的文件（role.yaml）<br />
2. 修改Makefile，模仿install或docker-build增加一个target，让其不执行重置role.yaml的命令。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：赵大宝</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7666</link>
		<dc:creator>赵大宝</dc:creator>
		<pubDate>Tue, 10 Jan 2023 08:05:57 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7666</guid>
		<description>这种怎么解决呢，我也碰到了……百度无果</description>
		<content:encoded><![CDATA[<p>这种怎么解决呢，我也碰到了……百度无果</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7664</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Thu, 29 Dec 2022 02:31:06 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7664</guid>
		<description>我理解operator是用来自动维护deployment声明的期望状态的。不管是人工创建的deployment，还是operator自创建的，pod亦是如此，只要满足期望状态，operator就不会做什么。如果不满足期望的状态，operator会进行相关操作，直到满足期望状态。</description>
		<content:encoded><![CDATA[<p>我理解operator是用来自动维护deployment声明的期望状态的。不管是人工创建的deployment，还是operator自创建的，pod亦是如此，只要满足期望状态，operator就不会做什么。如果不满足期望的状态，operator会进行相关操作，直到满足期望状态。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：hemi</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7663</link>
		<dc:creator>hemi</dc:creator>
		<pubDate>Wed, 28 Dec 2022 09:55:37 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7663</guid>
		<description>白老师 您好，请教您一个问题：
目前在学习编写operator中，参考了您博客中的例子。现在有一个疑问，需要请教一下您：
https://github.com/bigwhite/experiments/blob/master/webserver-operator/controllers/webserver_controller.go#L76
代码76行中，只是通过 name  和namespace  去get deployment, 如果在部署operator之前，该k8s集群中，在同namespaces中已经存在一个相同name的deployment，那么
operator会检测到已经创建了该deployemnt，不会出现  NotFound 的error。而这个deployment 只是同名，不是operator期望创建的。 怎么规避这种情况呢？
麻烦白老师抽时间看下啊，多谢了。</description>
		<content:encoded><![CDATA[<p>白老师 您好，请教您一个问题：<br />
目前在学习编写operator中，参考了您博客中的例子。现在有一个疑问，需要请教一下您：<br />
<a href="https://github.com/bigwhite/experiments/blob/master/webserver-operator/controllers/webserver_controller.go#L76" rel="nofollow">https://github.com/bigwhite/experiments/blob/master/webserver-operator/controllers/webserver_controller.go#L76</a><br />
代码76行中，只是通过 name  和namespace  去get deployment, 如果在部署operator之前，该k8s集群中，在同namespaces中已经存在一个相同name的deployment，那么<br />
operator会检测到已经创建了该deployemnt，不会出现  NotFound 的error。而这个deployment 只是同名，不是operator期望创建的。 怎么规避这种情况呢？<br />
麻烦白老师抽时间看下啊，多谢了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：hemi</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7662</link>
		<dc:creator>hemi</dc:creator>
		<pubDate>Wed, 28 Dec 2022 06:56:17 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7662</guid>
		<description>目前在学习编写operator中，参考了您博客中的例子。
现在有一个疑问，需要请教一下您：
https://github.com/bigwhite/experiments/blob/master/webserver-operator/controllers/webserver_controller.go#L76
代码中76行，只是通过 name 和namespace 去get deployment, 如果在部署operator之前，该k8s集群中，在同namespaces中已经存在一个相同name的deployment，那么
operator会检测到已经创建了该deployemnt，不会出现 NotFound 的error。

我的一个疑问是，这里是否需要增加通过 uid 来判断，该 deployemnt 是不是该operator创建的？？
产生这个疑问的原因：我看k8s的deployment的源代码中，会通过判断 uid 来确定改 pod 是不是这个 deployment创建的。
麻烦白老师抽时间看下啊，多谢了。</description>
		<content:encoded><![CDATA[<p>目前在学习编写operator中，参考了您博客中的例子。<br />
现在有一个疑问，需要请教一下您：<br />
<a href="https://github.com/bigwhite/experiments/blob/master/webserver-operator/controllers/webserver_controller.go#L76" rel="nofollow">https://github.com/bigwhite/experiments/blob/master/webserver-operator/controllers/webserver_controller.go#L76</a><br />
代码中76行，只是通过 name 和namespace 去get deployment, 如果在部署operator之前，该k8s集群中，在同namespaces中已经存在一个相同name的deployment，那么<br />
operator会检测到已经创建了该deployemnt，不会出现 NotFound 的error。</p>
<p>我的一个疑问是，这里是否需要增加通过 uid 来判断，该 deployemnt 是不是该operator创建的？？<br />
产生这个疑问的原因：我看k8s的deployment的源代码中，会通过判断 uid 来确定改 pod 是不是这个 deployment创建的。<br />
麻烦白老师抽时间看下啊，多谢了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7653</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Sat, 05 Nov 2022 07:38:56 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7653</guid>
		<description>kubebuilder生成的工程中的makefile会有这个问题。我记得好像也碰到过。</description>
		<content:encoded><![CDATA[<p>kubebuilder生成的工程中的makefile会有这个问题。我记得好像也碰到过。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：mark</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7651</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Thu, 03 Nov 2022 02:55:10 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7651</guid>
		<description>我修改完role.yaml 文件内容后，执行完make install 或者make docker-build 后文件内容又变会去了，导致我部署WebServer CR 后，都提示没权限，报错内容如下：
       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.24.2/tools/cache/reflector.go:167: Failed to watch *v1.Deployment: failed to list *v1.Deployment: deployments.apps is forbidden: User &quot;system:serviceaccount:webserver-operator-system:webserver-operator-controller-manager&quot; cannot list resource &quot;deployments&quot; in API group &quot;apps&quot; at the cluster scope</description>
		<content:encoded><![CDATA[<p>我修改完role.yaml 文件内容后，执行完make install 或者make docker-build 后文件内容又变会去了，导致我部署WebServer CR 后，都提示没权限，报错内容如下：<br />
       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.24.2/tools/cache/reflector.go:167: Failed to watch *v1.Deployment: failed to list *v1.Deployment: deployments.apps is forbidden: User “system:serviceaccount:webserver-operator-system:webserver-operator-controller-manager” cannot list resource “deployments” in API group “apps” at the cluster scope</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7650</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Wed, 19 Oct 2022 07:42:29 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7650</guid>
		<description>的确如此，学到了，感谢。</description>
		<content:encoded><![CDATA[<p>的确如此，学到了，感谢。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：john</title>
		<link>https://tonybai.com/2022/08/15/developing-kubernetes-operators-in-go-part1/#comment-7647</link>
		<dc:creator>john</dc:creator>
		<pubDate>Wed, 19 Oct 2022 04:05:42 +0000</pubDate>
		<guid isPermaLink="false">https://tonybai.com/?p=3638#comment-7647</guid>
		<description>大佬check下，https://developers.redhat.com/articles/2021/06/11/kubernetes-operators-101-part-1-overview-and-key-features#operator_capability_levels 里面描述ansible跟go都可以达到级别五。</description>
		<content:encoded><![CDATA[<p>大佬check下，https://developers.redhat.com/articles/2021/06/11/kubernetes-operators-101-part-1-overview-and-key-features#operator_capability_levels 里面描述ansible跟go都可以达到级别五。</p>
]]></content:encoded>
	</item>
</channel>
</rss>
