예제 #1
0
// NewGetterFromStorageInterface returns a ServiceAccountTokenGetter that
// uses the specified storage to retrieve service accounts and secrets.
func NewGetterFromStorageInterface(storage storage.Interface) ServiceAccountTokenGetter {
	return NewGetterFromRegistries(
		serviceaccount.NewRegistry(serviceaccountetcd.NewStorage(storage)),
		secret.NewRegistry(secretetcd.NewStorage(storage)),
	)
}
예제 #2
0
// NewGetterFromEtcdHelper returns a ServiceAccountTokenGetter that
// uses the specified helper to retrieve service accounts and secrets.
func NewGetterFromEtcdHelper(helper tools.EtcdHelper) ServiceAccountTokenGetter {
	return NewGetterFromRegistries(
		serviceaccount.NewRegistry(serviceaccountetcd.NewStorage(helper)),
		secret.NewRegistry(secretetcd.NewStorage(helper)),
	)
}