Open henderiw opened 3 years ago
Unless I'm mistaken, this is likely more complicated than "just" fixing the crd2pulumi
tool (I tried).
First, we would need to translate both type and property names so that the Pulumi names don't contain .
and -
characters, both of which are valid for CRDs.
However, unless I'm mistaken, we don't currently support having a different Pulumi names for the CRD's type or property names, since we use type tokens and direct names in most places, and as far as I can tell, rely on the Pulumi resource object's names matching at runtime too. (An alternative approach would be to have crd2pulumi
generate types that manually marshal a map of CRD names to their Pulumi equivalents, the latter of which would be cleaned of .
and -
s.)
@henderiw, are you ok sharing your repro file here?
Yes happy to share the CRD file I am using which triggered this[](url)
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: srlinterfaces.srlinux.henderiw.be
spec:
group: srlinux.henderiw.be
names:
kind: SrlInterface
listKind: SrlInterfaceList
plural: srlinterfaces
singular: srlinterface
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: SrlInterface is the Schema for the SrlInterfaces API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: SrlInterfaceSpec struct
properties:
interface:
items:
description: Interface struct
properties:
admin-state:
default: enable
enum:
- disable
- enable
type: string
description:
maxLength: 255
minLength: 1
pattern: '[A-Za-z0-9 !@#$^&()|+=`~.,''/_:;?-]*'
type: string
ethernet:
description: InterfaceEthernet struct
properties:
aggregate-id:
type: string
auto-negotiate:
type: boolean
duplex-mode:
enum:
- full
- half
type: string
flow-control:
description: InterfaceEthernetFlowControl struct
properties:
receive:
type: boolean
transmit:
type: boolean
type: object
lacp-port-priority:
maximum: 65535
minimum: 0
type: integer
port-speed:
enum:
- 100G
- 100M
- 10G
- 10M
- 1G
- 1T
- 200G
- 25G
- 400G
- 40G
- 50G
type: string
type: object
lag:
description: InterfaceLag struct
properties:
lacp:
description: InterfaceLagLacp struct
properties:
admin-key:
maximum: 65535
minimum: 1
type: integer
interval:
default: SLOW
enum:
- FAST
- SLOW
type: string
lacp-mode:
default: ACTIVE
enum:
- ACTIVE
- PASSIVE
type: string
system-id-mac:
pattern: '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'
type: string
system-priority:
maximum: 65535
minimum: 0
type: integer
type: object
lacp-fallback-mode:
enum:
- static
type: string
lacp-fallback-timeout:
maximum: 3600
minimum: 4
type: integer
lag-type:
default: static
enum:
- lacp
- static
type: string
member-speed:
enum:
- 100G
- 100M
- 10G
- 10M
- 1G
- 25G
- 400G
- 40G
type: string
min-links:
default: 1
maximum: 64
minimum: 1
type: integer
type: object
loopback-mode:
type: boolean
mtu:
maximum: 9500
minimum: 1500
type: integer
name:
maxLength: 20
minLength: 3
pattern: (mgmt0|mgmt0-standby|system0|lo(0|1[0-9][0-9]|2([0-4][0-9]|5[0-5])|[1-9][0-9]|[1-9])|ethernet-([1-9](\d){0,1}(/[abcd])?(/[1-9](\d){0,1})?/(([1-9](\d){0,1})|(1[0-1]\d)|(12[0-8])))|irb(0|1[0-9][0-9]|2([0-4][0-9]|5[0-5])|[1-9][0-9]|[1-9])|lag(([1-9](\d){0,1})|(1[0-1]\d)|(12[0-8])))
type: string
qos:
description: InterfaceQos struct
properties:
output:
description: InterfaceQosOutput struct
properties:
multicast-queue:
items:
description: InterfaceQosOutputMulticastQueue struct
properties:
queue-id:
maximum: 7
minimum: 0
type: integer
scheduling:
description: InterfaceQosOutputMulticastQueueScheduling
struct
properties:
peak-rate-percent:
default: 100
maximum: 100
minimum: 1
type: integer
type: object
template:
type: string
required:
- queue-id
type: object
type: array
scheduler:
description: InterfaceQosOutputScheduler struct
properties:
tier:
items:
description: InterfaceQosOutputSchedulerTier struct
properties:
level:
maximum: 4
minimum: 1
type: integer
node:
items:
description: InterfaceQosOutputSchedulerTierNode
struct
properties:
node-number:
maximum: 11
minimum: 0
type: integer
strict-priority:
type: boolean
weight:
default: 1
maximum: 127
minimum: 1
type: integer
required:
- node-number
type: object
type: array
required:
- level
type: object
type: array
type: object
unicast-queue:
items:
description: InterfaceQosOutputUnicastQueue struct
properties:
queue-id:
maximum: 7
minimum: 0
type: integer
scheduling:
description: InterfaceQosOutputUnicastQueueScheduling
struct
properties:
peak-rate-percent:
default: 100
maximum: 100
minimum: 1
type: integer
strict-priority:
default: true
type: boolean
weight:
default: 1
maximum: 255
minimum: 1
type: integer
type: object
template:
type: string
voq-template:
type: string
required:
- queue-id
type: object
type: array
type: object
type: object
sflow:
description: InterfaceSflow struct
properties:
admin-state:
enum:
- disable
- enable
type: string
type: object
transceiver:
description: InterfaceTransceiver struct
properties:
ddm-events:
type: boolean
forward-error-correction:
default: disabled
enum:
- base-r
- disabled
- rs-108
- rs-528
- rs-544
type: string
tx-laser:
type: boolean
type: object
vlan-tagging:
type: boolean
required:
- name
type: object
type: array
required:
- interface
type: object
status:
description: SrlInterfaceStatus struct
properties:
configurationDependencyTargetFound:
description: ConfigurationDependencyTargetNotFound identifies if the
target of the resource object is missing or not
enum:
- Success
- Failed
type: string
configurationDependencyValidationStatus:
description: ConfigurationDependencyValidationStatus identifies the
status of the LeafRef Validation of the resource object
enum:
- Success
- Failed
type: string
lastUpdated:
description: LastUpdated identifies when this status was last observed.
format: date-time
type: string
targetStatus:
additionalProperties:
description: TargetStatus provides the status of the configuration
applied on this particular device
properties:
configStatus:
default: ""
description: ConfigStatus defines the states the resource object
is reporting
enum:
- ""
- Deleting
- DeleteFailed
- DeleteSuccess
- Configuring
- ConfiguredSuccess
- ConfigStatusConfigureFailed
type: string
configStatusDetails:
default: ""
type: string
errorCount:
default: 0
description: ErrorCount records how many times the host has
encoutered an error since the last successful operation
type: integer
required:
- configStatus
- errorCount
type: object
description: Target provides the status of the configuration on the
device
type: object
usedSpec:
description: UsedSpec provides the spec used for the configuration
properties:
interface:
items:
description: Interface struct
properties:
admin-state:
default: enable
enum:
- disable
- enable
type: string
description:
maxLength: 255
minLength: 1
pattern: '[A-Za-z0-9 !@#$^&()|+=`~.,''/_:;?-]*'
type: string
ethernet:
description: InterfaceEthernet struct
properties:
aggregate-id:
type: string
auto-negotiate:
type: boolean
duplex-mode:
enum:
- full
- half
type: string
flow-control:
description: InterfaceEthernetFlowControl struct
properties:
receive:
type: boolean
transmit:
type: boolean
type: object
lacp-port-priority:
maximum: 65535
minimum: 0
type: integer
port-speed:
enum:
- 100G
- 100M
- 10G
- 10M
- 1G
- 1T
- 200G
- 25G
- 400G
- 40G
- 50G
type: string
type: object
lag:
description: InterfaceLag struct
properties:
lacp:
description: InterfaceLagLacp struct
properties:
admin-key:
maximum: 65535
minimum: 1
type: integer
interval:
default: SLOW
enum:
- FAST
- SLOW
type: string
lacp-mode:
default: ACTIVE
enum:
- ACTIVE
- PASSIVE
type: string
system-id-mac:
pattern: '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'
type: string
system-priority:
maximum: 65535
minimum: 0
type: integer
type: object
lacp-fallback-mode:
enum:
- static
type: string
lacp-fallback-timeout:
maximum: 3600
minimum: 4
type: integer
lag-type:
default: static
enum:
- lacp
- static
type: string
member-speed:
enum:
- 100G
- 100M
- 10G
- 10M
- 1G
- 25G
- 400G
- 40G
type: string
min-links:
default: 1
maximum: 64
minimum: 1
type: integer
type: object
loopback-mode:
type: boolean
mtu:
maximum: 9500
minimum: 1500
type: integer
name:
maxLength: 20
minLength: 3
pattern: (mgmt0|mgmt0-standby|system0|lo(0|1[0-9][0-9]|2([0-4][0-9]|5[0-5])|[1-9][0-9]|[1-9])|ethernet-([1-9](\d){0,1}(/[abcd])?(/[1-9](\d){0,1})?/(([1-9](\d){0,1})|(1[0-1]\d)|(12[0-8])))|irb(0|1[0-9][0-9]|2([0-4][0-9]|5[0-5])|[1-9][0-9]|[1-9])|lag(([1-9](\d){0,1})|(1[0-1]\d)|(12[0-8])))
type: string
qos:
description: InterfaceQos struct
properties:
output:
description: InterfaceQosOutput struct
properties:
multicast-queue:
items:
description: InterfaceQosOutputMulticastQueue
struct
properties:
queue-id:
maximum: 7
minimum: 0
type: integer
scheduling:
description: InterfaceQosOutputMulticastQueueScheduling
struct
properties:
peak-rate-percent:
default: 100
maximum: 100
minimum: 1
type: integer
type: object
template:
type: string
required:
- queue-id
type: object
type: array
scheduler:
description: InterfaceQosOutputScheduler struct
properties:
tier:
items:
description: InterfaceQosOutputSchedulerTier
struct
properties:
level:
maximum: 4
minimum: 1
type: integer
node:
items:
description: InterfaceQosOutputSchedulerTierNode
struct
properties:
node-number:
maximum: 11
minimum: 0
type: integer
strict-priority:
type: boolean
weight:
default: 1
maximum: 127
minimum: 1
type: integer
required:
- node-number
type: object
type: array
required:
- level
type: object
type: array
type: object
unicast-queue:
items:
description: InterfaceQosOutputUnicastQueue struct
properties:
queue-id:
maximum: 7
minimum: 0
type: integer
scheduling:
description: InterfaceQosOutputUnicastQueueScheduling
struct
properties:
peak-rate-percent:
default: 100
maximum: 100
minimum: 1
type: integer
strict-priority:
default: true
type: boolean
weight:
default: 1
maximum: 255
minimum: 1
type: integer
type: object
template:
type: string
voq-template:
type: string
required:
- queue-id
type: object
type: array
type: object
type: object
sflow:
description: InterfaceSflow struct
properties:
admin-state:
enum:
- disable
- enable
type: string
type: object
transceiver:
description: InterfaceTransceiver struct
properties:
ddm-events:
type: boolean
forward-error-correction:
default: disabled
enum:
- base-r
- disabled
- rs-108
- rs-528
- rs-544
type: string
tx-laser:
type: boolean
type: object
vlan-tagging:
type: boolean
required:
- name
type: object
type: array
required:
- interface
type: object
validationDetails:
additionalProperties:
description: ValidationDetails provides the status of the configuration
applied on this particular device
properties:
leafRefParh:
description: LeafRefPath points to the leafref object value
type: string
leafRefValues:
description: LeafRefValues identifies the values assigned in
the leaf ref
items:
type: string
type: array
values:
description: Values identifies the object value that should
match the leafref value if empty it means the object does
not exist.
items:
type: string
type: array
type: object
description: ConfigurationDependencyValidationDetails defines the
validation details of the resource object
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Unless I'm mistaken, this is likely more complicated than "just" fixing the
crd2pulumi
tool (I tried).
Quite possibly. I haven't dug deep on the specifics here, but can think of a couple options that may be relevant.
crd2pulumi
without requiring external changes.crd2pulumi
to specify the override in the schema (along these lines), and then would require changes in the pulumi/pulumi
codegen to make use of these overrides. It's simple in concept, but would require a fair bit of work.Hi, crd2pulumi
is funtastic tool, but faced same issue with not supported generated names with dashes (-) in them. Is there any news on that topic?
i'm also currently running into this problem, with python, rather than go - it's generating code like class CiliumEndpointStatusExternal-Identifiers(dict):
. are there any updates here?
Hi @doy-materialize, would it be possible to get the full CRD so that I can reproduce your problem?
sure!
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
creationTimestamp: "2022-08-08T20:44:50Z"
generation: 1
labels:
io.cilium.k8s.crd.schema.version: 1.24.3
name: ciliumendpoints.cilium.io
resourceVersion: "568"
uid: 87f61f4e-c20b-4f50-a749-4a60e68662dd
spec:
conversion:
strategy: None
group: cilium.io
names:
kind: CiliumEndpoint
listKind: CiliumEndpointList
plural: ciliumendpoints
shortNames:
- cep
- ciliumep
singular: ciliumendpoint
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Cilium endpoint id
jsonPath: .status.id
name: Endpoint ID
type: integer
- description: Cilium identity id
jsonPath: .status.identity.id
name: Identity ID
type: integer
- description: Ingress enforcement in the endpoint
jsonPath: .status.policy.ingress.enforcing
name: Ingress Enforcement
type: boolean
- description: Egress enforcement in the endpoint
jsonPath: .status.policy.egress.enforcing
name: Egress Enforcement
type: boolean
- description: Status of visibility policy in the endpoint
jsonPath: .status.visibility-policy-status
name: Visibility Policy
type: string
- description: Endpoint current state
jsonPath: .status.state
name: Endpoint State
type: string
- description: Endpoint IPv4 address
jsonPath: .status.networking.addressing[0].ipv4
name: IPv4
type: string
- description: Endpoint IPv6 address
jsonPath: .status.networking.addressing[0].ipv6
name: IPv6
type: string
name: v2
schema:
openAPIV3Schema:
description: CiliumEndpoint is the status of a Cilium policy rule.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
status:
description: EndpointStatus is the status of a Cilium endpoint.
properties:
controllers:
description: Controllers is the list of failing controllers for this
endpoint.
items:
description: ControllerStatus is the status of a failing controller.
properties:
configuration:
description: Configuration is the controller configuration
properties:
error-retry:
description: Retry on error
type: boolean
error-retry-base:
description: 'Base error retry back-off time Format: duration'
format: int64
type: integer
interval:
description: 'Regular synchronization interval Format: duration'
format: int64
type: integer
type: object
name:
description: Name is the name of the controller
type: string
status:
description: Status is the status of the controller
properties:
consecutive-failure-count:
format: int64
type: integer
failure-count:
format: int64
type: integer
last-failure-msg:
type: string
last-failure-timestamp:
type: string
last-success-timestamp:
type: string
success-count:
format: int64
type: integer
type: object
uuid:
description: UUID is the UUID of the controller
type: string
type: object
type: array
encryption:
description: Encryption is the encryption configuration of the node
properties:
key:
description: Key is the index to the key to use for encryption
or 0 if encryption is disabled.
type: integer
type: object
external-identifiers:
description: ExternalIdentifiers is a set of identifiers to identify
the endpoint apart from the pod name. This includes container runtime
IDs.
properties:
container-id:
description: ID assigned by container runtime
type: string
container-name:
description: Name assigned to container
type: string
docker-endpoint-id:
description: Docker endpoint ID
type: string
docker-network-id:
description: Docker network ID
type: string
k8s-namespace:
description: K8s namespace for this endpoint
type: string
k8s-pod-name:
description: K8s pod name for this endpoint
type: string
pod-name:
description: K8s pod for this endpoint(Deprecated, use K8sPodName
and K8sNamespace instead)
type: string
type: object
health:
description: Health is the overall endpoint & subcomponent health.
properties:
bpf:
description: bpf
type: string
connected:
description: Is this endpoint reachable
type: boolean
overallHealth:
description: overall health
type: string
policy:
description: policy
type: string
type: object
id:
description: ID is the cilium-agent-local ID of the endpoint.
format: int64
type: integer
identity:
description: Identity is the security identity associated with the
endpoint
properties:
id:
description: ID is the numeric identity of the endpoint
format: int64
type: integer
labels:
description: Labels is the list of labels associated with the
identity
items:
type: string
type: array
type: object
log:
description: Log is the list of the last few warning and error log
entries
items:
description: "EndpointStatusChange Indication of a change of status
\n swagger:model EndpointStatusChange"
properties:
code:
description: 'Code indicate type of status change Enum: [ok
failed]'
type: string
message:
description: Status message
type: string
state:
description: state
type: string
timestamp:
description: Timestamp when status change occurred
type: string
type: object
type: array
named-ports:
description: "NamedPorts List of named Layer 4 port and protocol pairs
which will be used in Network Policy specs. \n swagger:model NamedPorts"
items:
description: "Port Layer 4 port / protocol pair \n swagger:model
Port"
properties:
name:
description: Optional layer 4 port name
type: string
port:
description: Layer 4 port number
type: integer
protocol:
description: 'Layer 4 protocol Enum: [TCP UDP ICMP ICMPV6 ANY]'
type: string
type: object
type: array
networking:
description: Networking is the networking properties of the endpoint.
properties:
addressing:
description: IP4/6 addresses assigned to this Endpoint
items:
description: AddressPair is is a par of IPv4 and/or IPv6 address.
properties:
ipv4:
type: string
ipv6:
type: string
type: object
type: array
node:
description: NodeIP is the IP of the node the endpoint is running
on. The IP must be reachable between nodes.
type: string
required:
- addressing
type: object
policy:
description: EndpointPolicy represents the endpoint's policy by listing
all allowed ingress and egress identities in combination with L4
port and protocol.
properties:
egress:
description: EndpointPolicyDirection is the list of allowed identities
per direction.
properties:
adding:
description: Deprecated
items:
description: IdentityTuple specifies a peer by identity,
destination port and protocol.
properties:
dest-port:
type: integer
identity:
format: int64
type: integer
identity-labels:
additionalProperties:
type: string
type: object
protocol:
type: integer
type: object
type: array
allowed:
description: AllowedIdentityList is a list of IdentityTuples
that species peers that are allowed.
items:
description: IdentityTuple specifies a peer by identity,
destination port and protocol.
properties:
dest-port:
type: integer
identity:
format: int64
type: integer
identity-labels:
additionalProperties:
type: string
type: object
protocol:
type: integer
type: object
type: array
denied:
description: DenyIdentityList is a list of IdentityTuples
that species peers that are denied.
items:
description: IdentityTuple specifies a peer by identity,
destination port and protocol.
properties:
dest-port:
type: integer
identity:
format: int64
type: integer
identity-labels:
additionalProperties:
type: string
type: object
protocol:
type: integer
type: object
type: array
enforcing:
type: boolean
removing:
description: Deprecated
items:
description: IdentityTuple specifies a peer by identity,
destination port and protocol.
properties:
dest-port:
type: integer
identity:
format: int64
type: integer
identity-labels:
additionalProperties:
type: string
type: object
protocol:
type: integer
type: object
type: array
required:
- enforcing
type: object
ingress:
description: EndpointPolicyDirection is the list of allowed identities
per direction.
properties:
adding:
description: Deprecated
items:
description: IdentityTuple specifies a peer by identity,
destination port and protocol.
properties:
dest-port:
type: integer
identity:
format: int64
type: integer
identity-labels:
additionalProperties:
type: string
type: object
protocol:
type: integer
type: object
type: array
allowed:
description: AllowedIdentityList is a list of IdentityTuples
that species peers that are allowed.
items:
description: IdentityTuple specifies a peer by identity,
destination port and protocol.
properties:
dest-port:
type: integer
identity:
format: int64
type: integer
identity-labels:
additionalProperties:
type: string
type: object
protocol:
type: integer
type: object
type: array
denied:
description: DenyIdentityList is a list of IdentityTuples
that species peers that are denied.
items:
description: IdentityTuple specifies a peer by identity,
destination port and protocol.
properties:
dest-port:
type: integer
identity:
format: int64
type: integer
identity-labels:
additionalProperties:
type: string
type: object
protocol:
type: integer
type: object
type: array
enforcing:
type: boolean
removing:
description: Deprecated
items:
description: IdentityTuple specifies a peer by identity,
destination port and protocol.
properties:
dest-port:
type: integer
identity:
format: int64
type: integer
identity-labels:
additionalProperties:
type: string
type: object
protocol:
type: integer
type: object
type: array
required:
- enforcing
type: object
type: object
state:
description: State is the state of the endpoint.
enum:
- creating
- waiting-for-identity
- not-ready
- waiting-to-regenerate
- regenerating
- restoring
- ready
- disconnecting
- disconnected
- invalid
type: string
visibility-policy-status:
type: string
type: object
required:
- metadata
type: object
served: true
storage: true
subresources: {}
status:
acceptedNames:
kind: CiliumEndpoint
listKind: CiliumEndpointList
plural: ciliumendpoints
shortNames:
- cep
- ciliumep
singular: ciliumendpoint
conditions:
- lastTransitionTime: "2022-08-08T20:44:50Z"
message: no conflicts found
reason: NoConflicts
status: "True"
type: NamesAccepted
- lastTransitionTime: "2022-08-08T20:44:50Z"
message: the initial names have been accepted
reason: InitialNamesAccepted
status: "True"
type: Established
storedVersions:
- v2
Hi
I am getting this error for C# so the issue does not seam to be fixed.
Re-opening because this is not fixed.
Reproduction:
mkdir crdtest && cd cdrtest
crd2pulumi --dotnetPath dotnet --dotnet https://gist.githubusercontent.com/pierskarsenbarg/707236cbfd649025494aa010d95ffb93/raw/f5adab7fccd3007ecf21d675033a3c257c42b4fb/crd.yaml
dotnet
folder: cd dotnet
dotnet build
to see error. From a very basic overview (running the crd2pulumi
with different flags) it seems that only .NET and NodeJS are affected here. Python and Go seem fine
It looks like we'd need the fixes in upstream pu/pu as well for .Net, nodejs, an Java. Note, Java codegen was only recently enabled in this project, but a release has not been cut yet that includes this feature. A local build of crd2pulumi also encountered issues with Java generation.
Looking at the history for fixing this, https://github.com/pulumi/pulumi/pull/11049 was merged that closed this issue. However, this upstream pu/pu fix only targeted Python and Go. We'd need something similar for the other languages.
It looks like we'd need the fixes in upstream pu/pu as well for .Net, nodejs, an Java. Note, Java codegen was only recently enabled in this project, but a release has not been cut yet that includes this feature. A local build of crd2pulumi also encountered issues with Java generation.
Looking at the history for fixing this, pulumi/pulumi#11049 was merged that closed this issue. However, this upstream pu/pu fix only targeted Python and Go. We'd need something similar for the other languages.
Created an issue on pu/pu here https://github.com/pulumi/pulumi/issues/15874
I tried to get a minimal repro with just a failing schema, and that did reproduce the issue for me in ts/cs but I didn't see an issue with Java. It's unclear if this is due to my repro not capturing something specific to crd2pulumi; maybe the issue was fixed in a newer pulumi-java release than we're using; or something else.
Added to epic https://github.com/pulumi/home/issues/3431
I am using a crd which has property names with - in it and the crd2pulumi failed with
input file:
I changed the code as per below and this solves it for me.