Skip to content

Commit

Permalink
fix: Install protoc to run codegen; fix warnings in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantbiggs committed Apr 29, 2024
1 parent ff575cf commit 143141a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion deploy/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ spec:
# - output (output kubeconfig to plug into your apiserver configuration, mounted from the host)
containers:
- name: aws-iam-authenticator
image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-iam-authenticator:v0.5.3
image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-iam-authenticator:v0.6.14
args:
- server
# uncomment if using EKS-Style ConfigMap
Expand Down
12 changes: 0 additions & 12 deletions hack/check-vendor.sh

This file was deleted.

7 changes: 4 additions & 3 deletions hack/e2e/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,9 @@ spec:
type: RollingUpdate
template:
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
labels:
k8s-app: aws-iam-authenticator
spec:

# use service account with access to
serviceAccountName: aws-iam-authenticator

Expand All @@ -209,6 +206,10 @@ spec:
# run on each master node
nodeSelector:
node-role.kubernetes.io/master: ""

# mark pod as critical to the cluster
priorityClassName: system-cluster-critical

tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
Expand Down
14 changes: 9 additions & 5 deletions hack/e2e/kops.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ function kops_create_cluster() {
K8S_VERSION=${8}
CLUSTER_FILE=${9}
KUBECONFIG=${10}
KUBECONFIG_ADMIN=${11}
TEST_DIR=${12}
KOPS_STATE_FILE=${13}
KOPS_PATCH_FILE=${14}
USER_ROLE=${11}
KUBECONFIG_ADMIN=${12}
TEST_DIR=${13}
KOPS_STATE_FILE=${14}
KOPS_PATCH_FILE=${15}

if [[ ! -e ${SSH_KEY_PATH} ]]; then
loudecho "Generating SSH key $SSH_KEY_PATH"
Expand Down Expand Up @@ -71,8 +72,11 @@ function kops_create_cluster() {
${KOPS_BIN} update cluster --state "${KOPS_STATE_FILE}" "${CLUSTER_NAME}" \
--ssh-public-key="${SSH_KEY_PATH}".pub --yes

loudecho "Kops cluster file"
cat "${CLUSTER_FILE}"

${KOPS_BIN} export kubeconfig --state "${KOPS_STATE_FILE}" --kubeconfig "${KUBECONFIG_ADMIN}" "${CLUSTER_NAME}" --admin
${KOPS_BIN} export kubeconfig --state "${KOPS_STATE_FILE}" --kubeconfig "${KUBECONFIG}" "${CLUSTER_NAME}"
${KOPS_BIN} export kubeconfig --state "${KOPS_STATE_FILE}" --kubeconfig "${KUBECONFIG}" "${CLUSTER_NAME}" --user "${USER_ROLE}"

loudecho "Waiting on cluster ${CLUSTER_NAME}..."
# we can't just use kops validate, because it requires the authenticator to be ready, but it's not set up yet...
Expand Down
3 changes: 2 additions & 1 deletion hack/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ loudecho "Installing ginkgo to ${BIN_DIR}"
GINKGO_BIN=${BIN_DIR}/ginkgo
if [[ ! -e ${GINKGO_BIN} ]]; then
pushd /tmp
GOPATH=${TEST_DIR} GOBIN=${BIN_DIR} GO111MODULE=on go install github.com/onsi/ginkgo/ginkgo@v1.12.0
GOPATH=${TEST_DIR} GOBIN=${BIN_DIR} GO111MODULE=on go install github.com/onsi/ginkgo/v2/ginkgo@v2.15.0
popd
fi

Expand Down Expand Up @@ -171,6 +171,7 @@ kops_create_cluster \
"$K8S_VERSION" \
"$CLUSTER_FILE" \
"$KUBECONFIG" \
"$USER_ROLE" \
"$KUBECONFIG_ADMIN" \
"$TEST_DIR" \
"$KOPS_STATE_FILE" \
Expand Down
4 changes: 4 additions & 0 deletions hack/test-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,14 @@ if [[ -d ${TEST_ARTIFACTS}/k8s.io/kubernetes ]]; then
rm -rf ${TEST_ARTIFACTS}/k8s.io/kubernetes
fi

GOPROXY=direct go install golang.org/x/tools/cmd/goimports

mkdir -p ${TEST_ARTIFACTS}/k8s.io/kubernetes
git clone --branch ${KUBERNETES_TAG} --depth 1 https://github.com/kubernetes/kubernetes.git ${TEST_ARTIFACTS}/k8s.io/kubernetes --depth 1

pushd ${TEST_ARTIFACTS}/k8s.io/kubernetes
./hack/install-protoc.sh
export PATH="/home/prow/go/src/github.com/kubernetes-sigs/aws-iam-authenticator/test-artifacts/k8s.io/kubernetes/third_party/protoc:${PATH}"
./hack/update-codegen.sh
./hack/install-etcd.sh
export PATH="${TEST_ARTIFACTS}/k8s.io/kubernetes/third_party/etcd:${PATH}"
Expand Down

0 comments on commit 143141a

Please sign in to comment.