// GetSecret returns the specified ConfigMap from Kubernetes. It retrieves it from cache if there
GetSecret returns the specified ConfigMap from Kubernetes. It retrieves it from cache if there
// GetSecret returns the specified ConfigMap from Kubernetes . It retrieves it from cache if there
func (rm *ResourceManager) GetSecret(name, namespace string) (*v1.Secret, error) {
	rm.Lock()
	defer rm.Unlock()
	secretkey := rm.getStoreKey(namespace, name)
	if secret, ok := rm.secrets[secretkey]; ok {
		return secret, nil
	}
	var opts metav1.GetOptions
	secret, err := rm.k8sClient.CoreV1().Secrets(namespace).Get(name, opts)
	if err != nil {
		return nil, err
	}
	rm.secrets[secretkey] = secret
	return secret, err
}
func ( rm * ResourceManager ) GetSecret ( name , namespace string ) ( * v1 . Secret , error ) { rm . Lock ( ) defer rm . Unlock ( ) secretkey := rm . getStoreKey ( namespace , name ) if secret , ok := rm . secrets [ secretkey ] ; ok { return secret , nil } var opts metav1 . GetOptions secret , err := rm . k8sClient . CoreV1 ( ) . Secrets ( namespace ) . Get ( name , opts ) if err != nil { return nil , err } rm . secrets [ secretkey ] = secret return secret , err }
GetSecret returns the specified ConfigMap from Kubernetes.
GetSecret returns the specified ConfigMap from Kubernetes .