From 1d5124e46432c59c1c2ab7cf4507ac72a3251a63 Mon Sep 17 00:00:00 2001 From: Michael Goodness Date: Fri, 28 Oct 2016 15:24:10 -0500 Subject: [PATCH 1/4] Static container name --- stable/spartakus/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/spartakus/templates/deployment.yaml b/stable/spartakus/templates/deployment.yaml index 603ac66510..f64797569e 100644 --- a/stable/spartakus/templates/deployment.yaml +++ b/stable/spartakus/templates/deployment.yaml @@ -16,7 +16,7 @@ spec: release: "{{ .Release.Name }}" spec: containers: - - name: {{ template "fullname" . }} + - name: spartakus image: "{{ .Values.image }}" imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} args: From 20ad9f6fc935e77edad72cf23e7055881c2819da Mon Sep 17 00:00:00 2001 From: Michael Goodness Date: Sun, 30 Oct 2016 20:05:54 -0500 Subject: [PATCH 2/4] Configurable container name --- stable/spartakus/README.md | 7 ++++--- stable/spartakus/templates/deployment.yaml | 4 ++-- stable/spartakus/values.yaml | 19 +++++++++++++------ 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/stable/spartakus/README.md b/stable/spartakus/README.md index b5934408ed..3a1c164ebe 100644 --- a/stable/spartakus/README.md +++ b/stable/spartakus/README.md @@ -44,11 +44,12 @@ The following tables lists the configurable parameters of the Spartakus chart an | Parameter | Description | Default | | ------------------------------- | ------------------------------- | ---------------------------------------------------------- | -| `image` | Spartakus image | `gcr.io/google_containers/spartakus-amd64:{VERSION}` | +| `containerImage` | Container image | `gcr.io/google_containers/spartakus-amd64:{VERSION}` | +| `containerName` | Container name | Dynamically generated based on the chart & release names | | `imagePullPolicy` | Image pull policy | `Always` if `image` tag is `latest`, else `IfNotPresent` | -| `resources.requests.cpu` | CPU resource request | `1m` | +| `resources.requests.cpu` | CPU resource request | `2m` | | `resources.requests.memory` | Memory resource request | `8Mi` | -| `uuid` | Unique cluster ID | Dynamically-generated using `uuidv4` template function | +| `uuid` | Unique cluster ID | Dynamically generated using `uuidv4` template function | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/stable/spartakus/templates/deployment.yaml b/stable/spartakus/templates/deployment.yaml index f64797569e..668da8ec4a 100644 --- a/stable/spartakus/templates/deployment.yaml +++ b/stable/spartakus/templates/deployment.yaml @@ -16,8 +16,8 @@ spec: release: "{{ .Release.Name }}" spec: containers: - - name: spartakus - image: "{{ .Values.image }}" + - name: {{ if .Values.containerName }}"{{ .Values.containerName }}"{{ else }}{{ template "fullname" . }}{{ end }} + image: "{{ .Values.containerImage }}" imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} args: - volunteer diff --git a/stable/spartakus/values.yaml b/stable/spartakus/values.yaml index 3273a339ff..6911c44c79 100644 --- a/stable/spartakus/values.yaml +++ b/stable/spartakus/values.yaml @@ -1,13 +1,20 @@ -image: gcr.io/google_containers/spartakus-amd64:v1.0.0 +## Container image +## +containerImage: gcr.io/google_containers/spartakus-amd64:v1.0.0 -## Specify a imagePullPolicy -## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' -## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images +## Container name +## If not provided, Helm will template a name based on the chart & release names +## +## containerName: spartakus + +## Global imagePullPolicy +## Default: 'Always' if image tag is 'latest', else 'IfNotPresent' +## Ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images ## # imagePullPolicy: -## Configure resource requests and limits -## ref: http://kubernetes.io/docs/user-guide/compute-resources/ +## Resource requests and limits +## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ ## resources: # limits: From 5644a344efa558e4cb8ef97f559e6410c096e94d Mon Sep 17 00:00:00 2001 From: Michael Goodness Date: Wed, 2 Nov 2016 06:26:43 -0500 Subject: [PATCH 3/4] Static, overridable container name --- stable/spartakus/README.md | 2 +- stable/spartakus/templates/deployment.yaml | 2 +- stable/spartakus/values.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stable/spartakus/README.md b/stable/spartakus/README.md index 3a1c164ebe..4517bd3113 100644 --- a/stable/spartakus/README.md +++ b/stable/spartakus/README.md @@ -45,7 +45,7 @@ The following tables lists the configurable parameters of the Spartakus chart an | Parameter | Description | Default | | ------------------------------- | ------------------------------- | ---------------------------------------------------------- | | `containerImage` | Container image | `gcr.io/google_containers/spartakus-amd64:{VERSION}` | -| `containerName` | Container name | Dynamically generated based on the chart & release names | +| `containerName` | Container name | `spartakus` | | `imagePullPolicy` | Image pull policy | `Always` if `image` tag is `latest`, else `IfNotPresent` | | `resources.requests.cpu` | CPU resource request | `2m` | | `resources.requests.memory` | Memory resource request | `8Mi` | diff --git a/stable/spartakus/templates/deployment.yaml b/stable/spartakus/templates/deployment.yaml index 668da8ec4a..e82d5755c0 100644 --- a/stable/spartakus/templates/deployment.yaml +++ b/stable/spartakus/templates/deployment.yaml @@ -16,7 +16,7 @@ spec: release: "{{ .Release.Name }}" spec: containers: - - name: {{ if .Values.containerName }}"{{ .Values.containerName }}"{{ else }}{{ template "fullname" . }}{{ end }} + - name: {{ default "spartakus" .Values.containerName | quote }} image: "{{ .Values.containerImage }}" imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} args: diff --git a/stable/spartakus/values.yaml b/stable/spartakus/values.yaml index 6911c44c79..cb73618c5d 100644 --- a/stable/spartakus/values.yaml +++ b/stable/spartakus/values.yaml @@ -3,11 +3,11 @@ containerImage: gcr.io/google_containers/spartakus-amd64:v1.0.0 ## Container name -## If not provided, Helm will template a name based on the chart & release names +## Default: 'spartakus' ## -## containerName: spartakus +## containerName: -## Global imagePullPolicy +## imagePullPolicy ## Default: 'Always' if image tag is 'latest', else 'IfNotPresent' ## Ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images ## From 862f5c8e58072fdb09f7e8de37278a27b0df7a4f Mon Sep 17 00:00:00 2001 From: Michael Goodness Date: Wed, 2 Nov 2016 13:22:36 -0500 Subject: [PATCH 4/4] Use `name` template for container --- stable/spartakus/README.md | 3 +-- stable/spartakus/templates/deployment.yaml | 4 ++-- stable/spartakus/values.yaml | 7 +------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/stable/spartakus/README.md b/stable/spartakus/README.md index 4517bd3113..7f13788703 100644 --- a/stable/spartakus/README.md +++ b/stable/spartakus/README.md @@ -44,8 +44,7 @@ The following tables lists the configurable parameters of the Spartakus chart an | Parameter | Description | Default | | ------------------------------- | ------------------------------- | ---------------------------------------------------------- | -| `containerImage` | Container image | `gcr.io/google_containers/spartakus-amd64:{VERSION}` | -| `containerName` | Container name | `spartakus` | +| `image` | Container image | `gcr.io/google_containers/spartakus-amd64:{VERSION}` | | `imagePullPolicy` | Image pull policy | `Always` if `image` tag is `latest`, else `IfNotPresent` | | `resources.requests.cpu` | CPU resource request | `2m` | | `resources.requests.memory` | Memory resource request | `8Mi` | diff --git a/stable/spartakus/templates/deployment.yaml b/stable/spartakus/templates/deployment.yaml index e82d5755c0..d382990512 100644 --- a/stable/spartakus/templates/deployment.yaml +++ b/stable/spartakus/templates/deployment.yaml @@ -16,8 +16,8 @@ spec: release: "{{ .Release.Name }}" spec: containers: - - name: {{ default "spartakus" .Values.containerName | quote }} - image: "{{ .Values.containerImage }}" + - name: {{ template "name" . }} + image: "{{ .Values.image }}" imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} args: - volunteer diff --git a/stable/spartakus/values.yaml b/stable/spartakus/values.yaml index cb73618c5d..beb2213830 100644 --- a/stable/spartakus/values.yaml +++ b/stable/spartakus/values.yaml @@ -1,11 +1,6 @@ ## Container image ## -containerImage: gcr.io/google_containers/spartakus-amd64:v1.0.0 - -## Container name -## Default: 'spartakus' -## -## containerName: +image: gcr.io/google_containers/spartakus-amd64:v1.0.0 ## imagePullPolicy ## Default: 'Always' if image tag is 'latest', else 'IfNotPresent'