Closed pavolloffay closed 3 months ago
Deploying the operator the second time does breaks:
IMG_PREFIX=docker.io/pavolloffay OPERATOR_VERSION=$(date +%s).0.0 BUNDLE_VARIANT=openshift make docker-build docker-push bundle bundle-build bundle-push olm-deploy 130 ↵ ploffay@fedora docker buildx build --load --platform linux/amd64 --build-arg OPERATOR_VERSION -t docker.io/pavolloffay/tempo-operator:v1717079247.0.0 . [+] Building 90.5s (19/19) FINISHED docker-container:jaeger-build => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 808B 0.0s => [internal] load metadata for docker.io/library/golang:1.21 2.6s => [internal] load metadata for gcr.io/distroless/static:nonroot 1.3s => [auth] library/golang:pull token for registry-1.docker.io 0.0s => [internal] load .dockerignore 0.1s => => transferring context: 230B 0.0s => CACHED [stage-1 1/3] FROM gcr.io/distroless/static:nonroot@sha256:e9ac71e2b8e279a8372741b7a0293afda17650d926900233ec3a7b2b7c22a246 0.1s => => resolve gcr.io/distroless/static:nonroot@sha256:e9ac71e2b8e279a8372741b7a0293afda17650d926900233ec3a7b2b7c22a246 0.1s => [internal] load build context 0.7s => => transferring context: 1.39MB 0.7s => [builder 1/9] FROM docker.io/library/golang:1.21@sha256:16438a8e66c0c984f732e815ee5b7d715b8e33e81bac6d6a3750b1067744e7ca 0.1s => => resolve docker.io/library/golang:1.21@sha256:16438a8e66c0c984f732e815ee5b7d715b8e33e81bac6d6a3750b1067744e7ca 0.1s => CACHED [builder 2/9] WORKDIR /workspace 0.0s => CACHED [builder 3/9] COPY Makefile Makefile 0.0s => CACHED [builder 4/9] RUN make controller-gen kustomize 0.0s => CACHED [builder 5/9] COPY go.mod go.mod 0.0s => CACHED [builder 6/9] COPY go.sum go.sum 0.0s => CACHED [builder 7/9] RUN go mod download 0.0s => [builder 8/9] COPY . . 3.2s => [builder 9/9] RUN make build 75.2s => [stage-1 2/3] COPY --from=builder /workspace/bin/manager . 0.4s => exporting to docker image format 7.1s => => exporting layers 5.8s => => exporting manifest sha256:9cd22344279129c911a2380c5f642b5a26a2d027557447124f895cac389d2b0c 0.0s => => exporting config sha256:3eb8bd9b081b8c18003cda200a68523d40c75e1716e99ba1519ddc2ec9681abe 0.0s => => sending tarball 1.2s => importing to docker 0.7s docker push docker.io/pavolloffay/tempo-operator:v1717079247.0.0 The push refers to repository [docker.io/pavolloffay/tempo-operator] bd882a766a5a: Pushed b336e209998f: Layer already exists f4aee9e53c42: Layer already exists 1a73b54f556b: Layer already exists 2a92d6ac9e4f: Layer already exists bbb6cacb8c82: Layer already exists ac805962e479: Layer already exists af5aa97ebe6c: Layer already exists 4d049f83d9cf: Layer already exists 945d17be9a3e: Layer already exists 49626df344c9: Layer already exists 3d6fa0469044: Layer already exists v1717079247.0.0: digest: sha256:41a815f3380ec3617899081297cce88b536238765ccdcc2e4d49040b2f369a31 size: 2814 BUNDLE_VARIANT=openshift make generate-bundle make[1]: Entering directory '/home/ploffay/projects/grafana/tempo-operator' test -s /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 || curl -sLo /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 https://github.com/operator-framework/operator-sdk/releases/download/v1.32.0/operator-sdk_`go env GOOS`_`go env GOARCH` test -s /home/ploffay/projects/grafana/tempo-operator/bin/controller-gen-v0.12.0 || @[ -f /home/ploffay/projects/grafana/tempo-operator/bin/controller-gen-v0.12.0 ] || { set -e ; TMP_DIR=$(mktemp -d) ; cd $TMP_DIR ; go mod init tmp ; echo "Downloading sigs.k8s.io/controller-tools/cmd/controller-gen" ; go get -d sigs.k8s.io/controller-tools/cmd/controller-gen@v0.12.0 ; GOBIN=/home/ploffay/projects/grafana/tempo-operator/bin go install -mod=mod sigs.k8s.io/controller-tools/cmd/controller-gen ; APP=$(echo "/home/ploffay/projects/grafana/tempo-operator/bin/controller-gen") ; APP_NAME=$(echo "$APP-v0.12.0") ; mv "$APP" "$APP_NAME" ; rm -rf $TMP_DIR ; } sed -i '/RELATED_IMAGE_TEMPO$/{n;s@value: .*@value: docker.io/grafana/tempo:2.4.1@}' config/manager/manager.yaml sed -i '/RELATED_IMAGE_TEMPO_QUERY$/{n;s@value: .*@value: docker.io/grafana/tempo-query:2.4.1@}' config/manager/manager.yaml sed -i '/RELATED_IMAGE_TEMPO_GATEWAY$/{n;s@value: .*@value: quay.io/observatorium/api:main-2024-05-29-ca8d2de@}' config/manager/manager.yaml sed -i '/RELATED_IMAGE_TEMPO_GATEWAY_OPA$/{n;s@value: .*@value: quay.io/observatorium/opa-openshift:main-2024-04-29-914c13f@}' config/manager/manager.yaml sed -i '/RELATED_IMAGE_OAUTH_PROXY$/{n;s@value: .*@value: quay.io/openshift/origin-oauth-proxy:4.12@}' config/manager/manager.yaml /home/ploffay/projects/grafana/tempo-operator/bin/controller-gen-v0.12.0 rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases test -s /home/ploffay/projects/grafana/tempo-operator/bin/kustomize-v5.0.3 || @[ -f /home/ploffay/projects/grafana/tempo-operator/bin/kustomize-v5.0.3 ] || { set -e ; TMP_DIR=$(mktemp -d) ; cd $TMP_DIR ; go mod init tmp ; echo "Downloading sigs.k8s.io/kustomize/kustomize/v5" ; go get -d sigs.k8s.io/kustomize/kustomize/v5@v5.0.3 ; GOBIN=/home/ploffay/projects/grafana/tempo-operator/bin go install -mod=mod sigs.k8s.io/kustomize/kustomize/v5 ; APP=$(echo "/home/ploffay/projects/grafana/tempo-operator/bin/kustomize") ; APP_NAME=$(echo "$APP-v5.0.3") ; mv "$APP" "$APP_NAME" ; rm -rf $TMP_DIR ; } sed -i 's@containerImage: .*@containerImage: docker.io/pavolloffay/tempo-operator:v1717079247.0.0@' config/manifests/openshift/bases/tempo-operator.clusterserviceversion.yaml sed -i 's/minKubeVersion: .*/minKubeVersion: 1.25.0/' config/manifests/openshift/bases/tempo-operator.clusterserviceversion.yaml /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 generate kustomize manifests -q --input-dir config/manifests/openshift --output-dir config/manifests/openshift cd config/manager && /home/ploffay/projects/grafana/tempo-operator/bin/kustomize-v5.0.3 edit set image controller=docker.io/pavolloffay/tempo-operator:v1717079247.0.0 cd ./bundle/openshift && cp ../../PROJECT . && /home/ploffay/projects/grafana/tempo-operator/bin/kustomize-v5.0.3 build ../../config/manifests/openshift | /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 generate bundle -q --overwrite --version 1717079247.0.0 --output-dir . --kustomize-dir ../../config/manifests/openshift && rm PROJECT # Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically. # Warning: 'bases' is deprecated. Please use 'resources' instead. Run 'kustomize edit fix' to update your Kustomization automatically. # Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically. # Warning: 'vars' is deprecated. Please use 'replacements' instead. [EXPERIMENTAL] Run 'kustomize edit fix' to update your Kustomization automatically. # Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically. INFO[0000] Creating bundle.Dockerfile INFO[0000] Creating metadata/annotations.yaml INFO[0000] Bundle metadata generated successfully # Workaround for https://github.com/operator-framework/operator-sdk/issues/4992 echo -e "\nLABEL com.redhat.openshift.versions=v4.12" >> bundle/openshift/bundle.Dockerfile echo -e "\n com.redhat.openshift.versions: v4.12" >> bundle/openshift/metadata/annotations.yaml /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 bundle validate ./bundle/openshift INFO[0000] All validation tests have completed successfully ./hack/ignore-createdAt-bundle.sh make[1]: Leaving directory '/home/ploffay/projects/grafana/tempo-operator' BUNDLE_VARIANT=community make generate-bundle make[1]: Entering directory '/home/ploffay/projects/grafana/tempo-operator' test -s /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 || curl -sLo /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 https://github.com/operator-framework/operator-sdk/releases/download/v1.32.0/operator-sdk_`go env GOOS`_`go env GOARCH` test -s /home/ploffay/projects/grafana/tempo-operator/bin/controller-gen-v0.12.0 || @[ -f /home/ploffay/projects/grafana/tempo-operator/bin/controller-gen-v0.12.0 ] || { set -e ; TMP_DIR=$(mktemp -d) ; cd $TMP_DIR ; go mod init tmp ; echo "Downloading sigs.k8s.io/controller-tools/cmd/controller-gen" ; go get -d sigs.k8s.io/controller-tools/cmd/controller-gen@v0.12.0 ; GOBIN=/home/ploffay/projects/grafana/tempo-operator/bin go install -mod=mod sigs.k8s.io/controller-tools/cmd/controller-gen ; APP=$(echo "/home/ploffay/projects/grafana/tempo-operator/bin/controller-gen") ; APP_NAME=$(echo "$APP-v0.12.0") ; mv "$APP" "$APP_NAME" ; rm -rf $TMP_DIR ; } sed -i '/RELATED_IMAGE_TEMPO$/{n;s@value: .*@value: docker.io/grafana/tempo:2.4.1@}' config/manager/manager.yaml sed -i '/RELATED_IMAGE_TEMPO_QUERY$/{n;s@value: .*@value: docker.io/grafana/tempo-query:2.4.1@}' config/manager/manager.yaml sed -i '/RELATED_IMAGE_TEMPO_GATEWAY$/{n;s@value: .*@value: quay.io/observatorium/api:main-2024-05-29-ca8d2de@}' config/manager/manager.yaml sed -i '/RELATED_IMAGE_TEMPO_GATEWAY_OPA$/{n;s@value: .*@value: quay.io/observatorium/opa-openshift:main-2024-04-29-914c13f@}' config/manager/manager.yaml sed -i '/RELATED_IMAGE_OAUTH_PROXY$/{n;s@value: .*@value: quay.io/openshift/origin-oauth-proxy:4.12@}' config/manager/manager.yaml /home/ploffay/projects/grafana/tempo-operator/bin/controller-gen-v0.12.0 rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases test -s /home/ploffay/projects/grafana/tempo-operator/bin/kustomize-v5.0.3 || @[ -f /home/ploffay/projects/grafana/tempo-operator/bin/kustomize-v5.0.3 ] || { set -e ; TMP_DIR=$(mktemp -d) ; cd $TMP_DIR ; go mod init tmp ; echo "Downloading sigs.k8s.io/kustomize/kustomize/v5" ; go get -d sigs.k8s.io/kustomize/kustomize/v5@v5.0.3 ; GOBIN=/home/ploffay/projects/grafana/tempo-operator/bin go install -mod=mod sigs.k8s.io/kustomize/kustomize/v5 ; APP=$(echo "/home/ploffay/projects/grafana/tempo-operator/bin/kustomize") ; APP_NAME=$(echo "$APP-v5.0.3") ; mv "$APP" "$APP_NAME" ; rm -rf $TMP_DIR ; } sed -i 's@containerImage: .*@containerImage: docker.io/pavolloffay/tempo-operator:v1717079247.0.0@' config/manifests/community/bases/tempo-operator.clusterserviceversion.yaml sed -i 's/minKubeVersion: .*/minKubeVersion: 1.25.0/' config/manifests/community/bases/tempo-operator.clusterserviceversion.yaml /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 generate kustomize manifests -q --input-dir config/manifests/community --output-dir config/manifests/community cd config/manager && /home/ploffay/projects/grafana/tempo-operator/bin/kustomize-v5.0.3 edit set image controller=docker.io/pavolloffay/tempo-operator:v1717079247.0.0 cd ./bundle/community && cp ../../PROJECT . && /home/ploffay/projects/grafana/tempo-operator/bin/kustomize-v5.0.3 build ../../config/manifests/community | /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 generate bundle -q --overwrite --version 1717079247.0.0 --output-dir . --kustomize-dir ../../config/manifests/community && rm PROJECT # Warning: 'bases' is deprecated. Please use 'resources' instead. Run 'kustomize edit fix' to update your Kustomization automatically. # Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically. # Warning: 'vars' is deprecated. Please use 'replacements' instead. [EXPERIMENTAL] Run 'kustomize edit fix' to update your Kustomization automatically. # Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically. INFO[0001] Creating bundle.Dockerfile INFO[0001] Creating metadata/annotations.yaml INFO[0001] Bundle metadata generated successfully # Workaround for https://github.com/operator-framework/operator-sdk/issues/4992 echo -e "\nLABEL com.redhat.openshift.versions=v4.12" >> bundle/community/bundle.Dockerfile echo -e "\n com.redhat.openshift.versions: v4.12" >> bundle/community/metadata/annotations.yaml /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 bundle validate ./bundle/community INFO[0000] All validation tests have completed successfully ./hack/ignore-createdAt-bundle.sh make[1]: Leaving directory '/home/ploffay/projects/grafana/tempo-operator' docker buildx build --load --platform linux/amd64 -f ./bundle/openshift/bundle.Dockerfile -t docker.io/pavolloffay/tempo-operator-bundle:v1717079247.0.0 ./bundle/openshift [+] Building 1.8s (8/8) FINISHED docker-container:jaeger-build => [internal] load build definition from bundle.Dockerfile 0.0s => => transferring dockerfile: 989B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build context 0.0s => => transferring context: 289.65kB 0.0s => [1/3] COPY ./manifests /manifests/ 0.1s => [2/3] COPY ./metadata /metadata/ 0.2s => [3/3] COPY ./tests/scorecard /tests/scorecard/ 0.2s => exporting to docker image format 0.9s => => exporting layers 0.6s => => exporting manifest sha256:55dbfdfe1f411282c0f19414f1dc6e0ec2031cd1b39aaab8f13eb99e3c7de15d 0.0s => => exporting config sha256:2af56ff60f0f2355a94fea9ee51b888cc84fd049c442acc8b8798fa27d31747b 0.1s => => sending tarball 0.2s => importing to docker 0.2s make docker-push IMG=docker.io/pavolloffay/tempo-operator-bundle:v1717079247.0.0 make[1]: Entering directory '/home/ploffay/projects/grafana/tempo-operator' docker push docker.io/pavolloffay/tempo-operator-bundle:v1717079247.0.0 The push refers to repository [docker.io/pavolloffay/tempo-operator-bundle] c0c5497df9da: Pushed bd72217b14a8: Pushed b9234521de11: Pushed v1717079247.0.0: digest: sha256:696ad110b6219cd5915a6775c87e8aaece762e2ca8dcfab6119260b1604df5a1 size: 940 make[1]: Leaving directory '/home/ploffay/projects/grafana/tempo-operator' test -s /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 || curl -sLo /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 https://github.com/operator-framework/operator-sdk/releases/download/v1.32.0/operator-sdk_`go env GOOS`_`go env GOARCH` /home/ploffay/projects/grafana/tempo-operator/bin/operator-sdk-1.32.0 run bundle -n tempo-operator-system docker.io/pavolloffay/tempo-operator-bundle:v1717079247.0.0 INFO[0016] Creating a File-Based Catalog of the bundle "docker.io/pavolloffay/tempo-operator-bundle:v1717079247.0.0" INFO[0019] Generated a valid File-Based Catalog FATA[0019] Failed to run bundle: create catalog: error creating catalog source: catalogsources.operators.coreos.com "tempo-operator-catalog" already exists make: *** [Makefile:194: olm-deploy] Error 1
never mind it is documented here https://github.com/grafana/tempo-operator/blob/386cd0526b2eee409eb971b25eb844a3e56e333e/CONTRIBUTING.md#L50
Deploying the operator the second time does breaks: