Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OU-453: Add perses-operator to COO component for Konflux #463

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zhuje
Copy link
Contributor

@zhuje zhuje commented Jan 27, 2025

- Added submodule to link to perses/perses-operator by running `git submodule add https://github.com/perses/perses-operator`
- TODO: 1) Need to point to a release branch for perses-operator in .gitmodules file 2) Need to double check Dockerfile.perses-operator points at the right file paths
@zhuje zhuje marked this pull request as draft January 27, 2025 19:04
zhuje added 2 commits January 27, 2025 14:55
Add /perses-operator to .gitignore
Add `ignore=all` flag to .gitmodules > submodule "perses-operator" so that it doesn't update the submodule when runnning `git submodule updates`.

We'll need to remove the gitignore and manually push for each tag change to point at a new commit in the submodule.

(current workaround the fact that there are no release branches in perses/perses-operator)
…perator has access to generate file "/perses-operator/bin/manager"
.gitmodules Outdated
url = https://github.com/perses/perses-operator.git
#branch = TBD release brach
# sub-module should point to tag v0.1.0
ignore = all #ignore all `git submodule updates` to this submodule (will be manually updated to accomdate usage of tags)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manually updating might be cumbersome. We can create a release branch from the operator side

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this to point at the release branch I created in /perses/perses-operator and will update the .gitmoduels to branch=release-v0.1.0.

https://github.com/perses/perses-operator/tree/release-v0.1.0 it points to the same commit as the tag v0.1.0 (e56893154adfc65e667efeb3a3a112042f1b28df)

FROM alpine AS build-env
RUN apk add --update --no-cache mailcap

FROM gcr.io/distroless/static-debian12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to use redhat validated images.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this file to mimic /perses/perses-operator/Dockerfile.dev

Updated to use equivalent redhat validated images. I think Dockerfile.obo is using similar images so I used those:

Before
FROM golang:1.23-alpine AS build-env
After
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_golang_1.22 as build-env

Before
FROM gcr.io/distroless/static-debian12
After
FROM registry.redhat.io/ubi8/ubi-minimal:8.10-1130


USER nobody

COPY --chown=nobody:nobody perses-operator/bin/manager /bin/manager
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image asumes the binary is already built, we need to change it to one that actually builds the binary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this file to mimic /perses/perses-operator/Dockerfile.dev

Updated to use equivalent redhat validated images. I think Dockerfile.obo is using similar images so I used those:

Before
FROM golang:1.23-alpine AS build-env
After
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_golang_1.22 as build-env

Before
FROM gcr.io/distroless/static-debian12
After
FROM registry.redhat.io/ubi8/ubi-minimal:8.10-1130

@zhuje zhuje changed the title DRAFT OU-453: Add perses-operator to COO component for Konflux OU-453: Add perses-operator to COO component for Konflux Jan 31, 2025
@zhuje zhuje marked this pull request as ready for review January 31, 2025 02:29
Update Dockerfile.perses-operator with redhat certified images and instructions to build the application (this is based on perses/perses-operator/Dockerfile.dev)
@@ -0,0 +1,22 @@
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_golang_1.22 as build-env

RUN apk add --update --no-cache make bash mailcap
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command might not work, or might be necessary anymore because we changed the image.

If we don't have access to the brew.registry.redhat.io registry -- then try to find an equivalent image.
Test with docker build to see if it succeeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants