Skip to content

Add explicit k8s namespace for creating the ARC GitHub API PAT secret#29218

Merged
cmwilson21 merged 13 commits into
github:mainfrom
adiroiban:patch-1
Nov 14, 2023
Merged

Add explicit k8s namespace for creating the ARC GitHub API PAT secret#29218
cmwilson21 merged 13 commits into
github:mainfrom
adiroiban:patch-1

Conversation

@adiroiban

@adiroiban adiroiban commented Oct 17, 2023

Copy link
Copy Markdown
Contributor

Why:

Closes: #29217

What's being changed (if available, include any code snippets, screenshots, or gifs):

Add explicit namespace in example.

Todo

  • Also update the example when using a GitHub Action ... a need to check the source of that content.

Check off the following:

  • I have reviewed my changes in staging, available via the View deployment link in this PR's timeline.

    • For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.
  • For content changes, I have completed the self-review checklist.

@welcome

welcome Bot commented Oct 17, 2023

Copy link
Copy Markdown

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Oct 17, 2023
@github-actions

github-actions Bot commented Oct 17, 2023

Copy link
Copy Markdown
Contributor

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Preview Production What Changed
actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api.md fpt
ghec
ghes@ 3.10 3.9
fpt
ghec
ghes@ 3.10 3.9
actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/deploying-runner-scale-sets-with-actions-runner-controller.md fpt
ghec
ghes@ 3.10 3.9
fpt
ghec
ghes@ 3.10 3.9

fpt: Free, Pro, Team
ghec: GitHub Enterprise Cloud
ghes: GitHub Enterprise Server
ghae: GitHub AE

@cmwilson21

Copy link
Copy Markdown
Contributor

@adiroiban Thank you for opening a PR and linking it to your issue! ✨

I'll get this triaged for review! ⚡

@cmwilson21 cmwilson21 added content This issue or pull request belongs to the Docs Content team actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Oct 18, 2023
@mchammer01 mchammer01 self-requested a review October 19, 2023 14:40
@mchammer01

Copy link
Copy Markdown
Contributor

I'll review this on behalf of Docs.

@mchammer01

Copy link
Copy Markdown
Contributor

The update looks good to me. Checking with the relevant team as I think that we may need to make a couple more similar updates. Will report back once I know more 😃

@adiroiban

Copy link
Copy Markdown
Contributor Author

Yes. This needs changes in other parts. I am not familiar with the build system for this site, so I just started this PR to start a conversation.

Maybe my suggestion is not correct.

But I think that is important to specificy in which namespace we need to create the secret.

My understanding, is that with the new ARC controller, the secret is only needed in the controller.

The runners will receive an already computed token needed to join the list of available runners.

@mchammer01

mchammer01 commented Oct 19, 2023

Copy link
Copy Markdown
Contributor

@adiroiban - thanks for starting the conversation 😃
Someone from the relevant focus team, who knows more than me about GitHub Actions, will review this as soon as they can.

@mchammer01 mchammer01 removed their request for review October 19, 2023 18:01
@Link-

Link- commented Oct 20, 2023

Copy link
Copy Markdown
Member

Thank you @adiroiban for your contribution to making our docs better!

@Link- Link- left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Before we merge this, it'll be awesome to also add note here to clarify why we used the arc-runners namespace as opposed to arc-systems

cs_2023-10-20_10-29-00

…runners-with-actions-runner-controller/authenticating-to-the-github-api.md

Co-authored-by: Bassem Dghaidi <568794+Link-@users.noreply.github.com>
…runners-with-actions-runner-controller/authenticating-to-the-github-api.md
…runners-with-actions-runner-controller/authenticating-to-the-github-api.md


testing linter
…runners-with-actions-runner-controller/authenticating-to-the-github-api.md
@jc-clark

Copy link
Copy Markdown
Contributor

@Link- Thank you for the review! Let us know what you think of the changes from the latest commits. If it looks good to you, I can help merge this content 👍

@adiroiban

adiroiban commented Oct 20, 2023

Copy link
Copy Markdown
Contributor Author

Also, the "my_namespace" is refered in 2 places .

In the diff , it is only updated once.

Maybe that is ok.

image


And also here

image

@adiroiban

Copy link
Copy Markdown
Contributor Author

I have tested it and is working ok.

Thanks for the fix :)


I have previously reported an error, but it was something else.

It's a bit hard to troubleshoot errors that happen at pod run command level.
If a pod is scheduled by the controller but it fails to start, is not easy to track with with a barebone k8s cluster, as you can't retrie the logs post-mortem.

ARC works. Thanks. Much appreciated

My issue was with the image run command. Now solved.

@Link-

Link- commented Oct 21, 2023

Copy link
Copy Markdown
Member

Good point @adiroiban - @jc-clark I'm sorry to drag this a bit further, the current changes are 👍 can we please also introduce these changes?

Change 1

cs_2023-10-21_13-47-30

Change 2

cs_2023-10-21_13-47-48

Change 3

cs_2023-10-21_13-48-11

@jc-clark

Copy link
Copy Markdown
Contributor

👋 Hello @adiroiban! I don't have permissions to commit changes to your pull request directly. Can you help us make the changes outlined by @Link- above?

We will need to replace instances of my_namespace with arc-runners in those three locations.

Let me know if you run into any issues adding this change to your pull request. And thank you in advance!

@adiroiban

Copy link
Copy Markdown
Contributor Author

Hi.

Sorry for the delay... this repo is huge :)

I got it on my computer and and I hope I got it right.

$ grep my_namespace  content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/*

@jc-clark

jc-clark commented Oct 24, 2023

Copy link
Copy Markdown
Contributor

No problem @adiroiban and apologies, I was not very clear in my last comment, so we missed part of @Link-'s suggestion. Sorry about that!

I think we need to add the note about creating the secret in the right namespace to all three locations where we use this arc-runners example.

To show the same information in multiple locations, we use reusables.

These are the steps to create a new reusable file and then reference it in multiple locations:

  1. Copy the following information into a new .md file in the data/reusables/actions directory. Save the file and name it arc-runners-secret-namespace.md.

    {% note %}
    
    **Note:** Create the secret in the same namespace where the `gha-runner-scale-set` chart is installed. In this example, the namespace is `arc-runners` to match the quickstart documentation. For more information, see "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller#configuring-a-runner-scale-set)."
    
    {% endnote %}
    
  2. Copy {% data reusables.actions.arc-runners-secret-namespace %} to your clipboard and paste it above the three locations where we use arc-runners

  3. Commit your changes to this PR.

Let me know if you run into any issues with this, I'll be happy to help out. And thank you for your patience while I missed this note before 😅

@adiroiban

Copy link
Copy Markdown
Contributor Author

Hm. I don't think that reusables.actions.arc-runners-secret-namespace is the right name

Maybe reusables.actions.arc-runners-namespace

I think it should be more generic.

This is the namespace dedicated to the runners.

There is also arc-systems which is dedicated to the ARC controllers and other housekeeping jobs.

And this means that the whole arc-runners reference should be replaced with this reference

$ grep arc-runners  content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/*
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api.md:   **Note:** Create the secret in the same namespace where the `gha-runner-scale-set` chart is installed. In this example, the namespace is `arc-runners` to match the quickstart documentation. For more information, see "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller#configuring-a-runner-scale-set)."
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api.md:      --namespace=arc-runners \
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/deploying-runner-scale-sets-with-actions-runner-controller.md:      NAMESPACE="arc-runners"
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/deploying-runner-scale-sets-with-actions-runner-controller.md:  --namespace=arc-runners \
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/deploying-runner-scale-sets-with-actions-runner-controller.md:    --namespace=arc-runners \
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller.md:        NAMESPACE="arc-runners"
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller.md:    arc-runner-set  arc-runners     1               2023-04-12 11:46:13.451041354 +0000 UTC deployed        gha-runner-scale-set-0.4.0                  0.4.0
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller.md:    kubectl get pods -n arc-runners
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller.md:    arc-runners   arc-runner-set-rmrgw-runner-p9p5n                     1/1     Running   0             21s
content/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/using-actions-runner-controller-runners-in-a-workflow.md:NAMESPACE="arc-runners"

@jc-clark

Copy link
Copy Markdown
Contributor

Great catch @adiroiban! I think that name you suggested for the reusable would work perfectly.

@cmwilson21

Copy link
Copy Markdown
Contributor

👋 @adiroiban - just checking in! Are you up for creating the reusable described by @jc-clark above? Let us know if you need assistance! ✨

@adiroiban

Copy link
Copy Markdown
Contributor Author

Sorry. I didn't had much time for this. Still spending the whole week getting ARC un and running on my homelab.

I have pushed a change. I hope it's good enough to merge.

@cmwilson21

Copy link
Copy Markdown
Contributor

@adiroiban no problem! Thanks for getting back with us! Tagging @jc-clark in again on this! 👍

@jc-clark

jc-clark commented Nov 7, 2023

Copy link
Copy Markdown
Contributor

This looks amazing @adiroiban! Thanks for the changes. 🪩

We currently have a repo freeze happening, so I'll be able to merge this next week, when we are clear to publish docs again.

@cmwilson21 cmwilson21 added ready to merge This pull request is ready to merge Merge-after-freeze labels Nov 8, 2023
@cmwilson21 cmwilson21 enabled auto-merge November 14, 2023 15:18
@cmwilson21 cmwilson21 added this pull request to the merge queue Nov 14, 2023
Merged via the queue into github:main with commit 1e51f04 Nov 14, 2023
@github-actions

Copy link
Copy Markdown
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team ready to merge This pull request is ready to merge waiting for review Issue/PR is waiting for a writer's review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add explicit k8s namespace for creating the ARC GitHub API PAT secret

7 participants