diff --git a/README-zh_CN.md b/README-zh_CN.md index 86568a9..a0a85d8 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -3,6 +3,12 @@ OpenIM 的Kubernetes 系统的helm chart部署脚本,一共分三部分,一部分是基础组件(Prometheus,loki,可选部分),一部分是应用中间件(kafka,mongodb,mysql,redis,minio), 一部分是应用服务(openim-server,openim-chat,openim-web,openim-admin) +目前最新版本如下: +服务 chart-version imageVersion +openim-server 0.1.2 release-v3.5 +openim-chat 0.1.2 release-V1.5 +openim-admin 0.1.2 toc-base-open-k8s.35 +openim-web 0.1.1 preview-k8s ## 系统要求 1. 系统环境要求 diff --git a/README.md b/README.md index 8dd9536..7741a67 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ OpenIM Helm Charts simplify deployment and management of OpenIM instant messaging platform and associated middleware on Kubernetes clusters. +The latest version is as follows: +service chart-version imageVersion +openim-server 0.1.2 release-v3.5 +openim-chat 0.1.2 release-V1.5 +openim-admin 0.1.2 toc-base-open-k8s.35 +openim-web 0.1.1 preview-k8s ## Prerequisites 1. System environment required diff --git a/charts/openim-admin/Chart.yaml b/charts/openim-admin/Chart.yaml index 2b4d5eb..e2b0e4b 100644 --- a/charts/openim-admin/Chart.yaml +++ b/charts/openim-admin/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/openim-chat/Chart.yaml b/charts/openim-chat/Chart.yaml index 85c5c4e..584faba 100644 --- a/charts/openim-chat/Chart.yaml +++ b/charts/openim-chat/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/openim-server/Chart.yaml b/charts/openim-server/Chart.yaml index ef6ac1c..a644030 100644 --- a/charts/openim-server/Chart.yaml +++ b/charts/openim-server/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/openim-server/charts/openim-msggateway-proxy/.helmignore b/charts/openim-server/charts/openim-msggateway-proxy/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/openim-server/charts/openim-msggateway-proxy/Chart.yaml b/charts/openim-server/charts/openim-msggateway-proxy/Chart.yaml new file mode 100644 index 0000000..e2660c0 --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: openim-msggateway-proxy +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/charts/openim-server/charts/openim-msggateway-proxy/templates/NOTES.txt b/charts/openim-server/charts/openim-msggateway-proxy/templates/NOTES.txt new file mode 100644 index 0000000..bfdaafd --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "openim-msggateway-proxy.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "openim-msggateway-proxy.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openim-msggateway-proxy.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "openim-msggateway-proxy.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/openim-server/charts/openim-msggateway-proxy/templates/_helpers.tpl b/charts/openim-server/charts/openim-msggateway-proxy/templates/_helpers.tpl new file mode 100644 index 0000000..bebeeda --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "openim-msggateway-proxy.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "openim-msggateway-proxy.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "openim-msggateway-proxy.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "openim-msggateway-proxy.labels" -}} +helm.sh/chart: {{ include "openim-msggateway-proxy.chart" . }} +{{ include "openim-msggateway-proxy.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "openim-msggateway-proxy.selectorLabels" -}} +app.kubernetes.io/name: {{ include "openim-msggateway-proxy.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "openim-msggateway-proxy.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "openim-msggateway-proxy.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/openim-server/charts/openim-msggateway-proxy/templates/deployment.yaml b/charts/openim-server/charts/openim-msggateway-proxy/templates/deployment.yaml new file mode 100644 index 0000000..45e66c1 --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/templates/deployment.yaml @@ -0,0 +1,86 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "openim-msggateway-proxy.fullname" . }} + labels: + {{- include "openim-msggateway-proxy.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.global.sharedValues.msggatewayReplicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "openim-msggateway-proxy.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "openim-msggateway-proxy.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "openim-msggateway-proxy.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: rpc + containerPort: 88 + protocol: TCP + #livenessProbe: + # httpGet: + # path: / + # port: http + #readinessProbe: + # httpGet: + # path: / + # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - mountPath: /openim/openim-server/config/config.yaml + name: config + subPath: config.yaml + - mountPath: /openim/openim-server/config/notification.yaml + name: config + subPath: notification.yaml + volumes: + - name: config + configMap: + name: openim-cm + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/openim-server/charts/openim-msggateway-proxy/templates/hpa.yaml b/charts/openim-server/charts/openim-msggateway-proxy/templates/hpa.yaml new file mode 100644 index 0000000..204fafd --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "openim-msggateway-proxy.fullname" . }} + labels: + {{- include "openim-msggateway-proxy.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "openim-msggateway-proxy.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/openim-server/charts/openim-msggateway-proxy/templates/ingress.yaml b/charts/openim-server/charts/openim-msggateway-proxy/templates/ingress.yaml new file mode 100644 index 0000000..8074e57 --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "openim-msggateway-proxy.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "openim-msggateway-proxy.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/openim-server/charts/openim-msggateway-proxy/templates/service.yaml b/charts/openim-server/charts/openim-msggateway-proxy/templates/service.yaml new file mode 100644 index 0000000..029d308 --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "openim-msggateway-proxy.fullname" . }} + labels: + {{- include "openim-msggateway-proxy.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: 88 + targetPort: rpc + protocol: TCP + name: rpc + - port: 90 + targetPort: 90 + protocol: TCP + name: metrics-port + selector: + {{- include "openim-msggateway-proxy.selectorLabels" . | nindent 4 }} diff --git a/charts/openim-server/charts/openim-msggateway-proxy/templates/serviceMonitor.yaml b/charts/openim-server/charts/openim-msggateway-proxy/templates/serviceMonitor.yaml new file mode 100644 index 0000000..69fe89d --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/templates/serviceMonitor.yaml @@ -0,0 +1,15 @@ +{{- if .Values.global.monitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + release: kube-prometheus-stack + name: {{ include "openim-msggateway-proxy.fullname" . }} +spec: + endpoints: + - interval: 15s + port: metrics-port + selector: + matchLabels: + app.kubernetes.io/name: openim-msggateway-proxy +{{- end }} \ No newline at end of file diff --git a/charts/openim-server/charts/openim-msggateway-proxy/templates/serviceaccount.yaml b/charts/openim-server/charts/openim-msggateway-proxy/templates/serviceaccount.yaml new file mode 100644 index 0000000..8162854 --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "openim-msggateway-proxy.serviceAccountName" . }} + labels: + {{- include "openim-msggateway-proxy.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/openim-server/charts/openim-msggateway-proxy/values.yaml b/charts/openim-server/charts/openim-msggateway-proxy/values.yaml new file mode 100644 index 0000000..0b856ca --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway-proxy/values.yaml @@ -0,0 +1,82 @@ +# Default values for openim-msggateway-proxy. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: ghcr.io/openimsdk/openim-msggateway-proxy + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: false + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + className: "nginx" + annotations: + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/openim-server/charts/openim-msggateway/templates/deployment.yaml b/charts/openim-server/charts/openim-msggateway/templates/deployment.yaml index a4a02b1..63daf29 100644 --- a/charts/openim-server/charts/openim-msggateway/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-msggateway/templates/deployment.yaml @@ -1,12 +1,13 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "openim-msggateway.fullname" . }} labels: {{- include "openim-msggateway.labels" . | nindent 4 }} spec: + serviceName: {{ include "openim-msggateway.fullname" . }}-headless {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.sharedValues.msggatewayReplicaCount }} {{- end }} selector: matchLabels: @@ -48,6 +49,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-msggateway/templates/serviceheadless.yaml b/charts/openim-server/charts/openim-msggateway/templates/serviceheadless.yaml new file mode 100644 index 0000000..13f401c --- /dev/null +++ b/charts/openim-server/charts/openim-msggateway/templates/serviceheadless.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "openim-msggateway.fullname" . }}-headless + labels: + {{- include "openim-msggateway.labels" . | nindent 4 }} +spec: + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: 88 + targetPort: rpc + protocol: TCP + name: rpc + - port: 90 + targetPort: 90 + protocol: TCP + name: metrics-port + selector: + {{- include "openim-msggateway.selectorLabels" . | nindent 4 }} + clusterIP: None \ No newline at end of file diff --git a/charts/openim-server/charts/openim-msgtransfer/templates/deployment.yaml b/charts/openim-server/charts/openim-msgtransfer/templates/deployment.yaml index 636b1aa..21e98c0 100644 --- a/charts/openim-server/charts/openim-msgtransfer/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-msgtransfer/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-push/templates/deployment.yaml b/charts/openim-server/charts/openim-push/templates/deployment.yaml index 73dea17..93c9911 100644 --- a/charts/openim-server/charts/openim-push/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-push/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-rpc-auth/templates/deployment.yaml b/charts/openim-server/charts/openim-rpc-auth/templates/deployment.yaml index 74337ad..30e62f1 100644 --- a/charts/openim-server/charts/openim-rpc-auth/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-rpc-auth/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-rpc-conversation/templates/deployment.yaml b/charts/openim-server/charts/openim-rpc-conversation/templates/deployment.yaml index 78bd6dc..d672dc9 100644 --- a/charts/openim-server/charts/openim-rpc-conversation/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-rpc-conversation/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-rpc-friend/templates/deployment.yaml b/charts/openim-server/charts/openim-rpc-friend/templates/deployment.yaml index 9126433..7eb4495 100644 --- a/charts/openim-server/charts/openim-rpc-friend/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-rpc-friend/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-rpc-group/templates/deployment.yaml b/charts/openim-server/charts/openim-rpc-group/templates/deployment.yaml index d5536ec..330eea3 100644 --- a/charts/openim-server/charts/openim-rpc-group/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-rpc-group/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-rpc-msg/templates/deployment.yaml b/charts/openim-server/charts/openim-rpc-msg/templates/deployment.yaml index bf95a18..f82532e 100644 --- a/charts/openim-server/charts/openim-rpc-msg/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-rpc-msg/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-rpc-third/templates/deployment.yaml b/charts/openim-server/charts/openim-rpc-third/templates/deployment.yaml index 8378998..42d3ee2 100644 --- a/charts/openim-server/charts/openim-rpc-third/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-rpc-third/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/charts/openim-rpc-user/templates/deployment.yaml b/charts/openim-server/charts/openim-rpc-user/templates/deployment.yaml index fe4057c..ceb9add 100644 --- a/charts/openim-server/charts/openim-rpc-user/templates/deployment.yaml +++ b/charts/openim-server/charts/openim-rpc-user/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/openim-server/templates/deployment.yaml b/charts/openim-server/templates/deployment.yaml index 096b266..ae1821f 100644 --- a/charts/openim-server/templates/deployment.yaml +++ b/charts/openim-server/templates/deployment.yaml @@ -45,6 +45,17 @@ spec: # httpGet: # path: / # port: http + env: + - name: MY_MSGGATEWAY_REPLICACOUNT + value: "{{ .Values.global.sharedValues.msggatewayReplicaCount }}" + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/config-imserver.yaml b/config-imserver.yaml index adcdc7c..a5a7224 100644 --- a/config-imserver.yaml +++ b/config-imserver.yaml @@ -3,7 +3,8 @@ global: monitor: enabled: false - + sharedValues: + msggatewayReplicaCount: 1 config: envs: discovery: k8s @@ -356,7 +357,7 @@ config: # The number of ports needs to be consistent with msg_transfer_service_num in script/path_info.sh prometheus: enable: false - prometheusUrl: "https://openim2.server.top/" + grafanaUrl: "https://openim2.server.top/" apiPrometheusPort: [ 90 ] userPrometheusPort: [ 90 ] friendPrometheusPort: [ 90 ] diff --git a/infra/kube-prometheus-stack/values.yaml b/infra/kube-prometheus-stack/values.yaml index c775370..dced735 100644 --- a/infra/kube-prometheus-stack/values.yaml +++ b/infra/kube-prometheus-stack/values.yaml @@ -890,6 +890,12 @@ alertmanager: ## Using default values from https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml ## grafana: + grafana.ini: + security: + allow_embedding: true + auth.anonymous: + enabled: true + org_role: Viewer enabled: true namespaceOverride: "" diff --git a/k8s-adminfront-config.yaml b/k8s-adminfront-config.yaml index 4c92eec..2a7d80d 100644 --- a/k8s-adminfront-config.yaml +++ b/k8s-adminfront-config.yaml @@ -2,7 +2,7 @@ #Currently, only the configuration with ingressName as nginx is provided. #If it is another gateway such as istio or treafik, please modify the corresponding gateway requirements image: - # ghcr.io/openimsdk/openim-admin + # registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-admin-front repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-admin pullPolicy: Always tag: "toc-base-open-k8s.35" diff --git a/k8s-chat-server-config.yaml b/k8s-chat-server-config.yaml index e1460ac..3b1bf6f 100644 --- a/k8s-chat-server-config.yaml +++ b/k8s-chat-server-config.yaml @@ -5,7 +5,7 @@ image: # registry.cn-hangzhou.aliyuncs.com/openimsdk/admin-api repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/chat-api-admin pullPolicy: Always - tag: "latest" + tag: "release-v1.5" ingress: enabled: true className: "nginx" @@ -26,7 +26,7 @@ chat-api: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/chat-api-chat pullPolicy: Always - tag: "latest" + tag: "release-v1.5" ingress: enabled: true className: "nginx" @@ -47,10 +47,10 @@ admin-rpc: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/chat-rpc-admin pullPolicy: Always - tag: "latest" + tag: "release-v1.5" chat-rpc: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/chat-rpc-chat pullPolicy: Always - tag: "latest" + tag: "release-v1.5" diff --git a/k8s-open-im-server-config.yaml b/k8s-open-im-server-config.yaml index be973ca..e4e42ea 100644 --- a/k8s-open-im-server-config.yaml +++ b/k8s-open-im-server-config.yaml @@ -9,7 +9,7 @@ global: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-api pullPolicy: Always - tag: "latest" + tag: "release-v3.5" ingress: enabled: true className: "nginx" @@ -26,10 +26,10 @@ ingress: hosts: - openim1.server.top -openim-msggateway: +openim-msggateway-proxy: image: - repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-msggateway - tag: "latest" + repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-msggateway-proxy + tag: "v3.5.0" pullPolicy: Always ingress: enabled: true @@ -47,49 +47,54 @@ openim-msggateway: hosts: - openim1.server.top +openim-msggateway: + image: + repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-msggateway + tag: "release-v3.5" + pullPolicy: Always # openim-msgtransfer in openim/openim-server/values.yaml not defined, Pass to openim/openim-server/openim-msgtransfer/values.yaml openim-msgtransfer: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-msgtransfer - tag: "latest" + tag: "release-v3.5" pullPolicy: Always openim-push: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-push - tag: "latest" + tag: "release-v3.5" pullPolicy: Always openim-rpc-auth: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-rpc-auth - tag: "latest" + tag: "release-v3.5" pullPolicy: Always openim-rpc-conversation: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-rpc-conversation - tag: "latest" + tag: "release-v3.5" pullPolicy: Always openim-rpc-friend: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-rpc-friend - tag: "latest" + tag: "release-v3.5" pullPolicy: Always openim-rpc-group: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-rpc-group - tag: "latest" + tag: "release-v3.5" pullPolicy: Always openim-rpc-msg: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-rpc-msg - tag: "latest" + tag: "release-v3.5" pullPolicy: Always openim-rpc-third: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-rpc-third - tag: "latest" + tag: "release-v3.5" pullPolicy: Always openim-rpc-user: image: repository: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-rpc-user - tag: "latest" + tag: "release-v3.5" pullPolicy: Always