Exemplo n.º 1
0
// NewGetterFromStorageInterface returns a ServiceAccountTokenGetter that
// uses the specified storage to retrieve service accounts and secrets.
func NewGetterFromStorageInterface(s storage.Interface) ServiceAccountTokenGetter {
	return NewGetterFromRegistries(
		serviceaccount.NewRegistry(serviceaccountetcd.NewREST(s, storage.NoDecoration)),
		secret.NewRegistry(secretetcd.NewREST(s, storage.NoDecoration)),
	)
}
Exemplo n.º 2
0
// NewGetterFromStorageInterface returns a ServiceAccountTokenGetter that
// uses the specified storage to retrieve service accounts and secrets.
func NewGetterFromStorageInterface(s storage.Interface) serviceaccount.ServiceAccountTokenGetter {
	return NewGetterFromRegistries(
		serviceaccountregistry.NewRegistry(serviceaccountetcd.NewREST(s, generic.UndecoratedStorage)),
		secret.NewRegistry(secretetcd.NewREST(s, generic.UndecoratedStorage)),
	)
}
Exemplo n.º 3
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)),
	)
}
Exemplo n.º 4
0
// NewGetterFromStorageInterface returns a ServiceAccountTokenGetter that
// uses the specified storage to retrieve service accounts and secrets.
func NewGetterFromStorageInterface(s storage.Interface, saPrefix, secretPrefix string) serviceaccount.ServiceAccountTokenGetter {
	return NewGetterFromRegistries(
		serviceaccountregistry.NewRegistry(serviceaccountetcd.NewREST(generic.RESTOptions{Storage: s, Decorator: generic.UndecoratedStorage, ResourcePrefix: saPrefix})),
		secret.NewRegistry(secretetcd.NewREST(generic.RESTOptions{Storage: s, Decorator: generic.UndecoratedStorage, ResourcePrefix: secretPrefix})),
	)
}