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

[kube] use local image for kubernetes integration tests #48321

Merged
merged 7 commits into from
Nov 4, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented Nov 1, 2024

This PR replaces the use of the nginx:latest Docker image in Kubernetes integration tests with a custom-built image based on alpine:3.20.3. This custom image includes a shell for kubectl exec integration tests and a compiled binary to act as an HTTP server.

This change addresses recent issues where test workflows failed due to problems downloading the nginx image.

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-48321.d3pp5qlev8mo18.amplifyapp.com

@tigrato tigrato force-pushed the tigrato/try-fixing-kube-int-tests branch 2 times, most recently from aa65d80 to 6a06d8c Compare November 1, 2024 20:07
@tigrato tigrato changed the title [kube] initial version using alpine container and self build http server [kube] use local image for kubernetes integration tests Nov 1, 2024
@tigrato tigrato force-pushed the tigrato/try-fixing-kube-int-tests branch 2 times, most recently from a2e56c2 to ee4ddd3 Compare November 1, 2024 20:56
@tigrato tigrato marked this pull request as ready for review November 1, 2024 21:09
@github-actions github-actions bot requested review from ravicious and vapopov November 1, 2024 21:09
@rosstimothy rosstimothy linked an issue Nov 1, 2024 that may be closed by this pull request
fixtures/alpine/webserver Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the patch version? Could we get a checksum to go with it too?

Copy link
Contributor

Choose a reason for hiding this comment

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

Mentioning the source of the image would be nice too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

There's also discrepancy between versions: this file name is 3.23 but the base Docker image is 3.20.3. Typo in this file name?

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO legal should review this. Including an entire container image worth of OS libraries/tools/external software means that we're now distributing a lot more packages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO legal should review this. Including an entire container image worth of OS libraries/tools/external software means that we're now distributing a lot more packages.

Shouldn't this apply even if we vendored the image in gha container repo?

Copy link
Contributor

@fheinecke fheinecke Nov 1, 2024

Choose a reason for hiding this comment

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

Not if we used private ECR, then we're only distributing it within the company

But maybe it doesn't matter... are we basing any images off this currently (and therefore have it reviewed/approved already)?

Copy link
Contributor Author

@tigrato tigrato Nov 1, 2024

Choose a reason for hiding this comment

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

We base only our test images for the Kube integration tests introduced by this PR. Before we relied on pulling these images from docker hub but that often fails and makes our tests extremely flaky when GHA/docker hub has network issues

Is there a way of storing this image in any other private repo and make oss download it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On d99891f, I sourced the files from alpine cdn and added gpg validation.

Copy link
Contributor

@fheinecke fheinecke left a comment

Choose a reason for hiding this comment

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

Rather than doing all this, can we configure the workflow to use a pull-through cache in a private ECR registry? Then we don't have to worry about licenses (we won't be redistributing anything), we won't be adding lots of binaries to the repo, and it'll be easier for us to keep up to date.

fixtures/alpine/Dockerfile Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO legal should review this. Including an entire container image worth of OS libraries/tools/external software means that we're now distributing a lot more packages.

fixtures/alpine/README.md Outdated Show resolved Hide resolved
fixtures/alpine/README.md Outdated Show resolved Hide resolved
tigrato and others added 2 commits November 4, 2024 17:27
@tigrato tigrato enabled auto-merge November 4, 2024 17:27
@tigrato tigrato disabled auto-merge November 4, 2024 17:35
@tigrato tigrato enabled auto-merge November 4, 2024 17:54
@tigrato tigrato added this pull request to the merge queue Nov 4, 2024
Merged via the queue into master with commit 1536d75 Nov 4, 2024
42 checks passed
@tigrato tigrato deleted the tigrato/try-fixing-kube-int-tests branch November 4, 2024 18:35
@public-teleport-github-review-bot

@tigrato See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Failed
branch/v16 Failed
branch/v17 Create PR

tigrato added a commit that referenced this pull request Nov 4, 2024
* [kube] use local image for kubernetes integration tests

This PR replaces the use of the `nginx:latest` Docker image in Kubernetes integration tests with a custom-built image based on `alpine:3.20.3`. This custom image includes a shell for `kubectl exec` integration tests and a compiled binary to act as an HTTP server.

This change addresses recent issues where test workflows failed due to problems downloading the `nginx` image.

* add information about the image

* source files from alpine cdn

* copy files from alpine

* Update fixtures/alpine/README.md

Co-authored-by: Alan Parra <[email protected]>

* Update fixtures/alpine/README.md

Co-authored-by: Alan Parra <[email protected]>

* source files from alpine cdn (again)

---------

Co-authored-by: Alan Parra <[email protected]>
tigrato added a commit that referenced this pull request Nov 4, 2024
* [kube] use local image for kubernetes integration tests

This PR replaces the use of the `nginx:latest` Docker image in Kubernetes integration tests with a custom-built image based on `alpine:3.20.3`. This custom image includes a shell for `kubectl exec` integration tests and a compiled binary to act as an HTTP server.

This change addresses recent issues where test workflows failed due to problems downloading the `nginx` image.

* add information about the image

* source files from alpine cdn

* copy files from alpine

* Update fixtures/alpine/README.md

Co-authored-by: Alan Parra <[email protected]>

* Update fixtures/alpine/README.md

Co-authored-by: Alan Parra <[email protected]>

* source files from alpine cdn (again)

---------

Co-authored-by: Alan Parra <[email protected]>
tigrato added a commit that referenced this pull request Nov 4, 2024
* [kube] use local image for kubernetes integration tests

This PR replaces the use of the `nginx:latest` Docker image in Kubernetes integration tests with a custom-built image based on `alpine:3.20.3`. This custom image includes a shell for `kubectl exec` integration tests and a compiled binary to act as an HTTP server.

This change addresses recent issues where test workflows failed due to problems downloading the `nginx` image.

* add information about the image

* source files from alpine cdn

* copy files from alpine

* Update fixtures/alpine/README.md

Co-authored-by: Alan Parra <[email protected]>

* Update fixtures/alpine/README.md

Co-authored-by: Alan Parra <[email protected]>

* source files from alpine cdn (again)

---------

Co-authored-by: Alan Parra <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
)

* [kube] use local image for kubernetes integration tests

This PR replaces the use of the `nginx:latest` Docker image in Kubernetes integration tests with a custom-built image based on `alpine:3.20.3`. This custom image includes a shell for `kubectl exec` integration tests and a compiled binary to act as an HTTP server.

This change addresses recent issues where test workflows failed due to problems downloading the `nginx` image.

* add information about the image

* source files from alpine cdn

* copy files from alpine

* Update fixtures/alpine/README.md



* Update fixtures/alpine/README.md



* source files from alpine cdn (again)

---------

Co-authored-by: Alan Parra <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
)

* [kube] use local image for kubernetes integration tests

This PR replaces the use of the `nginx:latest` Docker image in Kubernetes integration tests with a custom-built image based on `alpine:3.20.3`. This custom image includes a shell for `kubectl exec` integration tests and a compiled binary to act as an HTTP server.

This change addresses recent issues where test workflows failed due to problems downloading the `nginx` image.

* add information about the image

* source files from alpine cdn

* copy files from alpine

* Update fixtures/alpine/README.md



* Update fixtures/alpine/README.md



* source files from alpine cdn (again)

---------

Co-authored-by: Alan Parra <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
)

* [kube] use local image for kubernetes integration tests

This PR replaces the use of the `nginx:latest` Docker image in Kubernetes integration tests with a custom-built image based on `alpine:3.20.3`. This custom image includes a shell for `kubectl exec` integration tests and a compiled binary to act as an HTTP server.

This change addresses recent issues where test workflows failed due to problems downloading the `nginx` image.

* add information about the image

* source files from alpine cdn

* copy files from alpine

* Update fixtures/alpine/README.md



* Update fixtures/alpine/README.md



* source files from alpine cdn (again)

---------

Co-authored-by: Alan Parra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestKube flakiness
7 participants