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
{{ message }}
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
We may have wanted to use this function for many things in the past, but now it is only parsing SDSCert.Name
I propose we remove UnmarshalK8sServiceAccount() as a standalone function and make it a method on SDSCert.
So instead of UnmarshalK8sServiceAccount(sdsCert) we will have sdsCert.GetK8SServiceAccount() (This obviously assumes a rename from UnmarshalK8sServiceAccount to GetK8SServiceAccount).
I propose:
To avoid cyclical imports - create a new package - perhaps pkg/envoy/secrets or something similar
The goal of this GitHub issue is to remove complexity and potential errors.
The function
identity.UnmarshalK8sServiceAccount()
osm/pkg/identity/types.go
Line 78 in 6681538
is used only on
SDSCert.Name
here:osm/pkg/envoy/sds/response.go
Line 169 in 6681538
We may have wanted to use this function for many things in the past, but now it is only parsing
SDSCert.Name
I propose we remove
UnmarshalK8sServiceAccount()
as a standalone function and make it a method onSDSCert
.So instead of
UnmarshalK8sServiceAccount(sdsCert)
we will havesdsCert.GetK8SServiceAccount()
(This obviously assumes a rename from UnmarshalK8sServiceAccount to GetK8SServiceAccount).I propose:
pkg/envoy/secrets
or something similarSDSCert{}
there:osm/pkg/envoy/xdsutil.go
Lines 22 to 37 in 06e70ae
SDSCert.Name
be a newtype SDSCertName string
SDSCert{}.GetK8SServiceAccount()
-- same asUnmarshalK8sServiceAccount(certName)
UnmarshalK8sServiceAccount
forSDSCert{}.GetK8SServiceAccount()
References
The text was updated successfully, but these errors were encountered: