From 1bbfba0531980cde0a9e6f9a08d38001046af07f Mon Sep 17 00:00:00 2001 From: Jerome Petazzoni Date: Mon, 4 May 2020 02:18:05 +0200 Subject: [PATCH] Add definition of idempotent --- slides/k8s/helm-create-better-chart.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/slides/k8s/helm-create-better-chart.md b/slides/k8s/helm-create-better-chart.md index a96d46dc..992f7fd2 100644 --- a/slides/k8s/helm-create-better-chart.md +++ b/slides/k8s/helm-create-better-chart.md @@ -121,7 +121,7 @@ This creates a basic chart in the directory `helmcoins`. helm install COMPONENT-NAME CHART-DIRECTORY ``` -- We can also use the following command, which is idempotent: +- We can also use the following command, which is *idempotent*: ```bash helm upgrade COMPONENT-NAME CHART-DIRECTORY --install ``` @@ -139,6 +139,28 @@ This creates a basic chart in the directory `helmcoins`. --- +class: extra-details + +## "Idempotent" + +- Idempotent = that can be applied multiple times without changing the result + + (the word is commonly used in maths and computer science) + +- In this context, this means: + + - if the action (installing the chart) wasn't done, do it + + - if the action was already done, don't do anything + +- Ideally, when such an action fails, it can be retried safely + + (as opposed to, e.g., installing a new release each time we run it) + +- Other example: `kubectl -f some-file.yaml` + +--- + ## Checking what we've done - Let's see if DockerCoins is working!