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

Add image build config and release script #18

Merged

Conversation

dsimansk
Copy link
Contributor

@dsimansk dsimansk commented Oct 11, 2024

Changes

  • Add image build config and release script

In a nutshell, this will be driven by the same release.sh as rest of the components. I'll create a nightly Prow job to verify it first.

IMO we could have at least another kind profile or some local one for development, but let's see.

Fixes #6

/cc @matzew @christophd

<!-- Unset to prevent default inheritance -->
<quarkus.container-image.insecure>false</quarkus.container-image.insecure>
</properties>
</profile>
Copy link
Contributor

Choose a reason for hiding this comment

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

In addition, you think we should generally leave it to local-horst?

<quarkus.container-image.registry>localhost:5001</quarkus.container-image.registry>

I guess, in theory, I'd like no hard-coded localhost, but something that resolves via ENV_VAR?

Here is a "big fan" of $KO_DOCKER_REPO like we do on golang 🙃

/cc @christophd

Copy link
Contributor

Choose a reason for hiding this comment

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

"local-horst" 🤣

I am not tied to using this local config as a default. I can adjust the settings on my fork when testing locally. Feel free to remove and set a decent default value like quay.io or something

Copy link
Contributor Author

@dsimansk dsimansk Oct 11, 2024

Choose a reason for hiding this comment

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

I wanted to isolate changes for now, but sure it make sense to use ${env.KO_DOCKER_REPO}.

A note here, quarkus doesn't like additional namespaces in registry property, only host:port combination. So kind.local is fine, but not gcr.io/knative-nightly - our default in release script. :)

Therefore I've used whole image property here.


go 1.23.1

require knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We only need go.mod to enable our hack scripts.

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good, @dsimansk

Thanks a lot for getting into this

@dsimansk
Copy link
Contributor Author

Nightly Prow job to test it out and publish the images: knative/infra#532

</property>
</activation>
<properties>
<quarkus.container-image.image>${env.KO_DOCKER_REPO}/${project.artifactId}:${env.TAG}</quarkus.container-image.image>
Copy link
Contributor Author

@dsimansk dsimansk Oct 11, 2024

Choose a reason for hiding this comment

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

@christophd @matzew currently the module names by directory and artifactId are different. E.g. <artifactId>kn-connector-aws-s3-source</artifactId> for aws-s3-sink. Should we align those, or create a name property to be reflected in the image name?

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 see Eventing core is expecting kn prefixed name. That's fine for now.

if source.Spec.Aws.S3 != nil {
			return "quay.io/openshift-knative/kn-connector-aws-s3-source:1.0-SNAPSHOT"
		}

Copy link
Contributor

Choose a reason for hiding this comment

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

🙈

let's fix that 🤣

Copy link
Contributor

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link

knative-prow bot commented Oct 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, matzew

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit d0ae268 into knative-extensions:main Oct 11, 2024
3 checks passed
@dsimansk dsimansk deleted the pr/knative-image-build branch October 11, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push not to local registy
3 participants