Skip to content

Commit

Permalink
Adjust Python image building
Browse files Browse the repository at this point in the history
  • Loading branch information
halamix2 committed Mar 1, 2024
1 parent e425482 commit c619120
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 3 deletions.
16 changes: 15 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ updates:
include: "scope"

- package-ecosystem: "pip"
directory: "/components/runtimes/python39/kubeless"
directory: "/components/runtimes/python/python39"
labels:
- "area/dependency"
- "kind/chore"
Expand All @@ -82,6 +82,20 @@ updates:
opentelemetry:
patterns:
- "opentelemetry-*"
- package-ecosystem: "pip"
directory: "/components/runtimes/python/python312"
labels:
- "area/dependency"
- "kind/chore"
schedule:
interval: "weekly"
commit-message:
prefix: "pip-python312"
include: "scope"
groups:
opentelemetry:
patterns:
- "opentelemetry-*"

- package-ecosystem: "npm"
directory: "/components/runtimes/nodejs/nodejs16"
Expand Down
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions components/runtimes/python/python312/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM python:3.12.2-alpine3.19

# Serverless
LABEL source = git@github.com:kyma-project/kyma.git

# build-base and linux-headers are needed to install all requirements
RUN apk add --no-cache --virtual .build-deps build-base linux-headers

COPY ./python312/requirements.txt /kubeless/requirements.txt

RUN pip install --no-cache-dir -r /kubeless/requirements.txt

COPY ./kubeless/ /

WORKDIR /

USER 1000
# Tracing propagators are configured based on OTEL_PROPAGATORS env variable https://opentelemetry.io/docs/instrumentation/python/manual/#using-environment-variables
ENV OTEL_PROPAGATORS=tracecontext,baggage,b3multi
ENV OTEL_PYTHON_REQUESTS_EXCLUDED_URLS="healthz,favicon.ico,metrics"

CMD ["python", "/kubeless.py"]
1 change: 1 addition & 0 deletions components/runtimes/python/python39/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kubeless/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ LABEL source = git@github.com:kyma-project/kyma.git
# build-base and linux-headers are needed to install all requirements
RUN apk add --no-cache --virtual .build-deps build-base linux-headers

COPY kubeless/requirements.txt /kubeless/requirements.txt
COPY ./python39/requirements.txt /kubeless/requirements.txt

RUN pip install --no-cache-dir -r /kubeless/requirements.txt

COPY kubeless/ /
COPY ./kubeless/ /

WORKDIR /

Expand Down
12 changes: 12 additions & 0 deletions components/runtimes/python/python39/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
setuptools==69.1.1
requests>=2.31.0
bottle==0.12.25
cheroot==10.0.0
wsgi-request-logger==0.4.6
prometheus_client==0.20.0
opentelemetry-api==1.23.0
opentelemetry-sdk==1.23.0
opentelemetry-exporter-otlp-proto-http==1.23.0
opentelemetry-propagator-b3==1.23.0
opentelemetry-instrumentation-requests==0.44b0
cloudevents
1 change: 1 addition & 0 deletions sec-scanners-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ protecode:
- europe-docker.pkg.dev/kyma-project/prod/function-runtime-nodejs16:main
- europe-docker.pkg.dev/kyma-project/prod/function-runtime-nodejs18:main
- europe-docker.pkg.dev/kyma-project/prod/function-runtime-python39:main
- europe-docker.pkg.dev/kyma-project/prod/function-runtime-python312:main
- europe-docker.pkg.dev/kyma-project/prod/tpi/kaniko-executor:1.9.2-ea54c1c7
- europe-docker.pkg.dev/kyma-project/prod/tpi/registry:2.8.1-1ae4c190
whitesource:
Expand Down

0 comments on commit c619120

Please sign in to comment.