-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Nginx deployment to Timesketch for when Ingress (loadbalancer) is…
… deployed (#143) * Add nginx deployment for Timesketch * Add IPV6 ingress config * Update README.md with readme-generator-for-helm Signed-off-by: wajihyassine <[email protected]> * Remove trailing space --------- Signed-off-by: wajihyassine <[email protected]> Co-authored-by: wajihyassine <[email protected]>
- Loading branch information
1 parent
21d7d39
commit aac87b9
Showing
11 changed files
with
210 additions
and
27 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
dependencies: | ||
- name: postgresql | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 12.11.1 | ||
version: 15.3.2 | ||
- name: redis | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 18.0.4 | ||
version: 19.3.2 | ||
- name: opensearch | ||
repository: https://opensearch-project.github.io/helm-charts/ | ||
version: 2.14.1 | ||
digest: sha256:61618477213c24891b3302842aaa337405c68fdf998586eadef3a2ed9e9e4c1c | ||
generated: "2023-09-19T23:25:01.27067547Z" | ||
version: 2.20.0 | ||
digest: sha256:3fbaef8755ed79056d10a0c93cf5d278a47bb5f55b9a98802922edef4faa0610 | ||
generated: "2024-05-16T13:22:27.139681-07: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
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
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
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,29 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "timesketch.fullname" . }}-nginx-configmap | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
{{- include "timesketch.labels" . | nindent 4 }} | ||
data: | ||
default.conf: | | ||
server { | ||
listen 80; | ||
listen [::]:80; | ||
client_max_body_size 0m; | ||
location / { | ||
proxy_buffer_size 128k; | ||
proxy_buffers 4 256k; | ||
proxy_busy_buffers_size 256k; | ||
proxy_pass http://{{ include "timesketch.fullname" . }}:5000/; | ||
proxy_read_timeout 120s; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
location /healthz { | ||
return 200; | ||
} | ||
} | ||
{{- end }} |
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,56 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "timesketch.fullname" . }}-nginx | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
app.kubernetes.io/component: nginx | ||
{{- include "timesketch.labels" . | nindent 4 }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: nginx | ||
{{- include "timesketch.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: nginx | ||
{{- include "timesketch.selectorLabels" . | nindent 8 }} | ||
spec: | ||
serviceAccountName: {{ include "timesketch.serviceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.nginx.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: nginx | ||
securityContext: | ||
{{- toYaml .Values.nginx.securityContext | nindent 12 }} | ||
image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
volumeMounts: | ||
- mountPath: /etc/nginx/conf.d/default.conf | ||
subPath: default.conf | ||
name: nginx-config | ||
readOnly: true | ||
ports: | ||
- containerPort: 80 | ||
resources: | ||
{{- toYaml .Values.nginx.resources | nindent 12 }} | ||
volumes: | ||
- name: nginx-config | ||
configMap: | ||
name: {{ include "timesketch.fullname" . }}-nginx-configmap | ||
{{- with .Values.nginx.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.nginx.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.nginx.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
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,23 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "timesketch.fullname" . }}-nginx | ||
namespace: {{ .Release.Namespace | quote }} | ||
labels: | ||
{{- include "timesketch.labels" . | nindent 4 }} | ||
{{- if and (.Values.ingress.enabled) ( eq .Values.ingress.className "gce") }} | ||
annotations: | ||
cloud.google.com/neg: '{"ingress": true}' | ||
cloud.google.com/backend-config: '{"ports": {"80":"{{ include "timesketch.fullname" . }}-backend-config"}}' | ||
{{- end }} | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
targetPort: 80 | ||
selector: | ||
app.kubernetes.io/component: nginx | ||
{{- include "timesketch.selectorLabels" . | nindent 4 }} | ||
{{- end }} |
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