mappings

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2019 License: BSD-2-Clause Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceAccountMapper

type ServiceAccountMapper struct {
	// contains filtered or unexported fields
}

ServiceAccountMapper handles relevant logic around associating IPs with a given service account

func NewServiceAccountMapper

func NewServiceAccountMapper(serviceAccountKey string, scopeKey string, defaultServiceAccount string, defaultScopes string, namespaceRestriction bool, namespaceKey string, kubeStore store) *ServiceAccountMapper

NewServiceAccountMapper returns a new ServiceAccountMapper for use.

func (*ServiceAccountMapper) DumpDebugInfo

func (r *ServiceAccountMapper) DumpDebugInfo() map[string]interface{}

DumpDebugInfo outputs all the serviceAccounts by IP address.

func (*ServiceAccountMapper) GetServiceAccountMapping

func (r *ServiceAccountMapper) GetServiceAccountMapping(IP string) (*ServiceAccountMappingResult, error)

GetServiceAccountMapping returns the normalized iam ServiceAccountMappingResult based on IP address

type ServiceAccountMappingResult

type ServiceAccountMappingResult struct {
	ServiceAccount string   `json:"service_account"`
	IP             string   `json:"ip"`
	Scopes         []string `json:"scopes"`
	Namespace      string   `json:"namespace"`
}

ServiceAccountMappingResult represents the relevant information for a given mapping request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL