Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #40 from gossion/guwe/projected-volume
Browse files Browse the repository at this point in the history
add GetSecrets() function to k8s resource manager
  • Loading branch information
feiskyer authored Sep 2, 2021
2 parents d22d879 + 7eefa59 commit c61b096
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions manager/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ func (rm *ResourceManager) GetSecret(name, namespace string) (*v1.Secret, error)
return rm.secretLister.Secrets(namespace).Get(name)
}

// GetSecrets retrieves the all secrets of a namespace from Kubernetes.
func (rm *ResourceManager) GetSecrets(namespace string) ([]*v1.Secret, error) {
return rm.secretLister.Secrets(namespace).List(labels.Everything())
}

// ListServices retrieves the list of services from Kubernetes.
func (rm *ResourceManager) ListServices() ([]*v1.Service, error) {
return rm.serviceLister.List(labels.Everything())
Expand Down

0 comments on commit c61b096

Please sign in to comment.