-
Notifications
You must be signed in to change notification settings - Fork 20
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
Importing prometheus-operator CRD causes compile to fail #578
Importing prometheus-operator CRD causes compile to fail #578
Comments
We're also facing this bug. Is anyone on this? :) |
Also running into this with prometheus PodMonitor The various enums accept different cases for the same string values, the resulting errors are:
I'm not super familiar with the internals here but it appears the strings are converted to the same variable name regardless of casing. For those also affected: manually removing the various cases of the same string from the CRDs will allow cdk8s to generate appropriate enough code. |
Related to #229 |
Also getting errors on Prometheus CRDs Error message - click me
|
@vinayak-kukreja lets make |
It seems like the original issue ( @iliapolo's proposal only addresses the second issue. For the first issue: would it be considered OK to transcribe such enums as |
Enums in schema which has same value but different casing creates same enum values which conflicts with each other. For instance, [observed](cdk8s-team/cdk8s-cli#578 (comment)) while importing a custom resource definition in cdk8s. ``` \| 1086 REPLACE = 'replace', -- \| ~~~~~~~ \| com.coreos.monitoring.ts:1088:3 - error TS2300: Duplicate identifier 'REPLACE'. \| 1088 REPLACE = 'Replace', \| ~~~~~~~ \| com.coreos.monitoring.ts:1090:3 - error TS2300: Duplicate identifier 'KEEP'. \| 1090 KEEP = 'keep', \| ~~~~ \| com.coreos.monitoring.ts:1092:3 - error TS2300: Duplicate identifier 'KEEP'. \| 1092 KEEP = 'Keep', \| ~~~~ \| com.coreos.monitoring.ts:1094:3 - error TS2300: Duplicate identifier 'DROP'. \| 1094 DROP = 'drop', \| ~~~~ \| com.coreos.monitoring.ts:1096:3 - error TS2300: Duplicate identifier 'DROP'. \| 1096 DROP = 'Drop', ``` Fixes cdk8s-team/cdk8s-cli#578 --------- Signed-off-by: Vinayak Kukreja <vinakuk@amazon.com>
…1261) Characters like, `!=, ==, =~, !~` etc would result in `VALUE_` enum values since we are not able to code generate these characters to something valid. This PR is adding an allowlist with some known characters to provide valid enum values if such a case occurs. Fixes cdk8s-team/cdk8s-cli#578 --------- Signed-off-by: Vinayak Kukreja <vinakuk@amazon.com>
Hey everyone, we have posted a fix for this issue, please let us know if you are still facing it. |
Hey all, please let us know if you still face this issue. Closing the thread for now. |
When importing
https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.60.1/bundle.yaml
the compile fails with following errorFrom imported CRD:
The text was updated successfully, but these errors were encountered: