You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dislaimer: I come from JavaLand. Applolgies if I am reporting something that would be easy to solve for people living in GoLand.
I am trying out NAML to cofify an existing deployment
I exported our deployment to yaml first via kubectl get all -n <my_namespace> -o yaml | tee out/all.yaml which resulted in a yaml file with 24031 lines
Then I switched to the out folder and converted it to go via cat all.yaml | naml codify > main.go which resulted in a go file with 26986 lines
Now that I tried go build main.go I am getting following errors
> naml build -o app
2022-04-25T11:14:16+02:00 [Warning ] ⚠ naml build alpha feature ⚠
2022-04-25T11:14:16+02:00 [Warning ] if this is a feature you plan on using please make your use case known in the issue tracker
2022-04-25T11:14:16+02:00 [Warning ] ⚠ naml build alpha feature ⚠
2022-04-25T11:14:17+02:00 [Critical ] unable to build NAML binary from source:
+-------------------------+---------------------------------
| Codify Compile Failure |
+-------------------------+
|
|
| # command-line-arguments
/tmp/3648555560.go:171:9: unknown field 'i' in struct literal of type resource.Quantity
/tmp/3648555560.go:171:21: int64Amount not exported by package resource
/tmp/3648555560.go:172:10: unknown field 'value' in struct literal of type resource.int64Amount
/tmp/3648555560.go:173:10: unknown field 'scale' in struct literal of type resource.int64Amount
/tmp/3648555560.go:175:9: unknown field 's' in struct literal of type resource.Quantity
/tmp/3648555560.go:179:9: unknown field 'i' in struct literal of type resource.Quantity
/tmp/3648555560.go:179:26: int64Amount not exported by package resource
/tmp/3648555560.go:179:38: unknown field 'value' in struct literal of type resource.int64Amount
/tmp/3648555560.go:180:9: unknown field 's' in struct literal of type resource.Quantity
/tmp/3648555560.go:186:21: int64Amount not exported by package resource
/tmp/3648555560.go:186:21: too many errors
+----------------------------------------------------------
Another thing that was quite strange to me was that NAML generated properties like NodeName: with the node a certain pod is currently running on. Haven't looked further but my gut feeling tells me that it generates code for pods resulting from staeful/daemon/replica-sets which doesn't feel right.
The text was updated successfully, but these errors were encountered:
amalic
changed the title
Errors building resulting main.go
Errors when building main.go
Apr 25, 2022
amalic
changed the title
Errors when building main.go
Errors when building generated main.go
Apr 25, 2022
Dislaimer: I come from JavaLand. Applolgies if I am reporting something that would be easy to solve for people living in GoLand.
I am trying out NAML to cofify an existing deployment
kubectl get all -n <my_namespace> -o yaml | tee out/all.yaml
which resulted in a yaml file with 24031 linescat all.yaml | naml codify > main.go
which resulted in a go file with 26986 linesgo build main.go
I am getting following errorsAnother thing that was quite strange to me was that NAML generated properties like
NodeName:
with the node a certain pod is currently running on. Haven't looked further but my gut feeling tells me that it generates code for pods resulting from staeful/daemon/replica-sets which doesn't feel right.The text was updated successfully, but these errors were encountered: