Automate pkl class creation from Go types #1288
                  
                    
                      KevinGimbel
                    
                  
                
                  started this conversation in
                Ideas
              
            Replies: 1 comment
-
| 
         In the context of Kubernetes specifically, the most straightforward route here is most likely: 
 The "direct" pkl-go evaluation flow relies on having structs (often generated with pkl-gen-go) with   | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'd be very interested in auto-generating a pkl Class from a Go type. As far as I can see this isn't possible out of the box, and there's probably reasons.
We'd like to use pkl as a typed layer in working with Kubernetes YAMLs and CRDs, for example we want to use pkl with Crossplane types like https://github.com/crossplane/crossplane/blob/main/apis/apiextensions/v2/xrd_types.go
Is there any way of automating the conversion of the Go types to pkl classes (or similar)? We could also do this by hand and keep track of upstream api changes, but having some sort of automation would be nice(er).
There was some discussion in #230 but I feel like the solution there is not satisfying for what I plan/want.
Beta Was this translation helpful? Give feedback.
All reactions