Skip to content

Commit 69dd246

Browse files
jikkaihexf00
andauthored
chore: update repository (#243)
* chore: update repository * chore: update repository * chore: update repository --------- Co-authored-by: GitHub Actions <hexf00@users.noreply.github.com> Co-authored-by: GitHub Actions <jikkai@users.noreply.github.com>
1 parent 79bc532 commit 69dd246

27 files changed

Lines changed: 494 additions & 38 deletions

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ NS = helm-charts
33
BUILD_DIR = build
44

55
.PHONY: all
6-
all: prepare universer collaboration-server collaboration-demo worker univer-ssc univer-stack
6+
all: prepare universer collaboration-server collaboration-helper-server collaboration-demo worker univer-ssc univer-stack
77

88
.PHONY: prepare
99
prepare:
@@ -22,6 +22,12 @@ collaboration-server: prepare
2222
@helm package charts/collaboration-server -d $(BUILD_DIR)
2323
@helm push $(BUILD_DIR)/collaboration-server-*.tgz oci://$(REGISTRY)/$(NS)
2424

25+
.PHONY: collaboration-helper-server
26+
collaboration-helper-server: prepare
27+
# Build and push collaboration-helper-server chart
28+
@helm package charts/collaboration-helper-server -d $(BUILD_DIR)
29+
@helm push $(BUILD_DIR)/collaboration-helper-server-*.tgz oci://$(REGISTRY)/$(NS)
30+
2531
.PHONY: collaboration-demo
2632
collaboration-demo: prepare
2733
# Build and push collaboration-demo chart

charts/collaboration-demo/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.12.4 # VERSION
18+
version: 0.13.0 # VERSION
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/collaboration-demo/templates/istio-virtualService.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ spec:
1212
- {{ . | quote }}
1313
{{- end }}
1414
gateways:
15-
- univer
15+
{{- range .Values.istio.gateway.gateways }}
16+
- {{ . | quote }}
17+
{{- end }}
1618
http:
1719
- match:
1820
- uri:
@@ -37,7 +39,9 @@ spec:
3739
- {{ . | quote }}
3840
{{- end }}
3941
gateways:
40-
- univer-feature
42+
{{- range .Values.istio.featureGateway.gateways }}
43+
- {{ . | quote }}
44+
{{- end }}
4145
http:
4246
- match:
4347
- uri:

charts/collaboration-demo/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ image:
1111
repository: release/univer-collaboration-lite
1212
pullPolicy: IfNotPresent
1313
# Overrides the image tag whose default is the chart appVersion.
14-
tag: 0.12.4 # VERSION
14+
tag: 0.13.0 # VERSION
1515

1616
imagePullSecrets: []
1717
nameOverride: ""
@@ -75,6 +75,8 @@ istio:
7575
enabled: false
7676
hosts:
7777
- univer.private
78+
gateways:
79+
- univer
7880

7981
# select istio ingress gateway. for example
8082
# ingressSelector:
@@ -89,6 +91,8 @@ istio:
8991
enabled: false
9092
hosts:
9193
- univer.feature
94+
gateways:
95+
- univer-feature
9296

9397
# select istio ingress gateway. for example
9498
# ingressSelector:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: collaboration-helper-server
3+
description: A Helm chart for Kubernetes
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 0.13.0 # VERSION
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: "1.16.0"
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "collaboration-helper-server.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "collaboration-helper-server.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "collaboration-helper-server.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "collaboration-helper-server.labels" -}}
37+
helm.sh/chart: {{ include "collaboration-helper-server.chart" . }}
38+
{{ include "collaboration-helper-server.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "collaboration-helper-server.selectorLabels" -}}
49+
app: {{ include "collaboration-helper-server.name" . }}
50+
app.kubernetes.io/name: {{ include "collaboration-helper-server.name" . }}
51+
{{- end }}
52+
53+
{{/* vim: set filetype=mustache: */}}
54+
{{/*
55+
Return the proper image name
56+
{{ include "common.images.image" ( dict "image" .Values.path.to.the.image ) }}
57+
*/}}
58+
{{- define "common.images.image" -}}
59+
{{- $registryName := .image.registry -}}
60+
{{- $repositoryName := .image.repository -}}
61+
{{- $separator := ":" -}}
62+
{{- $termination := .image.tag | toString -}}
63+
{{- if .image.digest }}
64+
{{- $separator = "@" -}}
65+
{{- $termination = .image.digest | toString -}}
66+
{{- end -}}
67+
{{- if $registryName }}
68+
{{- printf "%s/%s%s%s" $registryName $repositoryName $separator $termination -}}
69+
{{- else -}}
70+
{{- printf "%s%s%s" $repositoryName $separator $termination -}}
71+
{{- end -}}
72+
{{- end -}}
73+
74+
{{- define "collaboration-helper-server.istio.labels" -}}
75+
version: {{ .Values.istio.version | quote }}
76+
{{- end }}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{{- if .Values.enabled }}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: {{ include "collaboration-helper-server.fullname" . }}
6+
labels:
7+
{{- include "collaboration-helper-server.labels" . | nindent 4 }}
8+
{{- include "collaboration-helper-server.istio.labels" . | nindent 4 }}
9+
spec:
10+
replicas: {{ .Values.replicaCount }}
11+
selector:
12+
matchLabels:
13+
{{- include "collaboration-helper-server.selectorLabels" . | nindent 6 }}
14+
{{- include "collaboration-helper-server.istio.labels" . | nindent 6 }}
15+
template:
16+
metadata:
17+
{{- with .Values.podAnnotations }}
18+
annotations:
19+
{{- toYaml . | nindent 8 }}
20+
{{- end }}
21+
labels:
22+
{{- include "collaboration-helper-server.selectorLabels" . | nindent 8 }}
23+
{{- include "collaboration-helper-server.istio.labels" . | nindent 8 }}
24+
spec:
25+
{{- with .Values.imagePullSecrets }}
26+
imagePullSecrets:
27+
{{- toYaml . | nindent 8 }}
28+
{{- end }}
29+
securityContext:
30+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
31+
containers:
32+
- name: {{ .Chart.Name }}
33+
securityContext:
34+
{{- toYaml .Values.securityContext | nindent 12 }}
35+
image: {{ include "common.images.image" .Values }}
36+
imagePullPolicy: {{ .Values.image.pullPolicy }}
37+
command:
38+
- pnpm
39+
- start:helper
40+
ports:
41+
- name: apply
42+
containerPort: {{ .Values.service.apply }}
43+
protocol: TCP
44+
# livenessProbe:
45+
# httpGet:
46+
# path: /
47+
# port: http
48+
# readinessProbe:
49+
# httpGet:
50+
# path: /
51+
# port: http
52+
resources:
53+
{{- toYaml .Values.resources | nindent 12 }}
54+
env:
55+
- name: URL_OF_APPLY_SERVICE
56+
value: 0.0.0.0:{{ .Values.service.apply }}
57+
- name: URL_OF_UNIVERSER_SERVICE
58+
value: {{ .Values.config.univerServer }}
59+
- name: URL_OF_SNAPSHOT_SERVICE
60+
value: {{ .Values.config.snapshotServer }}
61+
- name: UNIT_INACTIVATE_TIMEOUT
62+
value: {{ .Values.config.unitInactivateTimeout | quote }}
63+
- name: X_FEATURE_ID
64+
value: {{ .Values.istio.version | quote }}
65+
- name: CLIENT_LICENSE_TEXT
66+
value: {{ .Values.license | quote }}
67+
{{- with .Values.nodeSelector }}
68+
nodeSelector:
69+
{{- toYaml . | nindent 8 }}
70+
{{- end }}
71+
{{- with .Values.affinity }}
72+
affinity:
73+
{{- toYaml . | nindent 8 }}
74+
{{- end }}
75+
{{- with .Values.tolerations }}
76+
tolerations:
77+
{{- toYaml . | nindent 8 }}
78+
{{- end }}
79+
{{- end }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{- if .Values.istio.enabled -}}
2+
apiVersion: networking.istio.io/v1alpha3
3+
kind: DestinationRule
4+
metadata:
5+
name: {{ include "collaboration-helper-server.fullname" . }}
6+
labels:
7+
{{- include "collaboration-helper-server.labels" . | nindent 4 }}
8+
spec:
9+
host: {{ include "collaboration-helper-server.fullname" . }}
10+
trafficPolicy:
11+
loadBalancer:
12+
consistentHash:
13+
httpHeaderName: x-session-id
14+
subsets:
15+
- name: default
16+
labels:
17+
version: default
18+
{{- end -}}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{{- if .Values.istio.enabled -}}
2+
apiVersion: networking.istio.io/v1alpha3
3+
kind: VirtualService
4+
metadata:
5+
name: {{ include "collaboration-helper-server.fullname" . }}
6+
labels:
7+
{{- include "collaboration-helper-server.labels" . | nindent 4 }}
8+
spec:
9+
hosts:
10+
- {{ include "collaboration-helper-server.fullname" . | quote }}
11+
http:
12+
- match:
13+
- port: {{ .Values.service.apply }}
14+
route:
15+
- destination:
16+
host: {{ include "collaboration-helper-server.fullname" . }}
17+
port:
18+
number: {{ .Values.service.apply }}
19+
subset: default
20+
{{- end -}}

0 commit comments

Comments
 (0)