示例#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)),
	)
}
示例#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)),
	)
}
示例#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)),
	)
}
示例#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})),
	)
}