Skip to content

Commit

Permalink
Merge branch 'master' into miani-k8s-jenkins-20250113
Browse files Browse the repository at this point in the history
  • Loading branch information
armandomiani authored Jan 30, 2025
2 parents d74aaea + dfd7423 commit bc52a8f
Show file tree
Hide file tree
Showing 10 changed files with 116 additions and 34 deletions.
5 changes: 0 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence.
* @GoogleCloudPlatform/ccm-saap-team


/docker/ @GoogleCloudPlatform/c2d-contributors
/k8s/**/Makefile @GoogleCloudPlatform/c2d-contributors
/vm/chef/cookbooks/**/attributes/default.rb @GoogleCloudPlatform/c2d-contributors
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ WORKDIR /go/src/github.com/jaegertracing/jaeger-operator
ENV GO111MODULE=on

RUN go install github.com/kardianos/govendor@latest \
&& govendor license +vendor > NOTICES \
&& GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -o jaeger-operator -ldflags "${LD_FLAGS} \
-X github.com/jaegertracing/jaeger-operator/pkg/version.buildDate=$(date -u +'%Y-%m-%dT%H:%M:%SZ')"


# Result Image
FROM marketplace.gcr.io/google/c2d-debian11
FROM marketplace.gcr.io/google/debian12

RUN apt-get update && apt-get install -y --no-install-recommends \
openssl \
Expand All @@ -46,7 +45,6 @@ COPY --from=git /src/jaeger-operator/scripts/* /scripts/
COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/jaeger-operator ${OPERATOR}

# License and Notices
COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/NOTICES /usr/share/jaeger-operator/NOTICES
COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/LICENSE /usr/share/jaeger-operator/LICENSE

ENTRYPOINT ["/usr/local/bin/jaeger-operator"]
Expand Down
52 changes: 52 additions & 0 deletions docker/jaeger-operator/1/debian12/1.65/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Clone git repo
FROM alpine/git:1.0.7 as git

ENV JAEGER_OPERATOR_VERSION=v1.65.0

RUN git clone https://github.com/jaegertracing/jaeger-operator.git /src/jaeger-operator/ \
&& cd /src/jaeger-operator/ \
&& git checkout ${JAEGER_OPERATOR_VERSION}


FROM golang:1.22.0 as builder

ENV LD_FLAGS="-X github.com/jaegertracing/jaeger-operator/pkg/version.version=v1.65.0 \
-X github.com/jaegertracing/jaeger-operator/pkg/version.buildDate=${VERSION_DATE} \
-X github.com/jaegertracing/jaeger-operator/pkg/version.defaultJaeger=1.65.0"

COPY --from=git /src/jaeger-operator /go/src/github.com/jaegertracing/jaeger-operator

WORKDIR /go/src/github.com/jaegertracing/jaeger-operator

ENV GO111MODULE=on

RUN go install github.com/kardianos/govendor@latest \
&& GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -o jaeger-operator -ldflags "${LD_FLAGS} \
-X github.com/jaegertracing/jaeger-operator/pkg/version.buildDate=$(date -u +'%Y-%m-%dT%H:%M:%SZ')"


# Result Image
FROM marketplace.gcr.io/google/debian12

RUN apt-get update && apt-get install -y --no-install-recommends \
openssl \
&& rm -rf /var/lib/apt/lists/*

ENV OPERATOR=/usr/local/bin/jaeger-operator \
USER_UID=1001 \
USER_NAME=jaeger-operator

ENV C2D_RELEASE=1.65.0

COPY --from=git /src/jaeger-operator/scripts/* /scripts/

# Binaries
COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/jaeger-operator ${OPERATOR}

# License and Notices
COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/LICENSE /usr/share/jaeger-operator/LICENSE

ENTRYPOINT ["/usr/local/bin/jaeger-operator"]

USER ${USER_UID}
2 changes: 0 additions & 2 deletions docker/jaeger-operator/templates/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ WORKDIR /go/src/github.com/jaegertracing/jaeger-operator
ENV GO111MODULE=on

RUN go install github.com/kardianos/govendor@latest \
&& govendor license +vendor > NOTICES \
&& GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -o jaeger-operator -ldflags "${LD_FLAGS} \
-X github.com/jaegertracing/jaeger-operator/pkg/version.buildDate=$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
Expand All @@ -49,7 +48,6 @@ COPY --from=git /src/jaeger-operator/scripts/* /scripts/
COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/jaeger-operator ${OPERATOR}

# License and Notices
COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/NOTICES /usr/share/jaeger-operator/NOTICES
COPY --from=builder /go/src/github.com/jaegertracing/jaeger-operator/LICENSE /usr/share/jaeger-operator/LICENSE

ENTRYPOINT ["/usr/local/bin/jaeger-operator"]
Expand Down
35 changes: 27 additions & 8 deletions docker/jaeger-operator/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,41 @@


cloudbuild:
docker_image: gcr.io/cloud-builders/docker:24.0.9
enable_parallel: false
versions:
- dir: 1/debian11/1.53
from: marketplace.gcr.io/google/c2d-debian11
- dir: 1/debian12/1.65
from: marketplace.gcr.io/google/debian12
packages:
golang:
version: '1.22.0'
jaeger-operator:
version: 1.65.0
annotations:
- key: com.googleapis.cloudmarketplace.product.service.name
value: services/a7624147-d9f2-4865-a208-dadf190d0293.cloudpartnerservices.goog
repo: jaeger-operator1
tags:
- 1.65.0-debian12
- 1.65-debian12
- 1-debian12
- '1.65.0'
- '1'
- latest

- dir: 1/debian12/1.53
from: marketplace.gcr.io/google/debian12
packages:
golang:
version: '1.20'
jaeger-operator:
version: 1.53.0
annotations:
- key: com.googleapis.cloudmarketplace.product.service.name
value: services/a7624147-d9f2-4865-a208-dadf190d0293.cloudpartnerservices.goog
repo: jaeger-operator1
tags:
- 1.53.0-debian11
- 1.53-debian11
- 1-d3bian11
- 1.53.0-debian12
- 1.53-debian12
- 1.53.0
- '1.53'
- '1'
- latest

8 changes: 4 additions & 4 deletions k8s/django/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ include ../images.Makefile
CHART_NAME := django
APP_ID ?= $(CHART_NAME)

TRACK ?= 5.0
TRACK ?= 5.1
SERVICE_NAME := services/b0af85ce-23df-43aa-9f54-b6e81eeb27d1.cloudpartnerservices.goog
UWSGI_EXPORTER_TRACK ?= 1.1
NGINX_TRACK ?= 1.25
EXPORTER_TAG ?= 0.11
EXPORTER_TAG ?= 1.3
METRICS_EXPORTER_TAG ?= v0.5.1
NFS_TRACK ?= 1.3
POSTGRESQL_TRACK ?= latest
Expand All @@ -20,11 +20,11 @@ SOURCE_REGISTRY ?= marketplace.gcr.io/google
IMAGE_DJANGO ?= $(SOURCE_REGISTRY)/django5:$(TRACK)
IMAGE_UWSGI_EXPORTER ?= $(SOURCE_REGISTRY)/uwsgi-exporter1:$(UWSGI_EXPORTER_TRACK)
IMAGE_NGINX ?= $(SOURCE_REGISTRY)/nginx1:$(NGINX_TRACK)
IMAGE_NGINX_EXPORTER = $(SOURCE_REGISTRY)/nginx-exporter0:$(EXPORTER_TAG)
IMAGE_NGINX_EXPORTER = $(SOURCE_REGISTRY)/nginx-exporter1:$(EXPORTER_TAG)
IMAGE_POSTGRESQL ?= $(SOURCE_REGISTRY)/postgresql13:$(POSTGRESQL_TRACK)
IMAGE_POSTGRESQL_EXPORTER = $(SOURCE_REGISTRY)/postgresql-exporter0:$(POSTGRESQL_EXPORTER_TRACK)
IMAGE_NFS ?= $(SOURCE_REGISTRY)/nfs-server1:$(NFS_TRACK)
IMAGE_DEBIAN ?= $(SOURCE_REGISTRY)/c2d-debian11:latest
IMAGE_DEBIAN ?= $(SOURCE_REGISTRY)/debian12:latest
IMAGE_PROMETHEUS_TO_SD ?= k8s.gcr.io/prometheus-to-sd:$(METRICS_EXPORTER_TAG)


Expand Down
30 changes: 30 additions & 0 deletions k8s/django/chart/django/templates/django-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,36 @@ spec:
key: db-password
- name: PGHOST
value: "{{ .Release.Name }}-postgresql-svc"
- name: ensure-django
image: "{{ .Values.django.image.repo }}:{{ .Values.django.image.tag }}"
command:
- /bin/bash
- -c
- |
echo "Checking if django-admin is set up..."
# Prevent errors
set +e
admin_path="$(which django-admin)"
set -e
if [[ -z "${admin_path}" ]]; then
echo "- django-admin not set up. Installing it..."
python3 -m venv /sites/venv
pip install "Django==${C2D_RELEASE}" \
mysqlclient \
psycopg2 \
uwsgi
else
echo "- django-admin is present at ${admin_path}."
fi
echo "django-admin version:"
django-admin --version
volumeMounts:
- name: django-data
mountPath: /sites
securityContext:
runAsUser: 0
containers:
- image: "{{ .Values.django.image.repo }}:{{ .Values.django.image.tag }}"
name: django
Expand Down
2 changes: 1 addition & 1 deletion k8s/falco/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ APP_ID ?= $(CHART_NAME)
TRACK ?= 0.36
SERVICE_NAME := services/76e37ab7-1ffc-47ce-9e31-0b3791bb75b0.cloudpartnerservices.goog

EXPORTER_TAG ?= 0.7
EXPORTER_TAG ?= 0.8
METRICS_EXPORTER_TAG ?= v0.11.1-gke.1

VERIFY_WAIT_TIMEOUT = 1800
Expand Down
2 changes: 1 addition & 1 deletion k8s/jaeger-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ APP_ID ?= $(CHART_NAME)

SOURCE_REGISTRY ?= marketplace.gcr.io/google

TRACK ?= 1.45
TRACK ?= 1.53
SERVICE_NAME := services/434ff7ab-fb9b-46c5-b76c-1d6088d5dc8b.cloudpartnerservices.goog

IMAGE_MAIN ?= $(SOURCE_REGISTRY)/jaeger-operator1:$(TRACK)
Expand Down
10 changes: 0 additions & 10 deletions k8s/jaeger-operator/apptest/tester/tests/basic-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ actions:
expect:
exitCode:
equals: 0
- name: Trying to find previous request from Jaeger query service
bashTest:
script: |
sleep 10; \
curl --retry 3 --retry-connrefused --retry-max-time 60 \
"example-query.${NAMESPACE}.svc.cluster.local:16686/api/traces?service=jaeger-query&tags=%7B%22http.url%22%3A%22%2Fapi%2Fservices%3Ffoo%3Dbar%22%7D" \
| jq .data[0] | grep "api/services?foo=bar"
expect:
exitCode:
equals: 0
- name: Delete test Jaeger
bashTest:
script: |
Expand Down

0 comments on commit bc52a8f

Please sign in to comment.