Merge pull request #858 from tompizmor/memcached_security_context

[bitnami/memcached] - Memcached security context
This commit is contained in:
Tomas Pizarro
2018-10-11 12:50:39 +02:00
committed by GitHub
4 changed files with 29 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
name: memcached
version: 1.0.2
version: 1.1.0
appVersion: 1.5.11
description: Chart for Memcached
keywords:

View File

@@ -45,17 +45,20 @@ The command removes all the Kubernetes components associated with the chart and
The following tables lists the configurable parameters of the Memcached chart and their default values.
| Parameter | Description | Default |
|---------------------|-------------------------------------|---------------------------------------------------------- |
| `image.registry` | Memcached image registry | `docker.io` |
| `image.repository` | Memcached Image name | `bitnami/memcached` |
| `image.tag` | Memcached Image tag | `{VERSION}` |
| `image.pullPolicy` | Memcached image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
| `image.pullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
| `memcachedUsername` | Memcached admin user | `nil` |
| `memcachedPassword` | Memcached admin password | `nil` |
| `serviceType` | Kubernetes Service type | `ClusterIP` |
| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `250m` |
| Parameter | Description | Default |
|-----------------------------|-------------------------------------|---------------------------------------------------------- |
| `image.registry` | Memcached image registry | `docker.io` |
| `image.repository` | Memcached Image name | `bitnami/memcached` |
| `image.tag` | Memcached Image tag | `{VERSION}` |
| `image.pullPolicy` | Memcached image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
| `image.pullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
| `securityContext.enabled` | Enable security context | `true` |
| `securityContext.fsGroup` | Group ID for the container | `1001` |
| `securityContext.runAsUser` | User ID for the container | `1001` |
| `memcachedUsername` | Memcached admin user | `nil` |
| `memcachedPassword` | Memcached admin password | `nil` |
| `serviceType` | Kubernetes Service type | `ClusterIP` |
| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `250m` |
The above parameters map to the env variables defined in [bitnami/memcached](http://github.com/bitnami/bitnami-docker-memcached). For more information please refer to the [bitnami/memcached](http://github.com/bitnami/bitnami-docker-memcached) image documentation.

View File

@@ -19,6 +19,11 @@ spec:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
spec:
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}

View File

@@ -15,7 +15,15 @@ image:
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
##
# pullSecrets:
# - myRegistrKeySecretName
# - myRegistrKeySecretName
## Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext:
enabled: true
fsGroup: 1001
runAsUser: 1001
## Specify a imagePullPolicy
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images