Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(docs): update external provisioners documentation#12315

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 2 commits intomainfromcj/provisioner-tags-docs
Feb 27, 2024

Conversation

johnstcn
Copy link
Member

  • Removes the verbiage regarding 'generic provisioners'
  • Adds details regarding tag matching logic

Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

👍

@johnstcnjohnstcn merged commit392fece intomainFeb 27, 2024
@johnstcnjohnstcn deleted the cj/provisioner-tags-docs branchFebruary 27, 2024 13:05
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 27, 2024
coder templates push on-prem \
--provisioner-tag scope=user
```
> Provisioners have two important tags: `scope` and `owner`. Coder sets these
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure "important" is the right word. Maybescope andowner are implicit tags and then we can talk about explicit tags being the ones you explicitly set on the command line

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yeah "explicit" vs "implicit" is good wording.


1. The provisioner and job tags are both organization-scoped and both have no
additional tags set,
1. The set of tags of the build job is a subset of the set of tags of the
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes it sound like if the job is organization scoped with no further tags it can run on any org-scoped provisioner.

I thought such a job can only run on an org-scoped provisioner with no further tags?

The way I would explain it is thatscope andowner are implicit tags.

An job with no explicit tags can only be run on a provisioner with no explicit tags. This way you can introduce tagging into your deployment without disrupting existing provisioners and jobs.

If a job has any explicit tags, it can only run on a provisioner with those explicit tags (the provisioner could have additional tags).

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

A provisioner can run a given build job if one of the below is true:

1. The provisioner and job tags are both organization-scoped and both have no
additional tags set,
Copy link
Contributor

Choose a reason for hiding this comment

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

What if the job is user-scoped and has no additional tags set? Can it run on a user-scoped provisioner that has tags?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yes, it currently can. There's no extra special-casing for user-scoped provisioners.

| `{"owner":"","scope":"organization"}` | `{"owner":"","scope":"organization"}` | true |
| `{"owner":"","scope":"organization"}` | `{"environment":"on_prem","owner":"","scope":"organization"}` | false |
| `{"environment":"on_prem","owner":"","scope":"organization"}` | `{"owner":"","scope":"organization"}` | false |
| `{"environment":"on_prem","owner":"","scope":"organization"}` | `{"foo":"bar","owner":"","scope":"organization"}` | true |
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this befalse because the provisioner doesn't havefoo=bar?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good catch. I updated this to be auto-generated#12347


| Provisioner Tags | Job Tags | Can run job? |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------ |
| `{"owner":"","scope":"organization"}` | `{"owner":"","scope":"organization"}` | true |
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these would be easier to read if it was just inkey1=value1, key2=value2 format instead of JSON.

| `{"owner":"aaa","scope":"owner"}` | `{"owner":"bbb","scope":"owner"}` | false |
| `{"owner":"","scope":"organization"}` | `{"owner":"aaa","scope":"owner"}` | false |

The external provisioner in the above example can run build jobs with tags:
Copy link
Contributor

Choose a reason for hiding this comment

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

which is the above example? The one on line 86? If so, this should be moved to before the table

- `data_center=chicago`
- `environment=on_prem datacenter=chicago`
- `environment=cloud datacenter=chicago`
- `environment=on_prem datacenter=new_york`
Copy link
Contributor

Choose a reason for hiding this comment

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

if the provisioner has adatacenter tag, it can't runbothdatacenter=chicago anddatacenter=new_york jobs.

- `environment=on_prem`
- `data_center=chicago`
- `environment=on_prem datacenter=chicago`
- `environment=cloud datacenter=chicago`
Copy link
Contributor

Choose a reason for hiding this comment

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

it shouldn't be able to runenvironment=cloud jobs if it is taggedenvironment=on_prem

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@spikecurtisspikecurtisspikecurtis left review comments

@mtojekmtojekmtojek approved these changes

Assignees

@johnstcnjohnstcn

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@johnstcn@spikecurtis@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp