The release reef
From a chart repository to a running release, step by step
O reef release
De um repositório de charts até uma release rodando, passo a passo
What we want to say: a person names the reef, never the tool. The {reef:release} reef runs a Helm chart without tying Nereus to Flux, Argo CD or plain Helm.
Route: the four kinds of the reef, the nine commands with Flux, what the Nereid writes underneath, and how the tool can change.
Source: docs/guides/reefs/release.md.
Sources:
O que queremos dizer: a pessoa nomeia o reef, nunca a ferramenta. O reef {reef:release} roda um Helm chart sem amarrar o Nereus ao Flux, ao Argo CD ou ao Helm puro.
Roteiro: os quatro kinds do reef, os nove comandos com o Flux, o que o Nereid escreve por baixo e como a ferramenta pode mudar.
Fonte: docs/guides/reefs/release.md.
Fontes:
Which questions does a release answer?
Que perguntas uma release responde?
The release reef splits a release into four questions, each one a kind
release.getnereus.dev/v1alpha1
- Repository: where it comes from (http, oci or git)
- Source: what, a chart of a repository at a version
O reef release divide uma release em quatro perguntas, cada uma um kind
release.getnereus.dev/v1alpha1
- Repository: de onde vem (http, oci ou git)
- Source: o quê, um chart de um repositório numa versão
What we want to say: each kind answers one question, so each can change on its own.
A Repository is a Helm repository (http), an OCI (Open Container Initiative) registry (oci) or Git (git). A Source is one chart of a repository at a version.
Source: docs/guides/reefs/release.md, #445.
Sources:
O que queremos dizer: cada kind responde uma pergunta, então cada um pode mudar sozinho.
Um Repository é um repositório Helm (http), um registry OCI (Open Container Initiative, oci) ou Git (git). Um Source é um chart de um repositório numa versão.
Fonte: docs/guides/reefs/release.md, #445.
Fontes:
A Release is a Source running in a Target, with its values
release.getnereus.dev/v1alpha1
- Target: where to, a namespace of an environment
- Release: the Source running in the Target
Uma Release é um Source rodando num Target, com os seus values
release.getnereus.dev/v1alpha1
- Target: para onde, um namespace de um environment
- Release: o Source rodando no Target
What we want to say: the Release is the only kind that runs something; the other three describe it.
Until the environment reef exists, every Target is the cluster Nereus runs in, and the Nereid says so in the Target's status.
Source: docs/guides/reefs/release.md.
O que queremos dizer: a Release é o único kind que roda algo; os outros três a descrevem.
Enquanto o reef environment não existe, todo Target é o cluster onde o Nereus roda, e o Nereid diz isso no status do Target.
Fonte: docs/guides/reefs/release.md.
What does a person type to run a chart?
O que uma pessoa digita para rodar um chart?
One command applies the release reef, and the CLI gains its commands
Um comando aplica o reef release, e a CLI ganha os seus comandos
# Apply the release reef$ nereus reef apply release✓ core/reefs/release 0.1.0 created (release.getnereus.dev/v1alpha1: releases, repositories, sources, targets) Next steps: nereus release --help nereus nereid apply <nereid> --reef release
What we want to say: the reef comes first, with no tool behind it. The CLI gains the command group nereus release, which says so while no Nereid looks after it.
Source: docs/guides/reefs/release.md.
O que queremos dizer: o reef vem primeiro, sem ferramenta por trás. A CLI ganha o grupo de comandos nereus release, que avisa isso enquanto nenhum Nereid cuida dele.
Fonte: docs/guides/reefs/release.md.
The flux Nereid installs Flux first, pinned by version and digest
O Nereid flux instala o Flux primeiro, fixado por versão e digest
# Apply the flux Nereid to the release reef$ nereus nereid apply flux \ --reef release✓ core/nereids/flux created, Ready, pinned to sha256:e8731e3fb833: see 'nereus release --help' flux/v2.9.6 created (source-controller, helm-controller in namespace flux-system) Next steps: nereus mandate create flux --reef release --nereid flux --default
What we want to say: only the two controllers the reef uses: source-controller and helm-controller, from Flux's install.yaml of the version the CLI pins, refused unless its digest is the pinned one.
Applying it again changes nothing. Who upgrades Flux is still open: #449 (decide who upgrades Flux, the Tool the flux Nereid installs).
Source: docs/guides/reefs/release.md.
Sources:
O que queremos dizer: só os dois controllers que o reef usa: source-controller e helm-controller, do install.yaml do Flux na versão que a CLI fixa, recusado se o digest não for o fixado.
Aplicar de novo não muda nada. Quem atualiza o Flux ainda está aberto: #449 (decidir quem atualiza o Flux, a Tool que o Nereid flux instala).
Fonte: docs/guides/reefs/release.md.
Fontes:
A Mandate makes flux the default Nereid of the release reef
Um Mandate faz do flux o Nereid padrão do reef release
# Bind the release reef to the flux Nereid, as the default$ nereus mandate create flux \ --reef release \ --nereid flux \ --default✓ core/mandates/flux created (reef: release, nereid: flux, default) clusterrole/controller-flux configured (nereid flux writes the status of mandate flux) Next steps: nereus release repository create <name> --url <url>
What we want to say: the admin decides which Nereid serves the reef, never the person who asks for a release.
The Mandate binds one reef to one Nereid; the default one serves every Release that names none.
Source: docs/guides/reefs/release.md, ADR 0011 (reefs, Nereids and Mandates).
O que queremos dizer: o admin decide qual Nereid atende o reef, nunca quem pede uma release.
O Mandate liga um reef a um Nereid; o padrão atende toda Release que não nomeia nenhum.
Fonte: docs/guides/reefs/release.md, ADR 0011 (reefs, Nereids e Mandates).
A Repository says where the chart comes from
Um Repository diz de onde o chart vem
# Where the chart comes from$ nereus release repository create codecentric \ --url https://codecentric.github.io/helm-charts \ --type http✓ release/repositories/codecentric createdNAME TYPE URL READYcodecentric http https://codecentric.github.io/helm-charts True Next steps: nereus release source create <name> --repository codecentric --chart <chart> --version <version>
What we want to say: a private registry is one option more: --type oci and --secret <secret>, a {secret:secret} of the secrets reef.
Source: docs/guides/reefs/release.md.
Sources:
O que queremos dizer: um registry privado é só mais uma opção: --type oci e --secret <secret>, um {secret:secret} do reef secrets.
Fonte: docs/guides/reefs/release.md.
Fontes:
A Source says what: one chart at one version
Um Source diz o quê: um chart numa versão
# What: the chart and its version$ nereus release source create keycloak \ --repository codecentric \ --chart keycloakx \ --version 7.0.1✓ release/sources/keycloak createdNAME REPOSITORY CHART VERSION DIGEST READYkeycloak codecentric keycloakx 7.0.1 - True Next steps: nereus release target create <name> --namespace <namespace>
What we want to say: the version is pinned in the Source, so every Release of it runs the same chart.
Source: docs/guides/reefs/release.md.
O que queremos dizer: a versão fica fixada no Source, então toda Release dele roda o mesmo chart.
Fonte: docs/guides/reefs/release.md.
A Target says where to: a namespace of an environment
Um Target diz para onde: um namespace de um environment
# Where to: the environment and the namespace$ nereus release target create dev-identity \ --environment dev \ --namespace identity✓ release/targets/dev-identity createdNAME ENVIRONMENT NAMESPACE READYdev-identity dev identity True Next steps: nereus release create <name> --source <source> --target dev-identity
What we want to say: --environment is optional. Until the environment reef exists, every Target is the cluster Nereus runs in, and the Nereid says so in the Target's status.
Source: docs/guides/reefs/release.md.
O que queremos dizer: --environment é opcional. Enquanto o reef environment não existe, todo Target é o cluster onde o Nereus roda, e o Nereid diz isso no status do Target.
Fonte: docs/guides/reefs/release.md.
The chart's values stay in a file of the person's own
Os values do chart ficam num arquivo da própria pessoa
# The values of the keycloakx chart$ cat keycloak-values.yamlreplicas: 1fullnameOverride: keycloakcommand: ["/opt/keycloak/bin/kc.sh", "start-dev"]cache: stack: custom
What we want to say: values are Helm's own, untouched by Nereus.
Dev mode keeps its cache local, and the chart's default cache stack needs a DNS (Domain Name System) query for a cluster of pods, hence cache.stack: custom.
Source: docs/guides/reefs/release.md.
O que queremos dizer: os values são os do próprio Helm, intocados pelo Nereus.
O dev mode guarda o cache localmente, e a pilha de cache padrão do chart precisa de uma consulta DNS (Domain Name System) para um cluster de pods, daí o cache.stack: custom.
Fonte: docs/guides/reefs/release.md.
The Release runs the Source in the Target, through the flux Mandate
A Release roda o Source no Target, pelo Mandate flux
# Run the chart in the target, with its values$ nereus release create keycloak \ --source keycloak \ --target dev-identity \ --values-file keycloak-values.yaml \ --mandate flux✓ release/releases/keycloak created (nereid: flux) Next steps: nereus release get keycloak --watch
What we want to say: nereus release create is nereus release release create: a kind named after its reef takes the reef's own verbs.
--mandate is optional: without it, the Release goes through the reef's default Mandate.
Source: docs/guides/reefs/release.md.
O que queremos dizer: nereus release create é nereus release release create: um kind com o nome do reef usa os verbos do próprio reef.
--mandate é opcional: sem ele, a Release passa pelo Mandate padrão do reef.
Fonte: docs/guides/reefs/release.md.
The status flows back from Flux until the Release is Ready
O status volta do Flux até a Release ficar Ready
# Watch the release until the Nereid is done$ nereus release get keycloak \ --watchNAME SOURCE TARGET VERSION NEREID STATUSkeycloak keycloak dev-identity 7.0.1 flux Pendingkeycloak keycloak dev-identity 7.0.1 flux Progressingkeycloak keycloak dev-identity 7.0.1 flux Ready
What we want to say: one writer per field: the person writes the spec, the Nereid of the Mandate writes the status (ADR 0005, one writer per field).
The phase is Pending, Progressing, Ready or Failed; Failed only once Flux stops retrying.
Source: docs/guides/reefs/release.md.
O que queremos dizer: um escritor por campo: a pessoa escreve o spec, o Nereid do Mandate escreve o status (ADR 0005, um escritor por campo).
A fase é Pending, Progressing, Ready ou Failed; Failed só quando o Flux para de tentar.
Fonte: docs/guides/reefs/release.md.
What does the Nereid write, and what can change?
O que o Nereid escreve, e o que pode mudar?
The flux Nereid writes a HelmRelease that the Release owns
O Nereid flux escreve um HelmRelease que pertence à Release
# The HelmRelease the flux Nereid wrote (abridged)$ kubectl get helmrelease keycloak \ --namespace nereus-system \ --output yamlkind: HelmReleasemetadata: ownerReferences: - kind: Release name: keycloakspec: chart: spec: {chart: keycloakx, version: "7.0.1"} targetNamespace: identity values: replicas: 1
What we want to say: two objects for the same thing, on purpose: the one people own and the one the Nereid makes, so Flux can be swapped without changing the first.
A Repository becomes a Flux HelmRepository, a Release a Flux HelmRelease, both in nereus-system and owned by the Nereus object.
Source: docs/guides/reefs/release.md, controllers/flux/flux.py.
Sources:
O que queremos dizer: dois objetos para a mesma coisa, de propósito: o que as pessoas possuem e o que o Nereid faz, para o Flux poder ser trocado sem mudar o primeiro.
Um Repository vira um HelmRepository do Flux, uma Release um HelmRelease do Flux, os dois em nereus-system e pertencentes ao objeto do Nereus.
Fonte: docs/guides/reefs/release.md, controllers/flux/flux.py.
Fontes:
Argo CD would be another Nereid and another Mandate, and the commands stay the same
- Changes: the Nereid and its Mandate
- Stays: every
nereus releasecommand
Argo CD seria outro Nereid e outro Mandate, e os comandos continuam os mesmos
- Muda: o Nereid e o seu Mandate
- Fica: todo comando
nereus release
What we want to say: swapping the tool changes no command, and CI checks it: cli/tests/test_swap.py compares the commands with one Nereid of the release reef and then another (#124, swapping a Nereid changes no command).
An Argo CD Nereid does not exist yet: this slide is the contract, not a recording.
Source: cli/tests/test_swap.py.
O que queremos dizer: trocar a ferramenta não muda nenhum comando, e o CI confere: cli/tests/test_swap.py compara os comandos com um Nereid do reef release e depois com outro (#124, trocar um Nereid não muda nenhum comando).
Um Nereid de Argo CD ainda não existe: este slide é o contrato, não uma gravação.
Fonte: cli/tests/test_swap.py.
Deleting the Release deletes the HelmRelease, and Flux uninstalls the chart
Apagar a Release apaga o HelmRelease, e o Flux desinstala o chart
# Delete the release$ nereus release delete keycloak✓ release/releases/keycloak deleted Next steps: nereus release list
What we want to say: ownership does the clean up: the HelmRelease is owned by the Release, so Kubernetes deletes it, and Flux uninstalls the chart.
delete is refused while another object names the one deleted: a Source used by a Release stays until the Release goes.
Source: docs/guides/reefs/release.md.
O que queremos dizer: o ownership faz a limpeza: o HelmRelease pertence à Release, então o Kubernetes o apaga, e o Flux desinstala o chart.
delete é recusado enquanto outro objeto nomeia o apagado: um Source usado por uma Release fica até a Release sair.
Fonte: docs/guides/reefs/release.md.
Sources
Fontes
- Flux: the GitOps family of projects · The Flux project (CNCF)
- Helm: the package manager for Kubernetes · The Helm project (CNCF)
- The keycloakx chart · codecentric helm-charts
- How to avoid death by PowerPoint · David JP Phillips · 2014
Flux: the GitOps family of projects
The Flux project (CNCF)
- About: Flux keeps a cluster in sync with sources of configuration; its helm-controller reconciles HelmRelease objects from charts that its source-controller fetches.
- For this talk: The
fluxNereid writes a HelmRepository for each Repository and a HelmRelease for each Release, and copies Flux's Ready condition back, with a reason the reef's contract declares.
Flux: the GitOps family of projects
The Flux project (CNCF)
- Sobre: O Flux mantém um cluster em sincronia com fontes de configuração; o seu helm-controller reconcilia objetos HelmRelease a partir de charts que o source-controller busca.
- Para esta palestra: O Nereid
fluxescreve um HelmRepository para cada Repository e um HelmRelease para cada Release, e copia de volta a condition Ready do Flux, com um reason que o contrato do reef declara.
Helm: the package manager for Kubernetes
The Helm project (CNCF)
- About: Helm packages Kubernetes applications as charts, versioned and configured by values.
- For this talk: A Source is a chart at a version; a Release is that chart running in a Target, with its values.
Helm: the package manager for Kubernetes
The Helm project (CNCF)
- Sobre: O Helm empacota aplicações Kubernetes como charts, versionados e configurados por values.
- Para esta palestra: Um Source é um chart numa versão; uma Release é esse chart rodando num Target, com os seus values.
The keycloakx chart
codecentric helm-charts
- About: A community Helm chart that runs the Quarkus distribution of Keycloak.
- For this talk: The chart of the examples: Nereus runs its own Keycloak as a Release of
keycloakx7.0.1.
The keycloakx chart
codecentric helm-charts
- Sobre: Um Helm chart da comunidade que roda a distribuição Quarkus do Keycloak.
- Para esta palestra: O chart dos exemplos: o Nereus roda o próprio Keycloak como uma Release de
keycloakx7.0.1.
https://github.com/codecentric/helm-charts/tree/master/charts/keycloakx
How to avoid death by PowerPoint
David JP Phillips · 2014
- About: A talk on slides that help an audience: one message per slide, few objects, size and contrast that lead the eye.
- For this talk: The style of this deck: one moment per slide, at most two items, the notes for what is said.
How to avoid death by PowerPoint
David JP Phillips · 2014
- Sobre: Uma palestra sobre slides que ajudam a plateia: uma mensagem por slide, poucos objetos, tamanho e contraste que guiam o olhar.
- Para esta palestra: O estilo deste deck: um momento por slide, no máximo dois itens, as notas para o que é falado.