Hi, Is Kubernetes apiextensions CustomResource not...
# general
l
Hi, Is Kubernetes apiextensions CustomResource not supported in Yaml right now? but document provide the example to use yaml creating CustomResource
s
Do you mean the manifest is written in YAML, or the Pulumi program is written in YAML?
l
Pulumi program is written in YAML. I follow this document Thanks
s
Can you post a minimal example of a program that's not working and the error you receive?
l
Copy code
name: mycr
runtime: yaml
description: A minimal Kubernetes Pulumi YAML program
resources:
  httproute:
    type: kubernetes:<http://apiextensions.k8s.io:CustomResource|apiextensions.k8s.io:CustomResource>
    properties:
      apiVersion: <http://gateway.networking.k8s.io/v1beta1|gateway.networking.k8s.io/v1beta1>
      kind: HTTPRoute
      metadata:
        name: http-app-1
        annotations:
          <http://konghq.com/strip-path|konghq.com/strip-path>: 'true'
and this is error I got
Copy code
Error: error resolving type of resource httproute: The resource type [kubernetes:<http://apiextensions.k8s.io:CustomResource|apiextensions.k8s.io:CustomResource>] is not supported in YAML at this time, see: <https://github.com/pulumi/pulumi-kubernetes/issues/1971>
      on Pulumi.yaml line 6:
       6:     type: kubernetes:<http://apiextensions.k8s.io:CustomResource|apiextensions.k8s.io:CustomResource>
s
Oh, I see what's up. So to clarify the internal terminology, an "overlay" is code that is added to a given language's SDK. This means that it is separately maintained in every language. We have moved away from these since Pulumi now supports too many languages and too many providers for this technique to be sustainable. Unfortunately, theres no easy solution for a Pulumi YAML program. If you need to use this resource, you'll need to use a language in which it's supported. I don't know that list offhand, but TypeScript is almost certainly supported.
The fact that our docs are misleading here is really bad. I've escalated it to our engineering folks. I'm really sorry for the user experience here - that's not what we want.
l
Thank you!