是否可以使用Go将现有CRD添加到自定义Kubernetes运算符中? [英] Is it possible to add an already existing CRD into a custom Kubernetes operator using Go?

查看:90
本文介绍了是否可以使用Go将现有CRD添加到自定义Kubernetes运算符中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用自己的自定义运算符,该运算符部署功能齐全的Wordpress.我需要实现SSL.现在这是我遇到的问题,我不确定如何使用Go来实现.

I'm currently working on my own custom operator that deploys a fully functional Wordpress. I'm required to implement SSL. Now this is where I'm stuck, I'm not really sure how to implement this using Go.

是否可以将已经存在的CRD(例如cert-manage)添加到我的操作员中,然后使用我的自定义操作员从中创建Kubernetes资源类型?

Is there a way of adding already existing CRDs, for example cert-manage, into my operator and then create a Kubernetes resource type out of these, using my custom Operator?

推荐答案

是的,每个Go控制器还生成了客户端.参见例如客户端证书管理器.

Yes, every Go controller also has clients generated. See e.g. client-go cert-manager.

如果您导入cert-manager的client-go,则可以将其用于例如创建资源或监视进行更改.

If you import the client-go for cert-manager, you can use it to e.g. create resources or watch for changes.

这篇关于是否可以使用Go将现有CRD添加到自定义Kubernetes运算符中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆