u/Electronic_Bad_2046

Kubernetes Kustomize question regarding coding (Go)

Hi,

I have a question regarding coding in Go for Kubernetes automation. It's about teasing in Kubebuilder and Go, basically, and I have the problem that I'm looking for the info object about a resource.

I have the code

typedObj, err := scheme.Scheme.ConvertToVersion(info.Object, info.Mapping.GroupVersionKind.GroupVersion())

which should give me the typed object of a resource, but I have looked around the Krusty repo/project for kustomize, but I don't find any possibility how to extract info

Any ideas or hints?

How in the Kubernetes ecosystem can I access info?

I have the baseline code

kOpts := krusty.MakeDefaultOptions()
kOpts.PluginConfig = kustomize_types.EnabledPluginConfig(kustomize_types.BploUndefined)
kOpts.PluginConfig.HelmConfig.Command = "helm"
k := krusty.MakeKustomizer(kOpts)
m, err := k.Run(filesys.FileSystemOrOnDisk{}, filepath.Join(paths...)) // type ResMap, type error

I want to read CRDs from the filesystem, so I need the m object for k.Run().

Any ideas? Anyone at least knows how I can extract the info from the Kubernetes ecosystem by some functionality with some key?

reddit.com
u/Electronic_Bad_2046 — 3 days ago

Staub

Mein Schreibtisch sieht aus voller Staub, da dort mein Rechner steht und der irgendwie durch viel Benutzung, viel Staub anzieht. Der Prozessor schaltet dann viel und erzeugt elektromagnetische Strahlung, was den Staub anzieht.

Ist das interessant?

reddit.com
u/Electronic_Bad_2046 — 3 days ago