From 4ac0ce8e28c0444833bf15473eb441ee7413e013 Mon Sep 17 00:00:00 2001 From: hysyeah Date: Mon, 15 Jul 2024 22:05:14 +0800 Subject: [PATCH] feat: remove zinc server from terminus (#217) --- .../templates/monitoring_deploy.yaml | 2 +- .../cluster/deploy/appservice_deploy.yaml | 2 +- .../templates/systemserver_deploy.yaml | 29 +------ .../cluster/deploy/middleware_deploy.yaml | 2 +- .../cluster/deploy/zincserver_deploy.yaml | 85 ------------------- .../config/user/helm-charts/zinc/.helmignore | 23 ----- .../config/user/helm-charts/zinc/Chart.yaml | 24 ------ .../user/helm-charts/zinc/templates/NOTES.txt | 0 .../helm-charts/zinc/templates/_helpers.tpl | 62 -------------- .../zinc/templates/zinc_deploy.yaml | 17 ---- .../config/user/helm-charts/zinc/values.yaml | 0 11 files changed, 4 insertions(+), 242 deletions(-) delete mode 100644 frameworks/tapr/config/cluster/deploy/zincserver_deploy.yaml delete mode 100644 frameworks/tapr/config/user/helm-charts/zinc/.helmignore delete mode 100644 frameworks/tapr/config/user/helm-charts/zinc/Chart.yaml delete mode 100644 frameworks/tapr/config/user/helm-charts/zinc/templates/NOTES.txt delete mode 100644 frameworks/tapr/config/user/helm-charts/zinc/templates/_helpers.tpl delete mode 100644 frameworks/tapr/config/user/helm-charts/zinc/templates/zinc_deploy.yaml delete mode 100644 frameworks/tapr/config/user/helm-charts/zinc/values.yaml diff --git a/apps/system-apps/config/user/helm-charts/monitoring/templates/monitoring_deploy.yaml b/apps/system-apps/config/user/helm-charts/monitoring/templates/monitoring_deploy.yaml index a3b925d7..dfb1f352 100644 --- a/apps/system-apps/config/user/helm-charts/monitoring/templates/monitoring_deploy.yaml +++ b/apps/system-apps/config/user/helm-charts/monitoring/templates/monitoring_deploy.yaml @@ -62,7 +62,7 @@ spec: fieldPath: status.podIP containers: - name: dashboard-frontend - image: beclab/dashboard-frontend-v1:v0.2.20 + image: beclab/dashboard-frontend-v1:v0.2.21 imagePullPolicy: IfNotPresent ports: - containerPort: 80 diff --git a/frameworks/app-service/config/cluster/deploy/appservice_deploy.yaml b/frameworks/app-service/config/cluster/deploy/appservice_deploy.yaml index 72d1c104..4e3fe0fd 100644 --- a/frameworks/app-service/config/cluster/deploy/appservice_deploy.yaml +++ b/frameworks/app-service/config/cluster/deploy/appservice_deploy.yaml @@ -153,7 +153,7 @@ spec: serviceAccount: os-internal containers: - name: app-service - image: beclab/app-service:0.2.17 + image: beclab/app-service:0.2.18 imagePullPolicy: IfNotPresent securityContext: runAsUser: 0 diff --git a/frameworks/system-server/config/user/helm-charts/systemserver/templates/systemserver_deploy.yaml b/frameworks/system-server/config/user/helm-charts/systemserver/templates/systemserver_deploy.yaml index 24aeb4d2..9de8d997 100644 --- a/frameworks/system-server/config/user/helm-charts/systemserver/templates/systemserver_deploy.yaml +++ b/frameworks/system-server/config/user/helm-charts/systemserver/templates/systemserver_deploy.yaml @@ -74,8 +74,6 @@ spec: containerPort: 27017 - name: pg-proxy containerPort: 5432 - - name: zinc-proxy - containerPort: 8080 - name: auth-proxy containerPort: 9091 - name: knowledge-proxy @@ -175,18 +173,6 @@ data: "@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy stat_prefix: destination cluster: cluster_pg_proxy - - name: listener_zinc_proxy - address: - socket_address: - address: 0.0.0.0 - port_value: 8080 - filter_chains: - - filters: - - name: envoy.filters.network.tcp_proxy - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy - stat_prefix: destination - cluster: cluster_zinc_proxy - name: listener_auth_backend_proxy address: socket_address: @@ -262,20 +248,7 @@ data: address: socket_address: address: citus-0.citus-headless.os-system.svc.cluster.local - port_value: 5432 - - name: cluster_zinc_proxy - connect_timeout: 30s - type: LOGICAL_DNS - dns_lookup_family: V4_ONLY - load_assignment: - cluster_name: cluster_zinc_proxy - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: zinc-server-svc.os-system.svc.cluster.local - port_value: 80 + port_value: 5432 - name: cluster_auth_backend_proxy connect_timeout: 30s type: LOGICAL_DNS diff --git a/frameworks/tapr/config/cluster/deploy/middleware_deploy.yaml b/frameworks/tapr/config/cluster/deploy/middleware_deploy.yaml index a8bd68b7..d6296bc5 100644 --- a/frameworks/tapr/config/cluster/deploy/middleware_deploy.yaml +++ b/frameworks/tapr/config/cluster/deploy/middleware_deploy.yaml @@ -99,7 +99,7 @@ spec: - name: DISABLE_TELEMETRY value: "false" - name: operator-api - image: beclab/middleware-operator:0.1.31 + image: beclab/middleware-operator:0.1.32 imagePullPolicy: IfNotPresent ports: - containerPort: 9080 diff --git a/frameworks/tapr/config/cluster/deploy/zincserver_deploy.yaml b/frameworks/tapr/config/cluster/deploy/zincserver_deploy.yaml deleted file mode 100644 index 6eef261f..00000000 --- a/frameworks/tapr/config/cluster/deploy/zincserver_deploy.yaml +++ /dev/null @@ -1,85 +0,0 @@ - - -{{ $search_rootpath := "/terminus/rootfs/search" }} -{{- $zinc_secret := (lookup "v1" "Secret" .Release.Namespace "zinc-server-admin") -}} -{{- $password := "" -}} -{{ if $zinc_secret -}} -{{ $password = (index $zinc_secret "data" "password") }} -{{ else -}} -{{ $password = randAlphaNum 16 | b64enc }} -{{- end -}} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: zinc-server-admin - namespace: {{ .Release.Namespace }} -type: Opaque -data: - password: {{ $password }} - ---- -apiVersion: v1 -kind: Service -metadata: - name: zinc-server-svc - namespace: {{ .Release.Namespace }} -spec: - type: ClusterIP - selector: - app: zinc-server - ports: - - name: http - port: 80 - targetPort: 4080 - ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: zinc-server - namespace: {{ .Release.Namespace }} - labels: - app: zinc-server - applications.app.bytetrade.io/author: bytetrade.io -spec: - replicas: 1 - selector: - matchLabels: - app: zinc-server - serviceName: "zinc-server" - template: - metadata: - labels: - app: zinc-server - spec: - securityContext: - runAsUser: 0 - containers: - - name: zinc-server - image: beclab/zincsearch:v0.4.7 - env: - - name: ZINC_FIRST_ADMIN_USER - value: admin - - name: ZINC_FIRST_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: zinc-server-admin - key: password - - name: ZINC_DATA_PATH - value: /data - # command: ["/bin/bash", "-c", "while true; do sleep 1; done"] - imagePullPolicy: IfNotPresent - ports: - - containerPort: 4080 - name: http - volumeMounts: - - name: index-data - mountPath: /data - volumes: - - name: index-data - hostPath: - type: DirectoryOrCreate - path: {{ $search_rootpath }}/zinc-data - diff --git a/frameworks/tapr/config/user/helm-charts/zinc/.helmignore b/frameworks/tapr/config/user/helm-charts/zinc/.helmignore deleted file mode 100644 index 0e8a0eb3..00000000 --- a/frameworks/tapr/config/user/helm-charts/zinc/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/frameworks/tapr/config/user/helm-charts/zinc/Chart.yaml b/frameworks/tapr/config/user/helm-charts/zinc/Chart.yaml deleted file mode 100644 index 515f3b58..00000000 --- a/frameworks/tapr/config/user/helm-charts/zinc/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: zinc -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.0.1 - -# 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/frameworks/tapr/config/user/helm-charts/zinc/templates/NOTES.txt b/frameworks/tapr/config/user/helm-charts/zinc/templates/NOTES.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/frameworks/tapr/config/user/helm-charts/zinc/templates/_helpers.tpl b/frameworks/tapr/config/user/helm-charts/zinc/templates/_helpers.tpl deleted file mode 100644 index 5b891e84..00000000 --- a/frameworks/tapr/config/user/helm-charts/zinc/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "zinc.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 "zinc.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 "zinc.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "zinc.labels" -}} -helm.sh/chart: {{ include "zinc.chart" . }} -{{ include "zinc.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "zinc.selectorLabels" -}} -app.kubernetes.io/name: {{ include "zinc.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "zinc.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "zinc.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/frameworks/tapr/config/user/helm-charts/zinc/templates/zinc_deploy.yaml b/frameworks/tapr/config/user/helm-charts/zinc/templates/zinc_deploy.yaml deleted file mode 100644 index 049814e2..00000000 --- a/frameworks/tapr/config/user/helm-charts/zinc/templates/zinc_deploy.yaml +++ /dev/null @@ -1,17 +0,0 @@ - - ---- -apiVersion: v1 -kind: Service -metadata: - name: zinc-server-svc - namespace: user-system-{{ .Values.bfl.username }} -spec: - type: ClusterIP - selector: - app: systemserver - ports: - - protocol: TCP - name: zinc - port: 80 - targetPort: 8080 \ No newline at end of file diff --git a/frameworks/tapr/config/user/helm-charts/zinc/values.yaml b/frameworks/tapr/config/user/helm-charts/zinc/values.yaml deleted file mode 100644 index e69de29b..00000000