-
Notifications
You must be signed in to change notification settings - Fork 3
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
Ingest new policy types #58
Conversation
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
6852737
to
7ef110b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐ Sweet, this is working for me locally! Thanks for putting it together. Just had a few tiny nits.
GET https://10.43.0.1:443/api/v1/namespaces/linkerd/configmaps/linkerd-identity-trust-roots 200 OK in 12 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1beta1 200 OK in 1 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1beta1/servers 200 OK in 7 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1beta1 200 OK in 2 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1beta1/serverauthorizations 200 OK in 5 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1alpha1 200 OK in 2 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1alpha1/authorizationpolicies 200 OK in 4 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1alpha1 200 OK in 1 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1alpha1/meshtlsauthentications 200 OK in 5 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1alpha1 200 OK in 2 milliseconds
GET https://10.43.0.1:443/apis/policy.linkerd.io/v1alpha1/networkauthentications 200 OK in 6 milliseconds
GET https://10.43.0.1:443/apis/multicluster.linkerd.io/v1alpha1 200 OK in 1 milliseconds
GET https://10.43.0.1:443/apis/multicluster.linkerd.io/v1alpha1/links 200 OK in 3 milliseconds
GET https://10.43.0.1:443/apis/linkerd.io/v1alpha2 200 OK in 1 milliseconds
GET https://10.43.0.1:443/apis/linkerd.io/v1alpha2/serviceprofiles 200 OK in 3 milliseconds
GET https://10.43.0.1:443/apis/split.smi-spec.io/v1alpha1 200 OK in 1 milliseconds
GET https://10.43.0.1:443/apis/split.smi-spec.io/v1alpha1/trafficsplits 200 OK in 4 milliseconds
agent/pkg/k8s/helpers_test.go
Outdated
case "MeshTLSAuthentication": | ||
l5dObjects = append(l5dObjects, obj) | ||
case "NetworkAuthentication": | ||
l5dObjects = append(l5dObjects, obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIOLI you could use multiple values in one case to shorten this up a bit. Something like:
switch obj.GetObjectKind().GroupVersionKind().Kind {
case "ServiceProfile", "ServerAuthorization", "Server", "AuthorizationPolicy",
"MeshTLSAuthentication", "NetworkAuthentication", "Link":
l5dObjects = append(l5dObjects, obj)
case "TrafficSplit":
tsObjs = append(tsObjs, obj)
default:
objs = append(objs, obj)
}
proto/buoyant-cloud-api.proto
Outdated
message AuthPolicyInfo { | ||
repeated Server servers = 1; | ||
repeated ServerAuthorization server_authorizations = 2; | ||
repeated AuthorizationPolicy authorization_policies = 3; | ||
repeated MeshTLSAuthentication mesh_tls_authenticatios = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here -- mesh_tls_authenticatios
=> mesh_tls_authentications
agent/pkg/handler/linkerd_info.go
Outdated
Servers: servers, | ||
ServerAuthorizations: serverAuths, | ||
AuthorizationPolicies: authPolicies, | ||
MeshTlsAuthenticatios: meshTlsAuthentications, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once you update the protobuf, this should be MeshTlsAuthentications
This PR enables the ingestion of the new Linkerd policy types that are outlined in linkerd/linkerd2#7709
Signed-off-by: Zahari Dichev zaharidichev@gmail.com