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

The reef

Which questions does a release answer?

O reef

Que perguntas uma release responde?

The reef · Four kinds · 1/2

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 · Quatro kinds · 1/2

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
The reef · Four kinds · 2/2

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
O reef · Quatro kinds · 2/2

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
Step by step

What does a person type to run a chart?

Passo a passo

O que uma pessoa digita para rodar um chart?

Step by step · 1 · The reef

One command applies the release reef, and the CLI gains its commands

Passo a passo · 1 · O reef

Um comando aplica o reef release, e a CLI ganha os seus comandos

~/example
# 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
Step by step · 2 · The Nereid

The flux Nereid installs Flux first, pinned by version and digest

Passo a passo · 2 · O Nereid

O Nereid flux instala o Flux primeiro, fixado por versão e digest

~/example
# 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
Step by step · 3 · The Mandate

A Mandate makes flux the default Nereid of the release reef

Passo a passo · 3 · O Mandate

Um Mandate faz do flux o Nereid padrão do reef release

~/example
# 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>
Step by step · 4 · Repository

A Repository says where the chart comes from

Passo a passo · 4 · Repository

Um Repository diz de onde o chart vem

~/example
# 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>
Step by step · 5 · Source

A Source says what: one chart at one version

Passo a passo · 5 · Source

Um Source diz o quê: um chart numa versão

~/example
# 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>
Step by step · 6 · Target

A Target says where to: a namespace of an environment

Passo a passo · 6 · Target

Um Target diz para onde: um namespace de um environment

~/example
# 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
Step by step · 7 · Values

The chart's values stay in a file of the person's own

Passo a passo · 7 · Values

Os values do chart ficam num arquivo da própria pessoa

~/example
# The values of the keycloakx chart$ cat keycloak-values.yamlreplicas: 1fullnameOverride: keycloakcommand: ["/opt/keycloak/bin/kc.sh", "start-dev"]cache:  stack: custom
Step by step · 8 · Release

The Release runs the Source in the Target, through the flux Mandate

Passo a passo · 8 · Release

A Release roda o Source no Target, pelo Mandate flux

~/example
# 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
Step by step · 9 · Watch

The status flows back from Flux until the Release is Ready

Passo a passo · 9 · Acompanhar

O status volta do Flux até a Release ficar Ready

~/example
# 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
Under the hood

What does the Nereid write, and what can change?

Por baixo

O que o Nereid escreve, e o que pode mudar?

Under the hood · Flux's objects

The flux Nereid writes a HelmRelease that the Release owns

Por baixo · Os objetos do Flux

O Nereid flux escreve um HelmRelease que pertence à Release

~/example
# 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
Under the hood · Another tool

Argo CD would be another Nereid and another Mandate, and the commands stay the same

  • Changes: the Nereid and its Mandate
  • Stays: every nereus release command
Por baixo · Outra ferramenta

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
Under the hood · Clean up

Deleting the Release deletes the HelmRelease, and Flux uninstalls the chart

Por baixo · Limpeza

Apagar a Release apaga o HelmRelease, e o Flux desinstala o chart

~/example
# Delete the release$ nereus release delete keycloak✓ release/releases/keycloak deleted Next steps:   nereus release list
References

Sources

Referências

Fontes

References · 1/4

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 flux Nereid 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.
Referências · 1/4

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 flux escreve 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.

https://fluxcd.io/flux/components/helm/

References · 2/4

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.
Referências · 2/4

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.

https://helm.sh/docs/

References · 3/4

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 keycloakx 7.0.1.
Referências · 3/4

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 keycloakx 7.0.1.

https://github.com/codecentric/helm-charts/tree/master/charts/keycloakx

References · 4/4

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.
Referências · 4/4

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.

https://www.youtube.com/watch?v=Iwpi1Lm6dFo