2021-12-01 00:18:57 +00:00
|
|
|
package kubernetes
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
2022-09-28 17:56:32 +00:00
|
|
|
|
|
|
|
"github.com/portainer/portainer/api/internal/registryutils"
|
2021-12-01 00:18:57 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (transport *baseTransport) refreshRegistry(request *http.Request, namespace string) (err error) {
|
|
|
|
cli, err := transport.k8sClientFactory.GetKubeClient(transport.endpoint)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
err = registryutils.RefreshEcrSecret(cli, transport.endpoint, transport.dataStore, namespace)
|
|
|
|
|
|
|
|
return
|
2022-01-17 05:53:32 +00:00
|
|
|
}
|