-
Notifications
You must be signed in to change notification settings - Fork 168
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
Return native kube API types instead of a proto conversion #708
Comments
@jessesuen @krancour We should investigate more into this issue, since the Kubernetes API relies on gogoproto, as you pointed out in #707. This means that issues like #490 may resurface. I'm somewhat concerned because this is a kind of creating our own dialect like |
|
No, I mean that the current Kubernetes native types (e.g. metav1.Time only works with gogoproto, not plain protobuf |
Ah. I mistakenly thought Kube moved off of gogoproto, but I see they have not. Hmmm, I agree we should not re-introduce gogoproto. Unfortunately, I'm at a loss on how to deal with the inconsistency that apiVersion: kargo.akuity.io/v1alpha1
kind: Stage
metadata:
name: staging
# native type would not return the following fields because omitempty works
# properly, but these fields *are* returned in our API
generateName: ""
labels: {}
ownerReferences: []
finalizers: [] |
@devholic does But this from kubectl: health:
argoCDApps:
- healthStatus:
status: Healthy
name: guestbook-prod-euw1
namespace: argocd
syncStatus:
revision: d3083b73a25f1f606118d4ba40ef5c4ffd277c5e
status: Synced
status: Healthy |
#708 (comment) Signed-off-by: Sunghoon Kang <hoon@akuity.io>
@jessesuen I think it's a problem of dashboard because API seems omit empty fields 🤔 #738 may fix the issue |
@jessesuen Seems the issue has been resolved after #738 merged, could you check? |
#738 treated the symptom rather than the cause. It is still onerous to have to do type conversions for sending things over the wire. I think this issue is asking that we send v1alpha1 resources directly over the wire without conversion. |
Signed-off-by: Sunghoon Kang <hoon@akuity.io>
Signed-off-by: Sunghoon Kang <hoon@akuity.io>
Signed-off-by: Sunghoon Kang <hoon@akuity.io>
Signed-off-by: Sunghoon Kang <hoon@akuity.io>
Signed-off-by: Sunghoon Kang <hoon@akuity.io>
`intstr.IntOrString` relies on `gogo/protobuf` for JSON encoding/decoding, which is incompatible with the protobuf dependency used in our UI. This commit extends `IntOrString` to encode/decode to/from JSON value to make compatible with `gogo/protobuf`. Related: - #708 - #1515 Signed-off-by: Sunghoon Kang <hoon@akuity.io>
In Kargo API, we convert from kubernetes types, to a different type which is returned in our gRPC/Connect server. And so we have conversion code like the following:
This is undesirable for many reasons:
Instead of converting and maintaining two different identical types, we should generate proto files from go-to-protobuf and return the native type from our API.
The text was updated successfully, but these errors were encountered: