is there an existing tool for transliterating k8s ...
# general
c
is there an existing tool for transliterating k8s CRDs to pulumi types?
g
Not yet, but It’s something we’ve talked about. How would you want to see such a tool work?
c
i havent looked how they are natively done in go now, so i dont have strong opinions, but if it was something that was easily run as part of a build process to generate them, perfect
we are mostly looking at supporting some of the CRDs related to the prometheus operator @big-potato-91793
unlikely to change much, but also hate to see a bunch of manual eyeball conversions
g
Right; I think we’ll create a standalone code-generator tool for that at some point. In the meantime, easiest approach is probably loading the YAML with ConfigFile/ConfigGroup.
c
we do it like this but we lose the type checking
Copy code
const operatedServiceMonitor = new k8s.apiextensions.CustomResource("prometheus-operated", {
    apiVersion: "<http://monitoring.coreos.com/v1|monitoring.coreos.com/v1>",
    kind: "ServiceMonitor"
g
s
@calm-greece-42329 We also had this question today. Also for
prometheus-operator
parts, esp.
PrometheusRule
for alerts.
b
where @stocky-island-3676 ?
s
@big-potato-91793 At work. Wanted to support that we also stumbled upon this issue. I didn’t duplicate the question in an extra post, if that’s what you asked for.