Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove traefik proxy in Kubernetes #8480

Closed
wants to merge 4 commits into from
Closed
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
25 changes: 17 additions & 8 deletions packages/grid/helm/syft/templates/grid-stack-ingress-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,28 @@ spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
defaultBackend:
service:
name: proxy
port:
number: 80
rules:
- http:
paths:
- backend:
- path: /
pathType: Prefix
backend:
service:
name: proxy
name: frontend
port:
number: 80
- path: /api
pathType: Prefix
backend:
service:
name: backend
port:
number: 80
path: /
- path: /blob
pathType: Prefix
backend:
service:
name: proxy
port:
number: 80
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,31 @@ spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
defaultBackend:
service:
name: proxy
port:
number: 80
rules:
- host: {{ .Values.node.settings.hostname }}
http:
paths:
- backend:
- path: /
pathType: Prefix
backend:
service:
name: proxy
name: frontend
port:
number: 80
path: /
- path: /api
pathType: Prefix
backend:
service:
name: backend
port:
number: 80
- path: /blob
pathType: Prefix
backend:
service:
name: seaweedfs
port:
number: 8333
tls:
- hosts:
- {{ .Values.node.settings.hostname }}
Expand Down
46 changes: 46 additions & 0 deletions packages/grid/helm/syft/templates/proxy-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: proxy-config
data:
dynamic.yml: |
http:
services:
seaweedfs:
loadBalancer:
servers:
- url: http://seaweedfs:8333
routers:
blob-storage:
rule: PathPrefix(`/blob`)
service: seaweedfs
entryPoints:
- web
middlewares:
- blob-storage-url-rewrite
- blob-storage-host
middlewares:
blob-storage-host:
headers:
customrequestheaders:
Host: seaweedfs:8333
blob-storage-url-rewrite:
stripprefix:
prefixes: /blob
forceslash: true
traefik.yml: |
global:
checkNewVersion: false
sendAnonymousUsage: false
log:
level: INFO
entryPoints:
web:
address: :80
ping:
address: :8082
ping:
entryPoint: ping
providers:
file:
filename: /etc/traefik/dynamic.yml
35 changes: 5 additions & 30 deletions packages/grid/helm/syft/templates/proxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,15 @@ spec:
app.kubernetes.io/component: proxy
app.kubernetes.io/managed-by: Helm
spec:
affinity: null
containers:
- args: null
command: null
env:
- name: SERVICE_NAME
value: proxy
envFrom: null
image: traefik:v2.10
lifecycle: null
livenessProbe: null
name: container-0
readinessProbe: null
securityContext: null
startupProbe: null
volumeDevices: null
- image: traefik:v2.11
name: proxy-container
volumeMounts:
- mountPath: /etc/traefik
name: traefik-conf
name: proxy-config
readOnly: false
dnsConfig: null
ephemeralContainers: null
hostAliases: null
imagePullSecrets: null
initContainers: null
nodeName: null
nodeSelector: null
overhead: null
readinessGates: null
securityContext: null
terminationGracePeriodSeconds: 5
tolerations: null
topologySpreadConstraints: null
volumes:
- configMap:
name: traefik-main-config
name: traefik-conf
name: proxy-config
name: proxy-config
3 changes: 1 addition & 2 deletions packages/grid/helm/syft/templates/proxy-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
app.kubernetes.io/managed-by: Helm
name: proxy
spec:
externalIPs: null
type: ClusterIP
ports:
- name: proxy
port: 80
Expand All @@ -16,4 +16,3 @@ spec:
selector:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/component: proxy
type: ClusterIP

This file was deleted.

6 changes: 6 additions & 0 deletions packages/grid/seaweedfs/start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/env bash

S3_PORT=${S3_PORT:-8333}
S3_VOLUME_SIZE_MB=${S3_VOLUME_SIZE_MB:-1024}
S3_ROOT_USER=${S3_ROOT_USER:-admin}
S3_ROOT_PWD=${S3_ROOT_PWD:-password}
SEAWEED_MOUNT_PORT=${SEAWEED_MOUNT_PORT:-4001}

weed server -s3 -s3.port="$S3_PORT" -volume.max=500 -master.volumeSizeLimitMB="$S3_VOLUME_SIZE_MB" &
echo "s3.configure -access_key $S3_ROOT_USER -secret_key $S3_ROOT_PWD \
-user iam -actions Read,Write,List,Tagging,Admin -apply" | weed shell > /dev/null 2>&1
Expand Down
Loading