Skip to content

Create basic and advanced recipes section on helm course #106

@frmadem

Description

@frmadem

A basic and advance section of Helm recipes could be really useful for our developers.

Every recipe should have a common structure such as:

# Title
## Description (What you want to do or accomplish)
## Helm code
## Caveats

An example:

# Named templates

## Description

We want to have a callable unit of template that we can use wherever we want. 

A [named template](https://helm.sh/docs/chart_template_guide/named_templates/) is a way to define code that we can call on and pass parameters to. 

## Helm code

{{ define "foo" }}
test:
  a: 1
  b: 2
{{ end }}

Then we can call it in our code

artifact: {{ include "foo" . | nindent 2}}

Having the output

artifact:
  test:
    a: 1
    b: 2

## Caveats

1. Beware of newlines!
2. We need always to pass at least one argument ( normally the context "." )
3. In order to pass complex args we should prefer a render cachet. 

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions