diff --git a/helm-charts/bk-dbm/Chart.lock b/helm-charts/bk-dbm/Chart.lock index 1dd331acc7..469e99570d 100644 --- a/helm-charts/bk-dbm/Chart.lock +++ b/helm-charts/bk-dbm/Chart.lock @@ -13,13 +13,13 @@ dependencies: version: 9.15.2 - name: reloader repository: https://stakater.github.io/stakater-charts - version: 1.0.76 + version: 1.0.93 - name: grafana repository: file://./charts/grafana version: 7.9.8 - name: dbm repository: file://charts/dbm - version: 0.1.35 + version: 0.1.36 - name: dbconfig repository: file://charts/dbconfig version: 0.1.13 @@ -56,5 +56,5 @@ dependencies: - name: backup-consumer repository: file://charts/backup-consumer version: 0.0.3 -digest: sha256:a02f4276a760a998bbab6d773dc904fafb95cc7737101cb7748abbaeba8ad901 -generated: "2024-04-08T19:22:00.694614+08:00" +digest: sha256:f64182c5270d19aa9eb7107b253dbf18cd6562b0e1a4fefdc60269f622f6cc6c +generated: "2024-05-08T16:44:54.380362+08:00" diff --git a/helm-charts/bk-dbm/Chart.yaml b/helm-charts/bk-dbm/Chart.yaml index 78bae7e7a8..621a419722 100644 --- a/helm-charts/bk-dbm/Chart.yaml +++ b/helm-charts/bk-dbm/Chart.yaml @@ -27,7 +27,7 @@ dependencies: - condition: dbm.enabled name: dbm repository: file://charts/dbm - version: 0.1.35 + version: 0.1.36 - condition: dbconfig.enabled name: dbconfig repository: file://charts/dbconfig diff --git a/helm-charts/bk-dbm/charts/dbm/Chart.yaml b/helm-charts/bk-dbm/charts/dbm/Chart.yaml index 4c314a2249..cee520a399 100644 --- a/helm-charts/bk-dbm/charts/dbm/Chart.yaml +++ b/helm-charts/bk-dbm/charts/dbm/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -appVersion: 1.3.0-alpha.675 +appVersion: 1.3.0-alpha.696 description: A Helm chart for dbm name: dbm type: application -version: 0.1.35 +version: 0.1.36 diff --git a/helm-charts/bk-dbm/charts/dbm/templates/deployments/backend-api/ingress-backend-api.yaml b/helm-charts/bk-dbm/charts/dbm/templates/deployments/backend-api/ingress-backend-api.yaml new file mode 100644 index 0000000000..74cf47430f --- /dev/null +++ b/helm-charts/bk-dbm/charts/dbm/templates/deployments/backend-api/ingress-backend-api.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingressBackendApi.enabled -}} +{{- $fullName := ( include "dbm.backend-api.fullname" .) -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingressBackendApi.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingressBackendApi.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingressBackendApi.annotations "kubernetes.io/ingress.class" .Values.ingressBackendApi.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: {{ printf "%s-%s" (include "bk-dbm.fullname" .) "public" }} + labels: + {{- include "bk-dbm.labels" . | nindent 4 }} + {{- with .Values.ingressBackendApi.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingressBackendApi.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingressBackendApi.className }} + {{- end }} + {{- if .Values.ingressBackendApi.tls }} + tls: + {{- range .Values.ingressBackendApi.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- if .Values.ingressBackendApi.hostname }} + - host: {{ .Values.ingressBackendApi.hostname }} + http: + paths: + {{- range .Values.ingressBackendApi.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/helm-charts/bk-dbm/charts/dbm/templates/ingress-public.yaml b/helm-charts/bk-dbm/charts/dbm/templates/deployments/backend-api/ingress-public.yaml similarity index 97% rename from helm-charts/bk-dbm/charts/dbm/templates/ingress-public.yaml rename to helm-charts/bk-dbm/charts/dbm/templates/deployments/backend-api/ingress-public.yaml index dfb19f8d94..a0112427ef 100644 --- a/helm-charts/bk-dbm/charts/dbm/templates/ingress-public.yaml +++ b/helm-charts/bk-dbm/charts/dbm/templates/deployments/backend-api/ingress-public.yaml @@ -1,5 +1,5 @@ {{- if .Values.ingressPublic.enabled -}} -{{- $fullName := include "bk-dbm.fullname" . -}} +{{- $fullName := ( include "dbm.backend-api.fullname" .) -}} {{- $svcPort := .Values.service.port -}} {{- if and .Values.ingressPublic.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if not (hasKey .Values.ingressPublic.annotations "kubernetes.io/ingress.class") }} diff --git a/helm-charts/bk-dbm/charts/dbm/templates/ingress.yaml b/helm-charts/bk-dbm/charts/dbm/templates/deployments/saas-api/ingress.yaml similarity index 100% rename from helm-charts/bk-dbm/charts/dbm/templates/ingress.yaml rename to helm-charts/bk-dbm/charts/dbm/templates/deployments/saas-api/ingress.yaml diff --git a/helm-charts/bk-dbm/values.yaml b/helm-charts/bk-dbm/values.yaml index 86cb36ac6d..2701aef045 100644 --- a/helm-charts/bk-dbm/values.yaml +++ b/helm-charts/bk-dbm/values.yaml @@ -124,6 +124,15 @@ dbm: pathType: ImplementationSpecific tls: [] + ingressBackendApi: + enabled: true + className: "" + hostname: "bkdbm-backend-api.example.com" + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + ingressPublic: # 在跨云管控场景下,需要配置公网 clb 进行访问 enabled: false @@ -251,7 +260,7 @@ grafana: image: registry: "mirrors.tencent.com" repository: "build/blueking/bk-monitor-grafana" - tag: 3.6.64 + tag: 3.7.115 admin: user: admin password: admin