Skip to content

Commit

Permalink
Fix e2e-test for Kubernetes 1.24+ (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 authored Jun 12, 2022
1 parent ea6f3ec commit f274d3c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion e2e_test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deploy: cluster
kustomize build | kubectl apply -f -
kubectl -n kube-system rollout status deployment metrics-server
kubectl -n kubernetes-dashboard rollout status deployment kubernetes-dashboard
kubectl get serviceaccount tester '-ojsonpath={.secrets[0].name}' | xargs kubectl get secret '-ojsonpath={.data.token}' | base64 --decode | xargs kubectl config set-credentials tester --token
kubectl get secret tester-token '-ojsonpath={.data.token}' | base64 --decode | xargs kubectl config set-credentials tester --token

output/kauthproxy:
go build -o $@ ..
Expand Down
9 changes: 9 additions & 0 deletions e2e_test/kauthproxy-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ kind: ServiceAccount
metadata:
name: tester

---
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
name: tester-token
annotations:
kubernetes.io/service-account.name: tester

---
# allow kauthproxy access
apiVersion: rbac.authorization.k8s.io/v1
Expand Down

0 comments on commit f274d3c

Please sign in to comment.