Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 7e7075a

Browse files
blijblijblijandresmgot
authored andcommitted
Add ruby 2.3 and ruby 2.5 runtimes (#926)
* Move Dockerfile to its specific version * Add ruby 2.3 based on the bitnami ruby 2.3 container * Add ruby 2.5 based on the bitnami ruby 2.5 container * Include ruby 2.3 and ruby 2.5 in the build process * Add ruby 2.3 and 2.5 to the documented runtimes * Reference correctly to the versioned Dockerfiles * Add versions and update ruby24 to newly build runtimeImage
1 parent c8bbbb9 commit 7e7075a

File tree

6 files changed

+61
-7
lines changed

6 files changed

+61
-7
lines changed

docker/runtime/ruby/Dockerfile.2.3

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM bitnami/ruby:2.3
2+
3+
LABEL maintainer "Bitnami <[email protected]>"
4+
5+
ENV RACK_ENV="production"
6+
ENV FUNC_PROCESS="ruby /kubeless.rb"
7+
RUN gem install sinatra --no-rdoc --no-ri
8+
9+
ADD kubeless.rb /
10+
11+
USER 1000
12+
13+
ADD proxy /
14+
CMD [ "/proxy" ]
File renamed without changes.

docker/runtime/ruby/Dockerfile.2.5

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM bitnami/ruby:2.5
2+
3+
LABEL maintainer "Bitnami <[email protected]>"
4+
5+
ENV RACK_ENV="production"
6+
ENV FUNC_PROCESS="ruby /kubeless.rb"
7+
RUN gem install sinatra --no-rdoc --no-ri
8+
9+
ADD kubeless.rb /
10+
11+
USER 1000
12+
13+
ADD proxy /
14+
CMD [ "/proxy" ]

docker/runtime/ruby/Makefile

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11

2+
build2.3:
3+
env GOOS=linux GOARCH=amd64 go build $$GOPATH/src/github.com/kubeless/kubeless/pkg/function-proxy/proxy.go
4+
docker build -t kubeless/ruby:2.3$$RUNTIME_TAG_MODIFIER -f Dockerfile.2.3 .
5+
26
build2.4:
37
env GOOS=linux GOARCH=amd64 go build $$GOPATH/src/github.com/kubeless/kubeless/pkg/function-proxy/proxy.go
4-
docker build -t kubeless/ruby:2.4$$RUNTIME_TAG_MODIFIER -f Dockerfile .
8+
docker build -t kubeless/ruby:2.4$$RUNTIME_TAG_MODIFIER -f Dockerfile.2.4 .
9+
10+
build2.5:
11+
env GOOS=linux GOARCH=amd64 go build $$GOPATH/src/github.com/kubeless/kubeless/pkg/function-proxy/proxy.go
12+
docker build -t kubeless/ruby:2.5$$RUNTIME_TAG_MODIFIER -f Dockerfile.2.5 .
13+
14+
push2.3:
15+
docker push kubeless/ruby:2.3$$RUNTIME_TAG_MODIFIER
516

617
push2.4:
718
docker push kubeless/ruby:2.4$$RUNTIME_TAG_MODIFIER
819

20+
push2.5:
21+
docker push kubeless/ruby:2.5$$RUNTIME_TAG_MODIFIER
22+
923
# Mandatory jobs
10-
build-all: build2.4
11-
push-all: push2.4
24+
build-all: build2.3 build2.4 build2.5
25+
push-all: push2.3 push2.4 push2.5

docs/runtimes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ By default Kubeless has support for the following runtimes:
44

55
- Python: For the branches 2.7, 3.4 and 3.6
66
- NodeJS: For the branches 6 and 8, as well as NodeJS [distroless](https://github.com/GoogleContainerTools/distroless) for the branch 8
7-
- Ruby: For the branch 2.4
7+
- Ruby: For the branches 2.3, 2.4 and 2.5
88
- PHP: For the branch 7.2
99
- Golang: For the branch 1.10
1010
- .NET: For the branch 2.0
@@ -15,7 +15,7 @@ You can see the list of supported runtimes executing:
1515
```console
1616
$ kubeless get-server-config
1717
INFO[0000] Current Server Config:
18-
INFO[0000] Supported Runtimes are: python2.7, python3.4, python3.6, nodejs6, nodejs8, ruby2.4, php7.2, go1.10, dotnetcore2.0, java1.8, ballerina0.981.0
18+
INFO[0000] Supported Runtimes are: python2.7, python3.4, python3.6, nodejs6, nodejs8, ruby2.3, ruby2.4, ruby2.5, php7.2, go1.10, dotnetcore2.0, java1.8, ballerina0.981.0
1919
```
2020

2121
Each runtime is encapsulated in a container image. The reference to these images are injected in the Kubeless configuration. You can find the source code of all runtimes in [`docker/runtime`](https://github.com/kubeless/kubeless/tree/master/docker/runtime).
@@ -576,4 +576,4 @@ One can use kubeless-config to override the default liveness probe. By default,
576576
"timeoutSeconds": 30
577577
},
578578
"depname": ""
579-
```
579+
```

kubeless-non-rbac.jsonnet

+13-1
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,23 @@ local runtime_images ='[
144144
"ID": "ruby",
145145
"compiled": false,
146146
"versions": [
147+
{
148+
"name": "ruby23",
149+
"version": "2.3",
150+
"runtimeImage": "kubeless/ruby@sha256:67870b57adebc4dc749a8a19795da801da2d05fc6e8324168ac1b227bb7c77f7",
151+
"initImage": "bitnami/ruby:2.3"
152+
},
147153
{
148154
"name": "ruby24",
149155
"version": "2.4",
150-
"runtimeImage": "kubeless/ruby@sha256:01665f1a32fe4fab4195af048627857aa7b100e392ae7f3e25a44bd296d6f105",
156+
"runtimeImage": "kubeless/ruby@sha256:aaa9c7f3dfd4f866a527c04171c32dae2efa420d770a6af9c517771137ab4011",
151157
"initImage": "bitnami/ruby:2.4"
158+
},
159+
{
160+
"name": "ruby25",
161+
"version": "2.5",
162+
"runtimeImage": "kubeless/ruby@sha256:577e35724996ba340ff0a18366bce99586b0be58e4d27fa3e8038f977caf1559",
163+
"initImage": "bitnami/ruby:2.5"
152164
}
153165
],
154166
"depName": "Gemfile",

0 commit comments

Comments
 (0)