Skip to content

Commit 14b0cc1

Browse files
authored
Merge pull request #2 from lizardruss/exec-v1beta1
fix: use client.authentication.k8s.io/v1beta1
2 parents 3dd21ac + bbba2b1 commit 14b0cc1

File tree

611 files changed

+91179
-128829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

611 files changed

+91179
-128829
lines changed

go.mod

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@ module github.com/devspace-cloud/devspace-cloud-plugin
22

33
require (
44
github.com/blang/semver v3.5.1+incompatible
5-
github.com/daviddengcn/go-colortext v1.0.0 // indirect
65
github.com/devspace-cloud/devspace v1.1.1-0.20200724074930-ec77a1851818
6+
github.com/juju/testing v0.0.0-20220203020004-a0ff61f03494 // indirect
77
github.com/machinebox/graphql v0.2.2
8+
github.com/matryer/is v1.4.0 // indirect
89
github.com/mattn/go-colorable v0.1.7 // indirect
910
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
1011
github.com/mitchellh/go-homedir v1.1.0
12+
github.com/otiai10/mint v1.3.3 // indirect
1113
github.com/pkg/errors v0.9.1
1214
github.com/rhysd/go-github-selfupdate v0.0.0-20180520142321-41c1bbb0804a
15+
github.com/rjeczalik/notify v0.9.2 // indirect
16+
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
1317
github.com/sirupsen/logrus v1.4.2
1418
github.com/spf13/cobra v1.0.0
1519
github.com/spf13/pflag v1.0.5
16-
gopkg.in/yaml.v2 v2.2.8
20+
github.com/tklauser/go-sysconf v0.3.10 // indirect
21+
github.com/yusufpapurcu/wmi v1.2.2 // indirect
22+
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
23+
gopkg.in/yaml.v2 v2.4.0
1724
gotest.tools v2.2.0+incompatible
1825
k8s.io/api v0.18.2
1926
k8s.io/apimachinery v0.18.6
@@ -23,7 +30,6 @@ require (
2330
replace (
2431
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.0+incompatible
2532
github.com/agl/ed25519 => github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412
26-
golang.org/x/sys => golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9
2733
)
2834

2935
go 1.13

go.sum

Lines changed: 149 additions & 33 deletions
Large diffs are not rendered by default.

hack/build-all.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ if [[ -z "${DEVSPACE_BUILD_PLATFORMS}" ]]; then
3232
fi
3333

3434
if [[ -z "${DEVSPACE_BUILD_ARCHS}" ]]; then
35-
DEVSPACE_BUILD_ARCHS="amd64 386"
35+
DEVSPACE_BUILD_ARCHS="amd64 386 arm64"
3636
fi
3737

3838
mkdir -p "${DEVSPACE_ROOT}/release"
@@ -52,7 +52,7 @@ for OS in ${DEVSPACE_BUILD_PLATFORMS[@]}; do
5252
CGO_ENABLED=0
5353
fi
5454

55-
if [[ "${ARCH}" == "386" && "${OS}" == "darwin" ]]; then
55+
if [[ ("${ARCH}" == "386" && "${OS}" == "darwin") || ("${ARCH}" == "arm64" && "${OS}" != "darwin") ]]; then
5656
# darwin 386 is deprecated and shouldn't be used anymore
5757
echo "Building for ${OS}/${ARCH} not supported."
5858
else

pkg/cloud/configure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (p *provider) UpdateKubeConfig(contextName string, serviceAccount *latest.S
4444

4545
authInfo := api.NewAuthInfo()
4646
authInfo.Exec = &api.ExecConfig{
47-
APIVersion: "client.authentication.k8s.io/v1alpha1",
47+
APIVersion: "client.authentication.k8s.io/v1beta1",
4848
Command: kubeconfig.AuthCommand,
4949
Args: []string{"use", "space", "--provider", p.Name, "--space-id", strconv.Itoa(spaceID), "--get-token", "--silent"},
5050
}

pkg/cloud/configure_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestUpdateKubeConfig(t *testing.T) {
4343
AuthInfos: map[string]*api.AuthInfo{
4444
"contextParam": &api.AuthInfo{
4545
Exec: &api.ExecConfig{
46-
APIVersion: "client.authentication.k8s.io/v1alpha1",
46+
APIVersion: "client.authentication.k8s.io/v1beta1",
4747
Command: "devspace",
4848
Args: []string{"use", "space", "--provider", "providerName", "--space-id", "2", "--get-token", "--silent"},
4949
},

pkg/cloud/print.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/devspace-cloud/devspace-cloud-plugin/pkg/cloud/token"
1212
"github.com/pkg/errors"
1313
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14-
"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1"
14+
"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1"
1515

1616
"github.com/devspace-cloud/devspace/pkg/util/log"
1717
)
@@ -160,12 +160,12 @@ func (p *provider) resume(server, caCert, token, namespace string, spaceID int,
160160
func printToken(token string) error {
161161
// Print token to stdout
162162
expireTime := metav1.NewTime(time.Now().Add(time.Hour))
163-
response := &v1alpha1.ExecCredential{
163+
response := &v1beta1.ExecCredential{
164164
TypeMeta: metav1.TypeMeta{
165165
Kind: "ExecCredential",
166-
APIVersion: "client.authentication.k8s.io/v1alpha1",
166+
APIVersion: "client.authentication.k8s.io/v1beta1",
167167
},
168-
Status: &v1alpha1.ExecCredentialStatus{
168+
Status: &v1beta1.ExecCredentialStatus{
169169
Token: token,
170170
ExpirationTimestamp: &expireTime,
171171
},

vendor/github.com/StackExchange/wmi/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

vendor/github.com/go-ole/go-ole/.travis.yml

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/go-ole/go-ole/README.md

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/go-ole/go-ole/com.go

Lines changed: 52 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)