Skip to content

chore: allow users to set the REG_PORT for make dev using a envvar#2057

Merged
chmouel merged 1 commit intotektoncd:mainfrom
waveywaves:dev/reg-port
Apr 18, 2025
Merged

chore: allow users to set the REG_PORT for make dev using a envvar#2057
chmouel merged 1 commit intotektoncd:mainfrom
waveywaves:dev/reg-port

Conversation

@waveywaves
Copy link
Copy Markdown
Member

@waveywaves waveywaves commented Apr 16, 2025

Changes

On Apple Macs the ControlCenter listens on port 5000.

# lsof without running the docker registry locally
lsof -i :5000 
                                                      
COMMAND     PID         USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
ControlCe 81715 vibhavbobade   11u  IPv4 0xf70fc252883ced3a      0t0  TCP *:commplex-main (LISTEN)
ControlCe 81715 vibhavbobade   12u  IPv6 0x13b6e0db93572d28

I wanted to use the 5001 port instead to avoid unauthorized errors while running ko builds.

This change we ensures that the user it able to set the REG_PORT using an environment variable and then use make dev after which consumes the REG_PORT env var to create the kind-registry exposed on the aforementioned port.

Submitter Checklist

  • 📝 Ensure your commit message is clear and informative. Refer to the How to write a git commit message guide. Include the commit message in the PR body rather than linking to an external site (e.g., Jira ticket).

  • ♽ Run make test lint before submitting a PR to avoid unnecessary CI processing. Consider installing pre-commit and running pre-commit install in the repository root for an efficient workflow.

  • ✨ We use linters to maintain clean and consistent code. Run make lint before submitting a PR. Some linters offer a --fix mode, executable with make fix-linters (ensure markdownlint and golangci-lint are installed).

  • 📖 Document any user-facing features or changes in behavior.

  • 🧪 While 100% coverage isn't required, we encourage unit tests for code changes where possible.

  • 🎁 If feasible, add an end-to-end test. See README for details.

  • 🔎 Address any CI test flakiness before merging, or provide a valid reason to bypass it (e.g., token rate limitations).

  • If adding a provider feature, fill in the following details:

    • GitHub App
    • GitHub Webhook
    • Gitea/Forgejo
    • GitLab
    • Bitbucket Cloud
    • Bitbucket Data Center

    (update the provider documentation accordingly)

Copilot AI review requested due to automatic review settings April 16, 2025 21:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the development documentation to allow users to specify a custom Docker registry port via the REG_PORT environment variable.

  • Added a section detailing how to configure the registry port.
  • Provided a code snippet showing how to set REG_PORT and run "make dev".
Files not reviewed (1)
  • hack/dev/kind/install.sh: Language not supported

Comment thread docs/content/docs/dev/_index.md Outdated
on Macs the ControlCenter listens on the port 5000 so wanted to set
the 5001 port instead for REG_PORT
this change ensures that the user it able to set the
REG_PORT using an environment variable
@waveywaves
Copy link
Copy Markdown
Member Author

cc @chmouel @zakisk

@chmouel
Copy link
Copy Markdown
Member

chmouel commented Apr 18, 2025

sounds good but we probably going to move everything to https://github.com/chmouel/startpaac soon :)

@chmouel chmouel merged commit 83456aa into tektoncd:main Apr 18, 2025
4 checks passed
@waveywaves
Copy link
Copy Markdown
Member Author

waveywaves commented Apr 18, 2025

@chmouel I created my own script for setting up PAC, wanted to test with github ANND have everything run on kind. Also, allowed me to replace the instance of pac running with ko apply -f config with KO_DOCKER_REPO=localhost:5001

@chmouel
Copy link
Copy Markdown
Member

chmouel commented Apr 18, 2025

@waveywaves startpaac does that too (on local) ;) but no worries if you want to use your own...

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.

4 participants