Comments (4)
Sorry, I should have made it clearer that my comment was for whomever works on the fix for this issue. I'm fairly certain this a bug in the schema generated internally by crd2pulumi
.
from crd2pulumi.
Update: comparing the type definitions of between my generated code and the k8s Service
class made me remove the undefined
part as well from:
apiVersion
kind
spec
status
from crd2pulumi.
I took a look at the schema for the k8s provider, and I think crd2pulumi may not be setting the requiredOutputs
language option for nodejs
. Here's what the schema should look like for a Service
resource:
"kubernetes:core/v1:Service": {
"description": "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.\n\nThis resource waits until its status is ready before registering success\nfor create/update, and populating output properties from the current state of the resource.\nThe following conditions are used to determine whether the resource creation has\nsucceeded or failed:\n\n1. Service object exists.\n2. Related Endpoint objects are created. Each time we get an update, wait 10 seconds\n for any stragglers.\n3. The endpoints objects target some number of living objects (unless the Service is\n an \"empty headless\" Service [1] or a Service with '.spec.type: ExternalName').\n4. External IP address is allocated (if Service has '.spec.type: LoadBalancer').\n\nKnown limitations: \nServices targeting ReplicaSets (and, by extension, Deployments,\nStatefulSets, etc.) with '.spec.replicas' set to 0 are not handled, and will time\nout. To work around this limitation, set 'pulumi.com/skipAwait: \"true\"' on\n'.metadata.annotations' for the Service. Work to handle this case is in progress [2].\n\n[1] https://kubernetes.io/docs/concepts/services-networking/service/#headless-services\n[2] https://github.com/pulumi/pulumi-kubernetes/pull/703\n\nIf the Service has not reached a Ready state after 10 minutes, it will\ntime out and mark the resource update as Failed. You can override the default timeout value\nby setting the 'customTimeouts' option on the resource.",
"properties": {
"apiVersion": {
"type": "string",
"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",
"const": "v1"
},
"kind": {
"type": "string",
"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",
"const": "Service"
},
"metadata": {
"$ref": "#/types/kubernetes:meta/v1:ObjectMeta",
"description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
},
"spec": {
"$ref": "#/types/kubernetes:core/v1:ServiceSpec",
"description": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
},
"status": {
"$ref": "#/types/kubernetes:core/v1:ServiceStatus",
"description": "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"type": "object",
"language": {
"nodejs": {
"requiredOutputs": [
"apiVersion",
"kind",
"metadata",
"spec",
"status"
]
}
}
},
Lines 152 to 181 in e646398
from crd2pulumi.
@lblackstone I don't understand what you are trying to explain here. For the record: I don't have problems with the core Kubernetes Service
class. I have problems with the properties in the generated BackendConfig
class, generated from the Google Cloud specific BackendConfig
CRD.
from crd2pulumi.
Related Issues (20)
- Generated setup.py is broken HOT 3
- Invalid typescript code generated when crd property is hyphenated/pascal case (-) e.g `auto-scaler` HOT 5
- panic: fatal: error An assertion has failed: could not parse Pulumi package. source error: could not import spec: <nil>: HOT 3
- Invalid typescript code produced when generating for strimzi crds HOT 4
- Duplicate declarations in generated Go package HOT 3
- Cannot generate from Contour CRDs HOT 4
- crontabs default example not working on python "pkg_resources.DistributionNotFound" HOT 6
- CRDS Gross type name generated in Python SDK for network policy HOT 7
- crd2pulumi generator splits types apart into duplicate entires in pulumiTypes.go and pulumiTypes1.go HOT 2
- cannot have a constant value; only booleans, integers, numbers and strings may have constant values HOT 8
- panic for complex default values
- CRD for Percona Server for MongoDB Operator generates invalid typescript:
- Python CRD's are broken because of hard coded utilities.py HOT 2
- Duplicate declarations in generated Golang code HOT 4
- Invalid NodeJS Identifiers Generated
- Add Java support
- [Python] pkg_resources.DistributionNotFound and _get_semver_version() HOT 7
- goPath not worked HOT 2
- [nodejs] Generated code is broken for grafana crd HOT 3
- using oneOf prevents doing any validation of the given parameter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crd2pulumi.