-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block access to assets.*/minio/ path (#4297)
* add rules to allow signed url * Revert "add rules to allow signed url" This reverts commit ef47149. * add seperate template for minio ingress * remove minio rules from from existing template * add changelog
- Loading branch information
1 parent
7345889
commit c11434b
Showing
3 changed files
with
46 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Block access to assets.*/minio/ path for public access. |
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
45 changes: 45 additions & 0 deletions
45
charts/nginx-ingress-services/templates/ingress_minio.yaml
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,45 @@ | ||
{{- $apiIsStable := eq (include "ingress.isStable" .) "true" -}} | ||
{{- $ingressFieldNotAnnotation := eq (include "ingress.FieldNotAnnotation" .) "true" -}} | ||
{{- $ingressSupportsPathType := eq (include "ingress.supportsPathType" .) "true" -}} | ||
{{- if .Values.fakeS3.enabled }} | ||
# We use a separate ingress for minio because we want to restrict access to /minio/ path | ||
# for security reasons | ||
apiVersion: {{ include "ingress.apiVersion" . }} | ||
kind: Ingress | ||
metadata: | ||
name: minio-ingress | ||
annotations: | ||
{{- if not $ingressFieldNotAnnotation }} | ||
kubernetes.io/ingress.class: "{{ .Values.config.ingressClass }}" | ||
{{- end }} | ||
nginx.ingress.kubernetes.io/server-snippet: | | ||
location /minio/ { | ||
return 403; | ||
} | ||
spec: | ||
{{- if $ingressFieldNotAnnotation }} | ||
ingressClassName: "{{ .Values.config.ingressClass }}" | ||
{{- end }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.config.dns.fakeS3 }} | ||
secretName: {{ include "nginx-ingress-services.getCertificateSecretName" . | quote }} | ||
rules: | ||
- host: {{ .Values.config.dns.fakeS3 }} | ||
http: | ||
paths: | ||
- path: / | ||
{{- if $ingressSupportsPathType }} | ||
pathType: Prefix | ||
{{- end }} | ||
backend: | ||
{{- if $apiIsStable }} | ||
service: | ||
name: {{ .Values.service.s3.serviceName }} | ||
port: | ||
number: {{ .Values.service.s3.externalPort }} | ||
{{- else }} | ||
serviceName: {{ .Values.service.s3.serviceName }} | ||
servicePort: {{ .Values.service.s3.externalPort }} | ||
{{- end }} | ||
{{- end }} |