1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 14:29:40 +02:00

feat(docker/kubernetes): backend docker and kubernetes dependency updates (#5861)

* client-go library update + go mod tidy

* update all k8s methods to include context

* docker/cli updated to v20.10.9 (latest)

* - removed docker/docker to docker/engine replace directive
- go mod tidy

* docker/docker updated to v20.10.9 (latest)
This commit is contained in:
zees-dev 2021-10-12 15:32:14 +13:00 committed by GitHub
parent e6d690e31e
commit 54d47ebc76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 971 additions and 177 deletions

View file

@ -50,8 +50,8 @@ func Test_GetKubeConfig(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{Name: tokenData.Username},
}
k.cli.CoreV1().ServiceAccounts(portainerNamespace).Create(serviceAccount)
defer k.cli.CoreV1().ServiceAccounts(portainerNamespace).Delete(serviceAccount.Name, nil)
k.cli.CoreV1().ServiceAccounts(portainerNamespace).Create(context.Background(), serviceAccount, metav1.CreateOptions{})
defer k.cli.CoreV1().ServiceAccounts(portainerNamespace).Delete(context.Background(), serviceAccount.Name, metav1.DeleteOptions{})
_, err := k.GetKubeConfig(context.Background(), "localhost", "abc", tokenData)
@ -75,8 +75,8 @@ func Test_GetKubeConfig(t *testing.T) {
ObjectMeta: metav1.ObjectMeta{Name: nonAdminUserName},
}
k.cli.CoreV1().ServiceAccounts(portainerNamespace).Create(serviceAccount)
defer k.cli.CoreV1().ServiceAccounts(portainerNamespace).Delete(serviceAccount.Name, nil)
k.cli.CoreV1().ServiceAccounts(portainerNamespace).Create(context.Background(), serviceAccount, metav1.CreateOptions{})
defer k.cli.CoreV1().ServiceAccounts(portainerNamespace).Delete(context.Background(), serviceAccount.Name, metav1.DeleteOptions{})
_, err := k.GetKubeConfig(context.Background(), "localhost", "abc", tokenData)