-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Add content/pt/docs/concepts/containers/container-lifecycle-hooks.md #27110
Add content/pt/docs/concepts/containers/container-lifecycle-hooks.md #27110
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit b12cbb5 https://deploy-preview-27110--kubernetes-io-master-staging.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for the PR.
Left some reviews here!
`PreStop` | ||
|
||
Esse _hook_ é chamado imediatamente antes de um contêiner ser encerrado devido a uma solicitação de API ou um gerenciamento de evento como liveness/startup probe failure, preemption, resource contention e outros. | ||
Uma chamada ao _hook_ `PreStop` falha se o contêiner já está em um estado finalizado ou concluído e o _hook_ deve ser concluído antes que o sinal TERM seja enviado para parar o contêiner. A contagem regressiva do período de tolerância de término do Pod começa antes que o _hook_ `PreStop` seja executado, portanto, independentemente do resultado do manipulador, o contêiner será encerrado dentro do período de tolerância de encerramento do Pod. Nenhum parâmetro é passado para o manispulador. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo here -> manispulador / manipulador
Os contêineres podem acessar um _hook_ implementando e registrando um manipulador para esse _hook_. | ||
Existem dois tipos de manipuladores de _hooks_ que podem ser implementados para contêineres: | ||
|
||
* Exec - Executa um comando específico, como `pre-stop.sh`, dentro do cgroups e Namespaces do contêiner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dentro do cgroup e namespace do container (tudo no plural ou tudo no singular)
### Execução do manipulador de hook | ||
|
||
|
||
Quando um _hook_ de gerenciamento de ciclo de vida do contêiner é chamado, o sistema de gerenciamento do Kubernetes executa o manipulador de acordo com a ação do _hook_, `httpGet` e `tcpSocker` são executados pelo processo kubelet e `exec` é executado pelo contêiner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/tcpSocker/tcpSocket
No entanto, se o _hook_ demorar muito para ser executado ou travar, o contêiner não consegue atingir o estado `running`. | ||
|
||
|
||
Os _hooks_ `PreStop` não são executados de forma assíncrona a partir do sinal para parar o conêiner, o _hook_ precisa finalizar a sua execução antes que o sinal TERM possa ser enviado. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/conêiner/contêiner
|
||
### Depurando manipuladores de _hooks_ | ||
|
||
Os logs para um manipulador de _hook_ não expostos em eventos de Pod. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the correct here would be 'são expostos em eventos de Pod"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original is "The logs for a Hook handler are not exposed in Pod events.". I added the missing word, thanks!
|
||
Os logs para um manipulador de _hook_ não expostos em eventos de Pod. | ||
Se um manipulador falhar por algum motivo, ele transmitirá um evento. | ||
Para `PostStart` é o evento `FailedPostStartHook` e para `PreStop` é o evento |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FailedPreStopHook (should start in upper case here)
/assign |
* manispulador -> manipulador * dentro do cgroup e namespace do container -> dentro dos cgroups e namespaces * tcpSocker -> tcpSocket * conêiner-> contêiner * Os logs para um manipulador de _hook_ não expostos em eventos de Pod -> Os logs para um manipulador de _hook_ não são expostos em eventos de Pod. * failedPreStopHook -> FailedPreStopHook
/lgtm Thank you! |
LGTM label has been added. Git tree hash: fb0d89a9f378d644c0acf8bea4ff2939c1de96ad
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rikatz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes:
content/pt/docs/concepts/containers/container-lifecycle-hooks.md
Related to #13939