forked from bitnami/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bitnami/magento] feat!: 🔒 💥 Improve security defaults (bitnami#24822)
* [bitnami/magento] Update MariaDB to branch 11.3 Signed-off-by: David Gomez <[email protected]> * [bitnami/magento] feat!: 🔒 💥 Improve security defaults Signed-off-by: Javier Salmeron Garcia <[email protected]> * docs: 📝 Improve MariaDB update notes Signed-off-by: Javier Salmeron Garcia <[email protected]> * fix: 🐛 Use .containerPort in networkPolicy Signed-off-by: Javier Salmeron Garcia <[email protected]> * fix: 🔧 Add missing resource preset Signed-off-by: Javier Salmeron Garcia <[email protected]> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <[email protected]> * chore: ⬆️ Bump elasticsearch subchart Signed-off-by: Javier Salmeron Garcia <[email protected]> * fix: 🔒 Do not share same readiness/liveness probe Signed-off-by: Javier Salmeron Garcia <[email protected]> * chore: 🔧 Bump instance size Signed-off-by: Javier Salmeron Garcia <[email protected]> * test: ✅ Increase timeout Signed-off-by: Javier Salmeron Garcia <[email protected]> --------- Signed-off-by: David Gomez <[email protected]> Signed-off-by: Javier Salmeron Garcia <[email protected]> Signed-off-by: Javier J. Salmerón-García <[email protected]> Signed-off-by: Bitnami Containers <[email protected]> Co-authored-by: Javier Salmeron Garcia <[email protected]> Co-authored-by: Bitnami Containers <[email protected]> Signed-off-by: Jonathan Gazeley <[email protected]>
- Loading branch information
Showing
12 changed files
with
341 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
verification-mode=SERIAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
dependencies: | ||
- name: mariadb | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
version: 15.2.3 | ||
version: 18.0.1 | ||
- name: elasticsearch | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
version: 19.19.3 | ||
version: 20.0.2 | ||
- name: common | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
version: 2.18.0 | ||
digest: sha256:a03226f45b598fca0e40f8804aa3fe287ff7ec4fc7100195b467535bbe180163 | ||
generated: "2024-03-05T14:34:42.174163373+01:00" | ||
version: 2.19.1 | ||
digest: sha256:df139ceb0fa0567a601c5294902f7b1629cdbc3641ea23bee88479b2dacaa049 | ||
generated: "2024-04-04T13:14:38.519751044+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 0 additions & 80 deletions
80
bitnami/magento/templates/networkpolicy-backend-ingress.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{{- /* | ||
Copyright VMware, Inc. | ||
SPDX-License-Identifier: APACHE-2.0 | ||
*/}} | ||
|
||
{{- if .Values.networkPolicy.enabled }} | ||
kind: NetworkPolicy | ||
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} | ||
metadata: | ||
name: {{ template "common.names.fullname" . }} | ||
namespace: {{ include "common.names.namespace" . | quote }} | ||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} | ||
{{- if .Values.commonAnnotations }} | ||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }} | ||
podSelector: | ||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} | ||
policyTypes: | ||
- Ingress | ||
- Egress | ||
{{- if .Values.networkPolicy.allowExternalEgress }} | ||
egress: | ||
- {} | ||
{{- else }} | ||
egress: | ||
# Allow dns resolution | ||
- ports: | ||
- port: 53 | ||
protocol: UDP | ||
- port: 53 | ||
protocol: TCP | ||
# Allow outbound connections to MariaDB | ||
- ports: | ||
- port: {{ include "magento.databasePort" . }} | ||
{{- if .Values.mariadb.enabled }} | ||
to: | ||
- podSelector: | ||
matchLabels: | ||
app.kubernetes.io/name: mariadb | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
# Allow outbound connections to Elasticsearch | ||
- ports: | ||
- port: {{ include "magento.elasticsearch.port" . | int }} | ||
{{- if .Values.elasticsearch.enabled }} | ||
to: | ||
- podSelector: | ||
matchLabels: | ||
app.kubernetes.io/name: elasticsearch | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
{{- if .Values.networkPolicy.extraEgress }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraEgress "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
ingress: | ||
- ports: | ||
- port: {{ .Values.containerPorts.http }} | ||
- port: {{ .Values.containerPorts.https }} | ||
{{- range .Values.extraContainerPorts }} | ||
- port: {{ .containerPort }} | ||
{{- end }} | ||
{{- if not .Values.networkPolicy.allowExternal }} | ||
from: | ||
- podSelector: | ||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} | ||
- podSelector: | ||
matchLabels: | ||
{{ template "common.names.fullname" . }}-client: "true" | ||
{{- if .Values.networkPolicy.ingressNSMatchLabels }} | ||
- namespaceSelector: | ||
matchLabels: | ||
{{- range $key, $value := .Values.networkPolicy.ingressNSMatchLabels }} | ||
{{ $key | quote }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- if .Values.networkPolicy.ingressNSPodMatchLabels }} | ||
podSelector: | ||
matchLabels: | ||
{{- range $key, $value := .Values.networkPolicy.ingressNSPodMatchLabels }} | ||
{{ $key | quote }}: {{ $value | quote }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.networkPolicy.extraIngress }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraIngress "context" $ ) | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.