-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated custom mappings #395
Conversation
f698a0c
to
065e1bc
Compare
Going to put any additional fixes in follow up PRs. |
065e1bc
to
784444f
Compare
This does not work: new CloudRunService(s, 'a', {
template: [
{
metadata: [
{
annotations: {
'autoscaling.knative.dev/maxScale': '1000',
'run.googleapis.com/cloudsql-instances': 'name',
'run.googleapis.com/sandbox': 'gvisor',
}
}
]
},
],
}) Those annotations will be converted to: {
"metadata": [
{
"annotations": {
"autoscaling_knative_dev_max_scale": "1000",
"run_googleapis_com_cloudsql_instances": "name",
"run_googleapis_com_sandbox": "gvisor"
}
}
]
}
How do I prevent it from converting dots to underscores? The only way I can seem to do it is by using the escape hatch: gcr.addOverride("template.0.metadata", [
{
annotations: {
"autoscaling.knative.dev/maxScale": "1000",
"run.googleapis.com/cloudsql-instances": 'name',
"run.googleapis.com/sandbox": "gvisor",
},
},
]) It would be great if this worked without the escape hatch, but I can live with this for now. |
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Initial goal is to fix #235 but I may expand to pick up #223, #234, #282.
The representation of attribute types and how that applies to the generation and dependencies is definitely a bit messy and brittle, but I don't have any suggestions at this point on how to improve.