Skip to content

Commit

Permalink
Merge pull request #398 from vmware-tanzu/mapper-typo-fix
Browse files Browse the repository at this point in the history
fix typos in map_functions that would break service account fetching
  • Loading branch information
Joshua Winters authored Nov 26, 2021
2 parents 8273e39 + d5c8b2b commit dc7ecd8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pkg/registrar/map_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ func (mapper *Mapper) RoleBindingToWorkloadRequests(roleBindingObject client.Obj
if subject.APIGroup == "" && subject.Kind == "ServiceAccount" {
serviceAccountObject := &corev1.ServiceAccount{}
serviceAccountKey := client.ObjectKey{
Namespace: subject.Name,
Name: subject.Namespace,
Namespace: subject.Namespace,
Name: subject.Name,
}
err := mapper.Client.Get(context.TODO(), serviceAccountKey, serviceAccountObject)
if err != nil {
Expand All @@ -349,8 +349,8 @@ func (mapper *Mapper) ClusterRoleBindingToWorkloadRequests(clusterRoleBindingObj
if subject.APIGroup == "" && subject.Kind == "ServiceAccount" {
serviceAccountObject := &corev1.ServiceAccount{}
serviceAccountKey := client.ObjectKey{
Namespace: subject.Name,
Name: subject.Namespace,
Namespace: subject.Namespace,
Name: subject.Name,
}
err := mapper.Client.Get(context.TODO(), serviceAccountKey, serviceAccountObject)
if err != nil {
Expand Down Expand Up @@ -464,8 +464,8 @@ func (mapper *Mapper) RoleBindingToDeliverableRequests(roleBindingObject client.
if subject.APIGroup == "" && subject.Kind == "ServiceAccount" {
serviceAccountObject := &corev1.ServiceAccount{}
serviceAccountKey := client.ObjectKey{
Namespace: subject.Name,
Name: subject.Namespace,
Namespace: subject.Namespace,
Name: subject.Name,
}
err := mapper.Client.Get(context.TODO(), serviceAccountKey, serviceAccountObject)
if err != nil {
Expand All @@ -489,8 +489,8 @@ func (mapper *Mapper) ClusterRoleBindingToDeliverableRequests(clusterRoleBinding
if subject.APIGroup == "" && subject.Kind == "ServiceAccount" {
serviceAccountObject := &corev1.ServiceAccount{}
serviceAccountKey := client.ObjectKey{
Namespace: subject.Name,
Name: subject.Namespace,
Namespace: subject.Namespace,
Name: subject.Name,
}
err := mapper.Client.Get(context.TODO(), serviceAccountKey, serviceAccountObject)
if err != nil {
Expand Down Expand Up @@ -605,8 +605,8 @@ func (mapper *Mapper) RoleBindingToRunnableRequests(roleBindingObject client.Obj
serviceAccountObject := &corev1.ServiceAccount{}

serviceAccountKey := client.ObjectKey{
Namespace: subject.Name,
Name: subject.Namespace,
Namespace: subject.Namespace,
Name: subject.Name,
}
err := mapper.Client.Get(context.TODO(), serviceAccountKey, serviceAccountObject)
if err != nil {
Expand All @@ -630,8 +630,8 @@ func (mapper *Mapper) ClusterRoleBindingToRunnableRequests(clusterRoleBindingObj
if subject.APIGroup == "" && subject.Kind == "ServiceAccount" {
serviceAccountObject := &corev1.ServiceAccount{}
serviceAccountKey := client.ObjectKey{
Namespace: subject.Name,
Name: subject.Namespace,
Namespace: subject.Namespace,
Name: subject.Name,
}
err := mapper.Client.Get(context.TODO(), serviceAccountKey, serviceAccountObject)
if err != nil {
Expand Down

0 comments on commit dc7ecd8

Please sign in to comment.