https://pulumi.com logo
l

late-journalist-87980

09/13/2023, 7:36 AM
Hi, Is Kubernetes apiextensions CustomResource not supported in Yaml right now? but document provide the example to use yaml creating CustomResource
s

stocky-restaurant-98004

09/13/2023, 12:19 PM
Do you mean the manifest is written in YAML, or the Pulumi program is written in YAML?
l

late-journalist-87980

09/14/2023, 1:02 AM
Pulumi program is written in YAML. I follow this document Thanks
s

stocky-restaurant-98004

09/14/2023, 1:56 AM
Can you post a minimal example of a program that's not working and the error you receive?
l

late-journalist-87980

09/14/2023, 1:58 AM
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

stocky-restaurant-98004

09/14/2023, 4:26 PM
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

late-journalist-87980

09/15/2023, 1:56 AM
Thank you!