mirror of
https://github.com/beclab/Olares
synced 2026-05-24 09:18:23 +00:00
feat(olares-app): add share application (#2058)
* files: share * feat: update olares-app version to 1.6.1 --------- Co-authored-by: aby913 <aby913@163.com>
This commit is contained in:
parent
9f3a0f3c32
commit
bc134283d9
7 changed files with 189 additions and 10 deletions
|
|
@ -209,6 +209,21 @@ spec:
|
|||
port: 80
|
||||
targetPort: 91
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: share-fe-service
|
||||
namespace: user-space-{{ .Values.bfl.username }}
|
||||
spec:
|
||||
selector:
|
||||
app: olares-app
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: share
|
||||
port: 80
|
||||
targetPort: 92
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
|
@ -220,12 +235,12 @@ metadata:
|
|||
applications.app.bytetrade.io/owner: '{{ .Values.bfl.username }}'
|
||||
applications.app.bytetrade.io/author: bytetrade.io
|
||||
annotations:
|
||||
applications.app.bytetrade.io/default-thirdlevel-domains: '[{"appName": "olares-app","entranceName":"dashboard","thirdLevelDomain":"dashboard"},{"appName":"olares-app","entranceName":"control-hub","thirdLevelDomain":"control-hub"},{"appName":"olares-app","entranceName":"files","thirdLevelDomain":"files"},{"appName": "olares-app","entranceName":"vault","thirdLevelDomain":"vault"},{"appName":"olares-app","entranceName":"headscale","thirdLevelDomain":"headscale"},{"appName":"olares-app","entranceName":"settings","thirdLevelDomain":"settings"},{"appName": "olares-app","entranceName":"market","thirdLevelDomain":"market"},{"appName":"olares-app","entranceName":"profile","thirdLevelDomain":"profile"}]'
|
||||
applications.app.bytetrade.io/default-thirdlevel-domains: '[{"appName": "olares-app","entranceName":"dashboard","thirdLevelDomain":"dashboard"},{"appName":"olares-app","entranceName":"control-hub","thirdLevelDomain":"control-hub"},{"appName":"olares-app","entranceName":"files","thirdLevelDomain":"files"},{"appName":"olares-app","entranceName":"share","thirdLevelDomain":"share"},{"appName": "olares-app","entranceName":"vault","thirdLevelDomain":"vault"},{"appName":"olares-app","entranceName":"headscale","thirdLevelDomain":"headscale"},{"appName":"olares-app","entranceName":"settings","thirdLevelDomain":"settings"},{"appName": "olares-app","entranceName":"market","thirdLevelDomain":"market"},{"appName":"olares-app","entranceName":"profile","thirdLevelDomain":"profile"}]'
|
||||
applications.app.bytetrade.io/icon: https://app.cdn.olares.com/appstore/olaresapps/icon.png
|
||||
applications.app.bytetrade.io/title: 'Olares Apps'
|
||||
applications.app.bytetrade.io/version: '0.0.1'
|
||||
applications.app.bytetrade.io/policies: '{"policies":[{"entranceName":"dashboard","uriRegex":"/js/script.js", "level":"public"},{"entranceName":"dashboard","uriRegex":"/js/api/send", "level":"public"}]}'
|
||||
applications.app.bytetrade.io/entrances: '[{"name":"files", "host":"files-fe-service", "port":80,"title":"Files","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/files/icon.png"},{"name":"vault", "host":"vault-service", "port":80,"title":"Vault","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/vault/icon.png"},{"name":"market", "host":"appstore-fe-service", "port":80,"title":"Market","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/appstore/icon.png"},{"name":"settings", "host":"settings-service", "port":80,"title":"Settings","icon":"https://app.cdn.olares.com/appstore/settings/icon.png"},{"name":"profile", "host":"profile-service", "port":80,"title":"Profile","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/profile/icon.png"},{"name":"dashboard","host":"dashboard-service","port":80,"title":"Dashboard","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/dashboard/icon.png"},{"name":"control-hub","host":"control-hub-service","port":80,"title":"Control Hub","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/control-hub/icon.png"},{"name":"headscale", "host":"headscale-svc", "port":80,"title":"Headscale","invisible": true,"icon":"https://app.cdn.olares.com/appstore/headscale/icon.png"}]'
|
||||
applications.app.bytetrade.io/entrances: '[{"name":"files", "host":"files-fe-service", "port":80,"title":"Files","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/files/icon.png"},{"name":"share", "host":"share-fe-service", "port":80,"title":"Share","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/files/icon.png","invisible":true},{"name":"vault", "host":"vault-service", "port":80,"title":"Vault","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/vault/icon.png"},{"name":"market", "host":"appstore-fe-service", "port":80,"title":"Market","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/appstore/icon.png"},{"name":"settings", "host":"settings-service", "port":80,"title":"Settings","icon":"https://app.cdn.olares.com/appstore/settings/icon.png"},{"name":"profile", "host":"profile-service", "port":80,"title":"Profile","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/profile/icon.png"},{"name":"dashboard","host":"dashboard-service","port":80,"title":"Dashboard","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/dashboard/icon.png"},{"name":"control-hub","host":"control-hub-service","port":80,"title":"Control Hub","windowPushState":true,"icon":"https://app.cdn.olares.com/appstore/control-hub/icon.png"},{"name":"headscale", "host":"headscale-svc", "port":80,"title":"Headscale","invisible": true,"icon":"https://app.cdn.olares.com/appstore/headscale/icon.png"}]'
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
|
|
@ -303,7 +318,7 @@ spec:
|
|||
chown -R 1000:1000 /uploadstemp && \
|
||||
chown -R 1000:1000 /appdata
|
||||
- name: olares-app-init
|
||||
image: beclab/system-frontend:v1.5.26
|
||||
image: beclab/system-frontend:v1.6.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/sh
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ spec:
|
|||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
- name: ingress
|
||||
image: beclab/bfl-ingress:v0.3.24
|
||||
image: beclab/bfl-ingress:v0.3.25
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: AUTHELIA_AUTH_URL
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ spec:
|
|||
name: check-appservice
|
||||
containers:
|
||||
- name: chartrepo
|
||||
image: beclab/dynamic-chart-repository:v0.2.4
|
||||
image: beclab/dynamic-chart-repository:v0.2.5
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 81
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
creationTimestamp: null
|
||||
name: sharesambas.sys.bytetrade.io
|
||||
spec:
|
||||
group: sys.bytetrade.io
|
||||
names:
|
||||
categories:
|
||||
- all
|
||||
kind: ShareSamba
|
||||
listKind: ShareSambaList
|
||||
plural: sharesambas
|
||||
shortNames:
|
||||
- sharesamba
|
||||
singular: sharesamba
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.operator
|
||||
name: operator
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: creation
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: ShareSamba is the Schema for the sharesambas API
|
||||
properties:
|
||||
apiVersion:
|
||||
description:
|
||||
"APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
|
||||
type: string
|
||||
kind:
|
||||
description:
|
||||
"Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: ShareSambaSpec defines the desired state of ShareSamba
|
||||
properties:
|
||||
operator:
|
||||
type: string
|
||||
share_items:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- operator
|
||||
- share_items
|
||||
type: object
|
||||
status:
|
||||
description: ShareSambaStatus defines the observed state of ShareSamba
|
||||
properties:
|
||||
state:
|
||||
description:
|
||||
'INSERT ADDITIONAL STATUS FIELD - define observed state
|
||||
of cluster Important: Run "make" to regenerate code after modifying
|
||||
this file'
|
||||
type: string
|
||||
updateTime:
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- state
|
||||
- updateTime
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
|
|
@ -75,8 +75,7 @@ spec:
|
|||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
chown -R 1000:1000 /appdata; chown -R 1000:1000 /appcache; chown -R 1000:1000 /data
|
||||
- env
|
||||
- name: init-container
|
||||
image: 'postgres:16.0-alpine3.18'
|
||||
command:
|
||||
|
|
@ -172,8 +171,74 @@ spec:
|
|||
name: shared-lib
|
||||
{{ end }}
|
||||
|
||||
- name: samba-server
|
||||
image: beclab/samba-server:0.0.3
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: true
|
||||
runAsUser: 0
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /data/appcache/
|
||||
name: upload-appdata
|
||||
- name: fb-data
|
||||
mountPath: /appdata
|
||||
- name: userspace-dir
|
||||
mountPath: /data
|
||||
- name: upload-appdata
|
||||
mountPath: /appcache/
|
||||
{{ if .Values.sharedlib }}
|
||||
- name: shared-lib
|
||||
mountPath: /data/External
|
||||
mountPropagation: Bidirectional
|
||||
{{ end }}
|
||||
ports:
|
||||
- containerPort: 445
|
||||
env:
|
||||
{{ if .Values.sharedlib }}
|
||||
- name: NODE_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
- name: TERMINUSD_HOST
|
||||
value: $(NODE_IP):18088
|
||||
{{ end }}
|
||||
- name: EXTERNAL_PREFIX
|
||||
value: '/External/'
|
||||
- name: ROOT_PREFIX
|
||||
value: /data
|
||||
- name: REDIS_HOST
|
||||
value: redis-cluster-proxy.os-platform
|
||||
- name: REDIS_PORT
|
||||
value: '6379'
|
||||
- name: REDIS_USERNAME
|
||||
value: ''
|
||||
- name: REDIS_PASSWORD
|
||||
value: {{ $files_redis_password | b64dec }}
|
||||
- name: REDIS_USE_SSL
|
||||
value: 'false'
|
||||
# use redis db 0 for redis cache
|
||||
- name: REDIS_DB
|
||||
value: '0'
|
||||
- name: PGHOST
|
||||
value: citus-headless.os-platform
|
||||
- name: PGPORT
|
||||
value: '5432'
|
||||
- name: PGUSER
|
||||
value: files_os_framework
|
||||
- name: PGPASSWORD
|
||||
value: {{ $files_postgres_password | b64dec }}
|
||||
- name: PGDB1
|
||||
value: os_framework_files
|
||||
command:
|
||||
- /samba_share
|
||||
- name: files
|
||||
image: beclab/files-server:v0.2.124
|
||||
image: beclab/files-server:v0.2.125
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: true
|
||||
|
|
@ -371,6 +436,24 @@ spec:
|
|||
type: Directory
|
||||
{{ end }}
|
||||
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: files-samba
|
||||
namespace: os-framework
|
||||
spec:
|
||||
ports:
|
||||
- name: smb
|
||||
protocol: TCP
|
||||
port: 445
|
||||
targetPort: 445
|
||||
nodePort: 30445
|
||||
selector:
|
||||
app: files
|
||||
type: NodePort
|
||||
externalTrafficPolicy: Local
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ spec:
|
|||
name: check-chart-repo
|
||||
containers:
|
||||
- name: appstore-backend
|
||||
image: beclab/market-backend:v0.5.4
|
||||
image: beclab/market-backend:v0.5.6
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 81
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ spec:
|
|||
value: os_framework_vault
|
||||
containers:
|
||||
- name: vault-server
|
||||
image: beclab/vault-server:v1.5.20
|
||||
image: beclab/vault-server:v1.6.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
|
|
|
|||
Loading…
Reference in a new issue