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

[MM-53555] Support defining image registry through configuration #50

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

streamer45
Copy link
Contributor

Summary

PR adds a new config setting to control the image registry to be used during validation of job runners coming from the plugin side. This is useful in case of air gapped environments that may not be able to fetch from the default (public) Mattermost docker registry but would like to use a local registry instead.

Ticket Link

https://mattermost.atlassian.net/browse/MM-53555

}

recorderRunnerREs := []*regexp.Regexp{
regexp.MustCompile(fmt.Sprintf(`^%s/%s:v((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*))$`, registry, RecordingJobPrefix)),
Copy link
Member

Choose a reason for hiding this comment

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

Probably don't want to use MustCompile now that there's user input in there?

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 mean, if they want to crash the service they can do it. The compilation applies only to the input coming from the offloader service config setting (or environment variable) itself. I felt the convenience was enough to justify the tradeoff but can be changed of course.

Copy link
Member

Choose a reason for hiding this comment

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

0/5 whatever you prefer

@cpoile cpoile added 3: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Jan 8, 2024
Base automatically changed from MM-56184 to master January 22, 2024 15:23
@streamer45 streamer45 merged commit 79c931a into master Jan 22, 2024
3 checks passed
@streamer45 streamer45 deleted the MM-53555 branch January 22, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants