Skip to content

Commit

Permalink
Migrate to operator-sdk 1.13 (jaegertracing#1623)
Browse files Browse the repository at this point in the history
* Migration to sdk 1.x

Signed-off-by: Ruben Vargas <[email protected]>

* Reintroduce api tests

Signed-off-by: Ruben Vargas <[email protected]>

* Fix makefile

Signed-off-by: Ruben Vargas <[email protected]>

* Fix Dockerfile path

Signed-off-by: Ruben Vargas <[email protected]>

* More makefile fixes

Signed-off-by: Ruben Vargas <[email protected]>

* Fix project structure

Signed-off-by: Ruben Vargas <[email protected]>

* Fix project structure

Signed-off-by: Ruben Vargas <[email protected]>

* More Makefile fixes

Signed-off-by: Ruben Vargas <[email protected]>

* Setup bundle format

Signed-off-by: Ruben Vargas <[email protected]>

* Fix format, Makefile and codecov

Signed-off-by: Ruben Vargas <[email protected]>

* Fix basic action

Signed-off-by: Ruben Vargas <[email protected]>

* More fixes

Signed-off-by: Ruben Vargas <[email protected]>

* Fixes image prefix

Signed-off-by: Ruben Vargas <[email protected]>

* Rearange Makefile targets

Signed-off-by: Ruben Vargas <[email protected]>

* Add missing variables to Makefile

Signed-off-by: Ruben Vargas <[email protected]>

* Fix

Signed-off-by: Ruben Vargas <[email protected]>

* remove repeated target

Signed-off-by: Ruben Vargas <[email protected]>

* Fix ensure-generate-is-noop

Signed-off-by: Ruben Vargas <[email protected]>

* Fixes linting issues

Signed-off-by: Ruben Vargas <[email protected]>

* More linting

Signed-off-by: Ruben Vargas <[email protected]>

* Fix controllers structure

Signed-off-by: Ruben Vargas <[email protected]>

* Fix

Signed-off-by: Ruben Vargas <[email protected]>

* Fix basic checks

Signed-off-by: Ruben Vargas <[email protected]>

* Fix tests

Signed-off-by: Ruben Vargas <[email protected]>

* Fix Dockerfile

Signed-off-by: Ruben Vargas <[email protected]>

* Install tools

Signed-off-by: Ruben Vargas <[email protected]>

* Fix basic checks action

Signed-off-by: Ruben Vargas <[email protected]>

* Fix permissions

Signed-off-by: Ruben Vargas <[email protected]>

* Install tool for basic checks

Signed-off-by: Ruben Vargas <[email protected]>

* Install envtest

Signed-off-by: Ruben Vargas <[email protected]>

* More fixes

Signed-off-by: Ruben Vargas <[email protected]>

* Ignore k8s utils for coverage

Signed-off-by: Ruben Vargas <[email protected]>

* Fix istio path

Signed-off-by: Ruben Vargas <[email protected]>

* Update kafka yaml paths

Signed-off-by: Ruben Vargas <[email protected]>

* Remove scoreboard, fix examples , remove kafka stuff

Signed-off-by: Ruben Vargas <[email protected]>

* Removing scoreboard tests (for now)

Signed-off-by: Ruben Vargas <[email protected]>

* Move kafka to pkg

Signed-off-by: Ruben Vargas <[email protected]>

* Regenerate bundle

Signed-off-by: Ruben Vargas <[email protected]>

* Remove image from example

Signed-off-by: Ruben Vargas <[email protected]>

* Fix bundle

Signed-off-by: Ruben Vargas <[email protected]>

* Regenerate bundle

Signed-off-by: Ruben Vargas <[email protected]>
  • Loading branch information
rubenvp8510 authored Nov 17, 2021
1 parent 863caeb commit 91e3b69
Show file tree
Hide file tree
Showing 282 changed files with 6,013 additions and 11,008 deletions.
24 changes: 0 additions & 24 deletions .ci/install-sdk.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .ci/install.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .ci/script.sh

This file was deleted.

15 changes: 8 additions & 7 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ignore:
- "pkg/apis/io/v1alpha1/zz_generated.deepcopy.go"
- "pkg/apis/jaegertracing/v1/zz_generated.deepcopy.go"
- "pkg/apis/io/v1alpha1/zz_generated.defaults.go"
- "pkg/apis/jaegertracing/v1/zz_generated.defaults.go"
- "pkg/apis/jaegertracing/v1/zz_generated.openapi.go"
- "pkg/apis/kafka/v1beta2/zz_generated.deepcopy.go"
- "pkg/apis/kafka/v1beta2/zz_generated.openapi.go"
- "apis/v1/zz_generated.deepcopy.go"
- "apis/v1/zz_generated.defaults.go"
- "apis/v1/zz_generated.openapi.go"
- "apis/v1/groupversion_info.go"
- "pkg/kafka/v1beta2/zz_generated.deepcopy.go"
- "pkg/kafka/v1beta2/zz_generated.openapi.go"
- "pkg/kafka/v1beta2/groupversion_info.go"
- "pkg/util/k8s_utils.go"
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
testbin/
20 changes: 15 additions & 5 deletions .github/workflows/base-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,26 @@ jobs:
basic-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.16
- uses: actions/[email protected]
- uses: jpkrohling/[email protected]

- name: Check out code into the Go module directory
uses: actions/[email protected]

- name: "install kubebuilder"
run: ./hack/install-kubebuilder.sh

- name: "install kustomize"
run: ./hack/install-kustomize.sh

- uses: jpkrohling/[email protected]
with:
operator-sdk-version: v0.18.2
operator-sdk-version: v1.13.1

- name: "basic checks"
run: ./.ci/script.sh
run: make install-tools ci

- name: "upload test coverage report"
env:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ jobs:
- name: "install kuttl"
run: ./.ci/install-kuttl.sh

- name: "install gomplate"
run: ./.ci/install-gomplate.sh

- name: "run tests"
env:
KUBE_VERSION: ${{ matrix.kube-version }}
run: make install e2e-tests KUBE_VERSION=$KUBE_VERSION
run: make install-tools e2e-tests KUBE_VERSION=$KUBE_VERSION
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build/_output
build/_test
deploy/test
vendor
bin
tests/_build
# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
### Emacs ###
Expand Down
54 changes: 54 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16 as builder


WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# Copy the go source
COPY main.go main.go
COPY apis/ apis/
COPY cmd/ cmd/
COPY controllers/ controllers/
COPY pkg/ pkg/

COPY versions.txt versions.txt

ARG JAEGER_VERSION
ARG VERSION_PKG
ARG VERSION
ARG VERSION_DATE

# Dockerfile `FROM --platform=${BUILDPLATFORM}` means
# prepare image for build for matched BUILDPLATFORM, eq. linux/amd64
# by this way, we could avoid to using qemu, which slow down compiling process.
# and usefully for language who support multi-arch build like go.
# see last part of https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images
ARG TARGETARCH
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.defaultJaeger=${JAEGER_VERSION}" -a -o manager main.go

FROM registry.access.redhat.com/ubi8/ubi

ENV USER_UID=1001 \
USER_NAME=jaeger-operator

RUN INSTALL_PKGS="openssl" && \
yum install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum clean all && \
mkdir /tmp/_working_dir && \
chmod og+w /tmp/_working_dir

WORKDIR /
COPY --from=builder /workspace/manager .
COPY scripts/ scripts/

USER ${USER_UID}:${USER_UID}

ENTRYPOINT ["/manager"]
Loading

0 comments on commit 91e3b69

Please sign in to comment.