Add new cfssl image and update e2e tests to use it

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-04-17 13:03:33 -04:00
parent 3877474b7c
commit e9bd1d8b1f
8 changed files with 85 additions and 83 deletions

View file

@ -9,5 +9,6 @@ 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
nginx | NGINX base image using [alpine linux](https://www.alpinelinux.org)
cfssl | Image to run cfssl commands
:bangbang: Only the nginx image is meant to be published. The others are used as examples for some feature of the ingress controller or to run e2e tests.

33
images/cfssl/Makefile Normal file
View file

@ -0,0 +1,33 @@
# Copyright 2020 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Docker image for e2e testing.
# Use the 0.0 tag for testing, it shouldn't clobber any release builds
TAG ?= 0.0
REGISTRY ?= ingress-controller
DOCKER ?= docker
IMGNAME = cfssl
IMAGE = $(REGISTRY)/$(IMGNAME)
container:
$(DOCKER) buildx build \
--load \
--platform linux/amd64 \
-t $(IMAGE):$(TAG) rootfs
clean:
$(DOCKER) rmi -f $(IMAGE):$(TAG) || true

View file

@ -0,0 +1,24 @@
# Copyright 2019 The Kubernetes Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.11
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk add --no-cache \
bash \
cfssl@testing
EXPOSE 8888
CMD ["cfssl"]

View file

@ -138,4 +138,8 @@ RUN wget https://github.com/helm/chart-testing/releases/download/v${CHART_TESTIN
RUN curl -sSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
RUN curl -sSL -o /usr/local/bin/cfssl https://github.com/cloudflare/cfssl/releases/download/v1.4.1/cfssl_1.4.1_linux_amd64 \
&& curl -sSL -o /usr/local/bin/cfssljson https://github.com/cloudflare/cfssl/releases/download/v1.4.1/cfssljson_1.4.1_linux_amd64 \
&& chmod +x /usr/local/bin/cfssl*
WORKDIR $GOPATH