Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ It contains the commands to run inside the container.
| `workingDir` | It is used to specify the working directory where commands will be executed. |

### Containers
Containers section can be used to run side-car containers along with your main container within same pod. Containers running within same pod can share volumes and IP Address and can address each other @localhost.
Containers section can be used to run side-car containers along with your main container within same pod. Containers running within same pod can share volumes and IP Address and can address each other @localhost. We can use base image inside container by setting the reuseContainerImage flag to `true`.

```yaml
containers:
Expand All @@ -519,6 +519,19 @@ Containers section can be used to run side-car containers along with your main c
- containerPort: 80
command: ["/usr/local/bin/nginx"]
args: ["-g", "daemon off;"]
- reuseContainerImage: true
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
volumeMounts:
- mountPath: /etc/ls-oms
name: ls-oms-cm-vol
command:
- flyway
- -configFiles=/etc/ls-oms/flyway.conf
- migrate

```

### Prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ It contains the commands for the server.


### Containers
Containers section can be used to run side-car containers along with your main container within same pod. Containers running within same pod can share volumes and IP Address and can address each other @localhost.
Containers section can be used to run side-car containers along with your main container within same pod. Containers running within same pod can share volumes and IP Address and can address each other @localhost. We can use base image inside container by setting the reuseContainerImage flag to `true`.

```yaml
containers:
Expand All @@ -573,6 +573,18 @@ Containers section can be used to run side-car containers along with your main c
- containerPort: 80
command: ["/usr/local/bin/nginx"]
args: ["-g", "daemon off;"]
- reuseContainerImage: true
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
volumeMounts:
- mountPath: /etc/ls-oms
name: ls-oms-cm-vol
command:
- flyway
- -configFiles=/etc/ls-oms/flyway.conf
- migrate
```

### Prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,32 @@ spec:
mountPath: /etc/envoy-config/
{{- end}}
{{- if $.Values.containers }}
{{ toYaml $.Values.containers | indent 8 -}}
{{- range $i, $c := .Values.containers }}
{{- if .reuseContainerImage}}
- name: {{ $.Chart.Name }}-sidecontainer-{{ add1 $i }}
image: "{{ $.Values.server.deployment.image }}:{{ $.Values.server.deployment.image_tag }}"
imagePullPolicy: {{ $.Values.image.pullPolicy }}
{{- if .securityContext }}
securityContext:
{{ toYaml .securityContext | indent 12 }}
{{- end }}
{{- if .command}}
command:
{{ toYaml .command | indent 12 -}}
{{- end}}
{{- if .resources}}
resources:
{{ toYaml .resources | indent 12 -}}
{{- end}}
{{- if .volumeMounts}}
volumeMounts:
{{ toYaml .volumeMounts | indent 12 -}}
{{- end}}
{{- else}}
-
{{ toYaml . | indent 10 }}
{{- end}}
{{- end}}
{{- end}}
- name: {{ $.Chart.Name }}
image: "{{ .Values.server.deployment.image }}:{{ .Values.server.deployment.image_tag }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ It contains the commands for the server.


### Containers
Containers section can be used to run side-car containers along with your main container within same pod. Containers running within same pod can share volumes and IP Address and can address each other @localhost.
Containers section can be used to run side-car containers along with your main container within same pod. Containers running within same pod can share volumes and IP Address and can address each other @localhost. We can use base image inside container by setting the reuseContainerImage flag to `true`.

```yaml
containers:
Expand All @@ -501,6 +501,18 @@ Containers section can be used to run side-car containers along with your main c
- containerPort: 80
command: ["/usr/local/bin/nginx"]
args: ["-g", "daemon off;"]
- reuseContainerImage: true
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
volumeMounts:
- mountPath: /etc/ls-oms
name: ls-oms-cm-vol
command:
- flyway
- -configFiles=/etc/ls-oms/flyway.conf
- migrate
```

### Prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,32 @@ spec:
mountPath: /etc/envoy-config/
{{- end}}
{{- if $.Values.containers }}
{{ toYaml $.Values.containers | indent 8 -}}
{{- range $i, $c := .Values.containers }}
{{- if .reuseContainerImage}}
- name: {{ $.Chart.Name }}-sidecontainer-{{ add1 $i }}
image: "{{ $.Values.server.deployment.image }}:{{ $.Values.server.deployment.image_tag }}"
imagePullPolicy: {{ $.Values.image.pullPolicy }}
{{- if .securityContext }}
securityContext:
{{ toYaml .securityContext | indent 12 }}
{{- end }}
{{- if .command}}
command:
{{ toYaml .command | indent 12 -}}
{{- end}}
{{- if .resources}}
resources:
{{ toYaml .resources | indent 12 -}}
{{- end}}
{{- if .volumeMounts}}
volumeMounts:
{{ toYaml .volumeMounts | indent 12 -}}
{{- end}}
{{- else}}
-
{{ toYaml . | indent 10 }}
{{- end}}
{{- end}}
{{- end}}
- name: {{ $.Chart.Name }}
image: "{{ .Values.server.deployment.image }}:{{ .Values.server.deployment.image_tag }}"
Expand Down