The teams reef
Every command of the first slice: teams on the tenancy tree, their members and positions
O reef teams
Todos os comandos da primeira fatia: times na árvore de tenancy, os seus membros e posições
The source of truth for the commands of the teams reef (#1646, the teams reef of the first slice of teams and authorization). Its kinds are Team, the default kind, and Member, in teams.getnereus.dev/v1alpha1, cluster-scoped; the Nereus API's routes are /v1/teams/teams and /v1/teams/members, and the commands nereus teams create | apply | list | get | delete and nereus teams member create | apply | list | get | delete.
No Nereid serves this reef: the Nereus API keeps its objects and their rules, as it keeps the tenancy tree (ADR 0015, tenancy: Organization and Project). The authorization reef reads the teams to grant roles (docs/specs/cli/reefs/authorization.html).
A fonte da verdade dos comandos do reef teams (#1646, o reef teams da primeira fatia de times e autorização). Os seus kinds são Team, o kind padrão, e Member, em teams.getnereus.dev/v1alpha1, no escopo do cluster; as rotas da Nereus API são /v1/teams/teams e /v1/teams/members, e os comandos nereus teams create | apply | list | get | delete e nereus teams member create | apply | list | get | delete.
Nenhuma Nereid serve este reef: a Nereus API guarda os seus objetos e as suas regras, como guarda a árvore de tenancy (ADR 0015, tenancy: Organization e Project). O reef authorization lê os times para conceder papéis (docs/specs/cli/reefs/authorization.html).
Where do teams live?
Onde ficam os times?
The teams reef brings teams and members
O reef teams traz times e membros
# The kinds of the reef, with no Nereid$ nereus reef apply teams✓ core/reefs/teams created (teams.getnereus.dev/v1alpha1: members, teams) Next steps: nereus teams --help
Two kinds and their admission policies: a team with no owner is refused, and so is a member whose name does not start with its team, even when written with kubectl.
No profile holds it yet: a profile installs one lane per Nereid, and this reef has none, so it is applied on its own.
Dois kinds e as suas políticas de admissão: um time sem owner é recusado, e também um membro cujo nome não começa pelo seu time, mesmo escrito com kubectl.
Nenhum profile o guarda ainda: um profile instala uma faixa por Nereid, e este reef não tem nenhuma, então é aplicado sozinho.
Who works with whom?
Quem trabalha com quem?
A team sits on a node of the tenancy tree
Um time fica em um nó da árvore de tenancy
# The team of the payments Project$ nereus teams create payments \ --owner project/payments✓ teams/teams/payments created Next steps: nereus teams member create <user> --team payments
Team is the default kind of the teams reef, so nereus teams create acts on it (ADR 0013, command conventions).
The owner is a node of the tenancy tree (ADR 0015, tenancy: Organization and Project): an Organization or a Project, which must exist. Teams do not nest in this slice; the tree is the hierarchy.
Team é o kind padrão do reef teams, então nereus teams create age sobre ele (ADR 0013, convenções de comando).
O owner é um nó da árvore de tenancy (ADR 0015, tenancy: Organization e Project): uma Organization ou um Project, que precisa existir. Times não se aninham nesta fatia; a árvore é a hierarquia.
A team whose owner does not exist is refused
Um time cujo owner não existe é recusado
# No Project billing yet$ nereus teams create billing \ --owner project/billing✗ teams/teams/billing: its owner project/billing does not exist: see 'nereus tenancy project list'
The API checks the owner before it writes: the kind must be one of the tenancy tree's, and the node must exist. Nothing is written when either is missing.
A API verifica o owner antes de escrever: o kind precisa ser um dos da árvore de tenancy, e o nó precisa existir. Nada é escrito quando um dos dois falta.
Ana joins as the tech lead: a position
A Ana entra como tech lead: uma posição
# A member with a position$ nereus teams member create ana \ --team payments \ --position tech-lead✓ teams/teams/payments/members/ana created Next steps: nereus teams get payments
A position is a free name on the member in this slice. It grants nothing by itself: only a binding that names it does.
A member of a team that does not exist is refused, with the command that creates the team.
Uma posição é um nome livre no membro nesta fatia. Sozinha ela não concede nada: só um binding que a cite concede.
Um membro de um time que não existe é recusado, com o comando que cria o time.
Bruno joins with no position
O Bruno entra sem posição
# A member like most$ nereus teams member create bruno \ --team payments✓ teams/teams/payments/members/bruno created Next steps: nereus teams get payments
The member's name is the User's name, unless --user names another (ADR 0006, the person is a User of core). The User must exist (#1645, the User kind in core): a member of a User that does not exist is refused, with nereus user list.
A member is unique in its team: its object is named payments.bruno, its path teams/teams/payments/members/bruno.
O nome do membro é o nome do User, a menos que --user cite outro (ADR 0006, a pessoa é um User do core). O User precisa existir (#1645, o kind User no core): um membro de um User que não existe é recusado, com nereus user list.
Um membro é único no seu time: o seu objeto se chama payments.bruno, o seu caminho teams/teams/payments/members/bruno.
The team shows its members and positions
O time mostra os seus membros e posições
# Who is in the team$ nereus teams get paymentspayments: 2 members, owner project/paymentsMEMBER POSITION USERana tech-lead core/users/anabruno - core/users/bruno Next steps: nereus authorization binding create <name> --role <role> --team payments --owner project/payments
One list of members, and access derives from it. The next step is a binding of the authorization reef: what this team, or one of its positions, may do.
Uma só lista de membros, e o acesso deriva dela. O próximo passo é um binding do reef authorization: o que este time, ou uma das suas posições, pode fazer.
Every team, its owner and how many members
Todos os times, o seu owner e quantos membros
# The teams of the platform$ nereus teams listNAME OWNER MEMBERS AGEpayments project/payments 2 5m # The members of one team$ nereus teams member list \ --team paymentsTEAM MEMBER POSITION USER AGEpayments ana tech-lead core/users/ana 5mpayments bruno - core/users/bruno 4m
member list with no --team lists the members of every team, one row each, with its team first.
member list sem --team lista os membros de todos os times, uma linha cada, com o seu time primeiro.
How does a team change?
Como um time muda?
A team with members is not deleted
Um time com membros não é apagado
# Two members still in it$ nereus teams delete payments✗ teams/teams/payments has 2 members (ana, bruno): delete them first: nereus teams member delete ana --team payments Nothing was changed.
A team is deleted only once it has no member and no binding names it, so access never points to a team that is gone. A binding that names it is refused the same way, with nereus authorization binding delete <binding>.
Um time só é apagado quando não tem membro e nenhum binding o cita, então o acesso nunca aponta para um time que não existe. Um binding que o cite é recusado do mesmo jeito, com nereus authorization binding delete <binding>.
Bruno leaves the team
O Bruno sai do time
# The team keeps its other members$ nereus teams member delete bruno \ --team payments✓ teams/teams/payments/members/bruno deleted Next steps: nereus teams get payments
Leaving the team removes the access it gave, since every grant comes from the list of members.
Sair do time remove o acesso que ele dava, já que toda concessão vem da lista de membros.
A file of teams and members, applied again with no change
Um arquivo de times e membros, aplicado de novo sem mudança
# Teams first, then their members$ nereus teams apply \ --from-file payments.yaml✓ teams/teams/payments created✓ teams/teams/payments/members/ana created✓ teams/teams/payments/members/bruno created Next steps: nereus teams list # The same file again$ nereus teams apply \ --from-file payments.yamlteams/teams/payments unchangedteams/teams/payments/members/ana unchangedteams/teams/payments/members/bruno unchanged Next steps: nereus teams list
apply creates or configures, and the same file twice changes nothing (ADR 0013, command conventions). nereus teams member apply takes Members only; --dry-run says what would change.
apply cria ou configura, e o mesmo arquivo duas vezes não muda nada (ADR 0013, convenções de comando). nereus teams member apply aceita só Members; --dry-run diz o que mudaria.