Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kubernetes 1.24 and kind v0.19.0 #280

Merged
merged 2 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/build-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: ginkgo -race -randomizeSuites -randomizeAllSpecs -r -v ./...

acceptance:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
Expand All @@ -79,17 +79,20 @@ jobs:
- name: Install tooling
run: |-
sudo bash <<EOF
curl -fsL -o /usr/local/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.11.1/kind-linux-amd64
curl -fsL -o /usr/local/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.19.0/kind-linux-amd64
curl -fsL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.4.1/kustomize_v4.4.1_linux_amd64.tar.gz \
| tar xfz -
mv -v kustomize /usr/local/bin/kustomize
curl -fsL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.22.3/bin/linux/amd64/kubectl
curl -fsL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.24.11/bin/linux/amd64/kubectl
chmod a+x /usr/local/bin/kustomize /usr/local/bin/kubectl /usr/local/bin/kind
EOF
- name: Prepare the cluster
run: bin/acceptance.linux_amd64 prepare --verbose && sleep 10
- name: Run acceptance tests
run: bin/acceptance.linux_amd64 run --verbose
- name: Show all pods
run: kubectl get pods -A -o wide
if: failure()
- name: Show events
run: kubectl get events
if: failure()
Expand All @@ -99,6 +102,9 @@ jobs:
- name: Show rbac logs
run: kubectl -n theatre-system logs theatre-rbac-manager-0
if: failure()
- name: Show vault manager logs
run: kubectl -n theatre-system logs theatre-vault-manager-0
if: failure()

release:
if: contains('refs/heads/master', github.ref)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ $ # install setup-envtest which configures etcd and kube-apiserver binaries for
$ # https://book.kubebuilder.io/reference/envtest.html#configuring-envtest-for-integration-tests
$ # https://github.com/kubernetes-sigs/controller-runtime/tree/master/tools/setup-envtest#envtest-binaries-manager
$ go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
$ # configure envtest to use k8s 1.22.x binaries
$ setup-envtest use -p path 1.22.x
$ source <(setup-envtest use -i -p env 1.22.x)
$ # configure envtest to use k8s 1.24.x binaries
$ setup-envtest use -p path 1.24.x
$ source <(setup-envtest use -i -p env 1.24.x)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal, but I'd love it if this weren't so bash centric 🥺

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, I feel the same way. let's see what I can do in the following PR's

```

- **Unit**: Standard unit tests, used to exhaustively specify the functionality of
Expand Down
2 changes: 1 addition & 1 deletion cmd/acceptance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var (
prepareImage = prepare.Flag("image", "Docker image tag used for exchanging test images").Default("theatre:latest").String()
prepareConfigFile = prepare.Flag("config-file", "Path to Kind config file").Default("kind-e2e.yaml").ExistingFile()
prepareDockerfile = prepare.Flag("dockerfile", "Path to acceptance dockerfile").Default("Dockerfile").ExistingFile()
prepareKindNodeImage = prepare.Flag("kind-node-image", "Kind Node Image").Default("kindest/node:v1.22.2").String()
prepareKindNodeImage = prepare.Flag("kind-node-image", "Kind Node Image").Default("kindest/node:v1.24.13").String()
prepareVerbose = prepare.Flag("verbose", "Use a higher log level when creating the cluster").Short('v').Bool()

destroy = app.Command("destroy", "Destroys the test Kubernetes cluster and other resources")
Expand Down
7 changes: 6 additions & 1 deletion cmd/vault-manager/acceptance/acceptance.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ func (r *Runner) Prepare(logger kitlog.Logger, config *rest.Config) error {
backendConfig := map[string]interface{}{
"kubernetes_host": "https://kubernetes.default.svc",
"kubernetes_ca_cert": string(ca),
"issuer": "api",
// Explicit, configuration defaults behaviour that changes across Vault version
// iss and issuer are deprecated
// https://developer.hashicorp.com/vault/docs/auth/kubernetes#kubernetes-1-21
// https://developer.hashicorp.com/vault/docs/auth/kubernetes#discovering-the-service-account-issuer
"issuer": "api",
"disable_iss_validation": "true",
}

logger.Log("msg", "writing auth backend config", "path", backendConfigPath, "config", backendConfig)
Expand Down
6 changes: 6 additions & 0 deletions config/acceptance/setup/resources/vault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,9 @@ data:
auth_mount_path: kubernetes
auth_role: default
secret_mount_path_prefix: secret/data/kubernetes
# For completeness
# Explicit, configuration defaults behaviour that changes across Vault version
# iss and issuer are deprecated
# https://developer.hashicorp.com/vault/docs/auth/kubernetes#kubernetes-1-21
# https://developer.hashicorp.com/vault/docs/auth/kubernetes#discovering-the-service-account-issuer
disable_iss_validation: "true"