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

chore: create httpbun image #9926

Merged
merged 1 commit into from
May 5, 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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ jobs:
- 'images/echo/**'
go-grpc-greeter-server:
- 'images/go-grpc-greeter-server/**'
httpbin:
- 'images/httpbin/**'
httpbun:
- 'images/httpbun/**'
kube-webhook-certgen:
- 'images/kube-webhook-certgen/**'
ext-auth-example-authsvc:
Expand All @@ -422,10 +422,10 @@ jobs:
if: ${{ steps.filter-images.outputs.go-grpc-greeter-server == 'true' }}
run: |
cd images/go-grpc-greeter-server && make build
- name: httpbin image build
- name: httpbun image build
if: ${{ steps.filter-images.outputs.httpbin == 'true' }}
run: |
cd images/httpbin && make build
cd images/httpbun && make build
- name: kube-webhook-certgen image build
if: ${{ steps.filter-images.outputs.kube-webhook-certgen == 'true' }}
run: |
Expand Down
3 changes: 2 additions & 1 deletion images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ custom-error-pages | Example of Custom error pages for the NGINX Ingress control
e2e | Image to run e2e tests
fastcgi-helloserver | FastCGI application for e2e tests
grpc-fortune-teller | grpc server application for the nginx-ingress grpc example
httpbin | A simple HTTP Request & Response Service for e2e tests
httpbun | A simple HTTP Request & Response Service for e2e tests
httpbin | [Removed] we are no longer maintaining the httpbin image due to project being unmaintained
nginx | NGINX base image using [alpine linux](https://www.alpinelinux.org)
cfssl | Image to run cfssl commands
2 changes: 1 addition & 1 deletion images/httpbin/Makefile → images/httpbun/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)

REGISTRY ?= local

IMAGE = $(REGISTRY)/e2e-test-httpbin
IMAGE = $(REGISTRY)/e2e-test-httpbun

# required to enable buildx
export DOCKER_CLI_EXPERIMENTAL=enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ steps:
- -c
- |
gcloud auth configure-docker \
&& cd images/httpbin && make push
&& cd images/httpbun && make push
substitutions:
_GIT_TAG: "12345"
_PULL_BASE_REF: "master"
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM alpine:3.17.2
FROM golang:1.20 AS builder

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV HTTPBUN_COMMIT=a6b387c438b664322734250e426b6966966c2fe4

RUN apk upgrade && apk update \
&& apk add --no-cache \
python3 python3-dev \
musl-dev gcc g++ make \
libffi libffi-dev libstdc++ \
py3-gevent py3-gunicorn py3-wheel \
py3-pip \
&& pip3 install httpbin \
&& apk del python3-dev musl-dev gcc g++ make libffi-dev
RUN git clone https://github.com/sharat87/httpbun.git
Spazzy757 marked this conversation as resolved.
Show resolved Hide resolved
WORKDIR httpbun
RUN git checkout $HTTPBUN_COMMIT

EXPOSE 80
RUN CGO_ENABLED=0 GOOS=linux go build \
-installsuffix cgo \
Spazzy757 marked this conversation as resolved.
Show resolved Hide resolved
-trimpath \
-o bin/httpbun .

CMD ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"]
FROM scratch
COPY --from=builder /go/httpbun/bin/httpbun httpbun
ENV HTTPBUN_BIND=0.0.0.0:80
EXPOSE 80
ENTRYPOINT ["/httpbun"]