Skip to content

Commit

Permalink
olares: remove some debug code (#935)
Browse files Browse the repository at this point in the history
fix: remove some debug codes

Co-authored-by: liuyu <>
  • Loading branch information
eball authored Jan 24, 2025
1 parent 60bedc6 commit b081743
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 277 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,59 +29,6 @@ spec:
app: recommend
type: ClusterIP

---
{{ if (eq .Values.debugVersion true) }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: recommend
namespace: {{ .Release.Namespace }}
labels:
app: recommend
applications.app.bytetrade.io/author: bytetrade.io

applications.app.bytetrade.io/name: recommend
applications.app.bytetrade.io/owner: '{{ .Values.bfl.username }}'
annotations:
applications.app.bytetrade.io/icon: https://file.bttcdn.com/appstore/recommend/icon.png
applications.app.bytetrade.io/title: recommend
applications.app.bytetrade.io/version: '0.0.1'
applications.app.bytetrade.io/entrances: '[{"name":"recommend", "host":"argoworkflows-ui", "port":80,"title":"recommend"}]'

spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: recommend
template:
metadata:
labels:
app: recommend
io.bytetrade.app: "true"
spec:
containers:
- name: recommend-proxy
image: nginx:stable-alpine3.17-slim
imagePullPolicy: IfNotPresent
ports:
- name: proxy
containerPort: 8080
volumeMounts:
- name: nginx-config
readOnly: true
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: nginx-config
configMap:
name: recommend-nginx-configs
items:
- key: nginx.conf
path: nginx.conf
{{ end }}



---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,173 +38,6 @@ spec:
databases:
- name: notifications

{{ if (eq .Values.debugVersion true) }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: notifications-deployment
namespace: {{ .Release.Namespace }}
labels:
app: notifications
applications.app.bytetrade.io/author: bytetrade.io

applications.app.bytetrade.io/name: notifications
applications.app.bytetrade.io/owner: '{{ .Values.bfl.username }}'
annotations:
applications.app.bytetrade.io/icon: https://file.bttcdn.com/appstore/notifications/icon.png
applications.app.bytetrade.io/title: Notifications
applications.app.bytetrade.io/version: '0.0.1'
applications.app.bytetrade.io/entrances: '[{"name":"notifications", "host":"notifications-service", "port":80,"title":"Notifications"}]'
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: notifications
template:
metadata:
labels:
app: notifications
io.bytetrade.app: "true"
spec:
initContainers:
- args:
- -it
- authelia-backend.os-system:9091
image: owncloudci/wait-for:latest
imagePullPolicy: IfNotPresent
name: check-auth
- name: terminus-sidecar-init
image: openservicemesh/init:v1.2.3
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
capabilities:
add:
- NET_ADMIN
runAsNonRoot: false
runAsUser: 0
command:
- /bin/sh
- -c
- |
iptables-restore --noflush <<EOF
# sidecar interception rules
*nat
:PROXY_IN_REDIRECT - [0:0]
:PROXY_INBOUND - [0:0]
-A PROXY_IN_REDIRECT -p tcp -j REDIRECT --to-port 15003
-A PROXY_INBOUND -p tcp --dport 15000 -j RETURN
-A PROXY_INBOUND -p tcp -j PROXY_IN_REDIRECT
-A PREROUTING -p tcp -j PROXY_INBOUND
COMMIT
EOF
env:
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
containers:
- name: notifications-frontend
image: beclab/notifications-frontend:v0.1.22
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
- name: terminus-envoy-sidecar
image: bytetrade/envoy:v1.25.11
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
runAsUser: 1000
ports:
- name: proxy-admin
containerPort: 15000
- name: proxy-inbound
containerPort: 15003
volumeMounts:
- name: terminus-sidecar-config
readOnly: true
mountPath: /etc/envoy/envoy.yaml
subPath: envoy.yaml
command:
- /usr/local/bin/envoy
- --log-level
- debug
- -c
- /etc/envoy/envoy.yaml
env:
- name: POD_UID
valueFrom:
fieldRef:
fieldPath: metadata.uid
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
volumes:
- name: terminus-sidecar-config
configMap:
name: sidecar-configs
items:
- key: envoy.yaml
path: envoy.yaml
# - name: REDIS_HOST
# value: localhost
# - name: REDIS_PORT
# value: "6379"
# - name: notifications-worker
# image: aboveos/notifications-worker:v0.1.2
# imagePullPolicy: IfNotPresent
# env:
# - name: MONGO_URL
# value: mongodb://admin:123456@localhost:27017
# - name: REDIS_HOST
# value: localhost
# - name: REDIS_CACHE_SERVICE_HOST
# value: localhost
# - name: REDIS_PORT
# value: "6379"
# - name: mongodb
# image: mongo:4.4.5
# env:
# - name: MONGO_INITDB_ROOT_USERNAME
# value: admin
# - name: MONGO_INITDB_ROOT_PASSWORD
# value: '123456'
# imagePullPolicy: IfNotPresent
# ports:
# - containerPort: 27017
# volumeMounts:
# - name: mongo-data
# mountPath: /data/db
# - name: redis
# image: redis:7.0.5-alpine3.16
# imagePullPolicy: IfNotPresent
# volumeMounts:
# - name: redis-data
# mountPath: /data
# volumes:
# - name: mongo-data
# hostPath:
# type: DirectoryOrCreate
# path: {{ .Values.userspace.appCache}}/notification/db
# - name: redis-data
# hostPath:
# type: DirectoryOrCreate
# path: {{ .Values.userspace.appCache}}/notification/redisdata
{{ end }}

---
apiVersion: apps/v1
Expand Down Expand Up @@ -289,17 +122,6 @@ kind: Service
metadata:
name: notifications-service
namespace: {{ .Release.Namespace }}
{{ if (eq .Values.debugVersion true) }}
spec:
type: ClusterIP
selector:
app: notifications
ports:
- name: "notifications-frontend"
protocol: TCP
port: 80
targetPort: 80
{{ else }}
spec:
type: ClusterIP
selector:
Expand All @@ -309,7 +131,6 @@ spec:
protocol: TCP
port: 80
targetPort: 3010
{{ end }}

---
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,6 @@ metadata:
app: infisical
applications.app.bytetrade.io/author: bytetrade.io

{{ if (eq .Values.debugVersion true) }}
applications.app.bytetrade.io/name: infisical
applications.app.bytetrade.io/owner: '{{ .Values.bfl.username }}'
annotations:
applications.app.bytetrade.io/icon: https://bookface-images.s3.amazonaws.com/small_logos/621cb43ec50d1aae545391abcc114014c84d295f.png
applications.app.bytetrade.io/title: Infisical
applications.app.bytetrade.io/version: '0.0.1'
applications.app.bytetrade.io/entrances: '[{"name":"infisical", "host":"infisical-service", "port":80,"title":"Infisical"}]'
{{ end }}

spec:
replicas: 1
strategy:
Expand Down Expand Up @@ -277,23 +267,6 @@ spec:
- name: REDIS_URL
value: "redis://:$(REDIS_PASSWORD)@redis-cluster-proxy.user-system-{{ .Values.bfl.username }}:6379/0"

{{ if (eq .Values.debugVersion true) }}
- name: infisical-frontend
image: beclab/infisical-frontend:0.1.1
imagePullPolicy: IfNotPresent
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
envFrom:
- secretRef:
name: infisical-frontend
ports:
- containerPort: 3000
{{ end }}

- name: infisical-proxy
image: nginx:stable-alpine3.17-slim
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -459,20 +432,6 @@ data:
location / {
include /etc/nginx/mime.types;
{{ if (eq .Values.debugVersion true) }}
proxy_set_header X-Real-RIP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;

proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

proxy_pass http://localhost:3000; # for frontend
proxy_redirect off;
{{ end }}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ spec:
# applications.app.bytetrade.io/icon: https://file.bttcdn.com/appstore/seafiles/icon.png
# applications.app.bytetrade.io/title: Seafile
# applications.app.bytetrade.io/version: '0.0.1'
#{{ if (eq .Values.debugVersion true) }}
# applications.app.bytetrade.io/entrances: '[{"name":"seafile-ui", "host":"seafile-ui", "port":80,"title":"Seafile"}]'
#{{ else }}
# applications.app.bytetrade.io/entrances: '[{"name":"seafile-ui", "host":"seafile-ui", "port":80,"title":"Seafile","invisible": true}]'
#{{ end }}
#
#spec:
# replicas: 1
Expand Down

0 comments on commit b081743

Please sign in to comment.