This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch refactor-with-go
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git


The following commit(s) were added to refs/heads/refactor-with-go by this push:
     new 805e3de8 add zipkin (#1034)
805e3de8 is described below

commit 805e3de8d78ed01e2500634c5faedeefe3cfc61d
Author: Mford Jody <[email protected]>
AuthorDate: Wed Mar 15 10:04:07 2023 +0800

    add zipkin (#1034)
---
 .../charts/admin-stack/charts/zipkin/.helmignore   |  23 +++
 deploy/charts/admin-stack/charts/zipkin/Chart.yaml |  36 +++++
 .../charts/zipkin/templates/_charts.tpl            | 164 ++++++++++++++++++++
 .../charts/zipkin/templates/collector-deploy.yaml  |  72 +++++++++
 .../charts/zipkin/templates/collector-hpa.yaml     |  32 ++++
 .../charts/zipkin/templates/collector-ingress.yaml |  55 +++++++
 .../charts/zipkin/templates/collector-service.yaml |  30 ++++
 .../zipkin/templates/collector-serviceaccount.yaml |  27 ++++
 .../charts/zipkin/templates/dep-cronjob.yaml       |  56 +++++++
 .../zipkin/templates/dep-serviceaccount.yaml       |  27 ++++
 .../charts/zipkin/templates/ui-configmap.yaml      | 116 ++++++++++++++
 .../charts/zipkin/templates/ui-deployment.yaml     |  77 ++++++++++
 .../charts/zipkin/templates/ui-hpa.yaml            |  32 ++++
 .../charts/zipkin/templates/ui-ingress.yaml        |  55 +++++++
 .../charts/zipkin/templates/ui-service.yaml        |  30 ++++
 .../charts/zipkin/templates/ui-serviceaccount.yaml |  27 ++++
 .../charts/admin-stack/charts/zipkin/values.yaml   | 171 +++++++++++++++++++++
 17 files changed, 1030 insertions(+)

diff --git a/deploy/charts/admin-stack/charts/zipkin/.helmignore 
b/deploy/charts/admin-stack/charts/zipkin/.helmignore
new file mode 100644
index 00000000..0e8a0eb3
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/.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/deploy/charts/admin-stack/charts/zipkin/Chart.yaml 
b/deploy/charts/admin-stack/charts/zipkin/Chart.yaml
new file mode 100644
index 00000000..80902a54
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/Chart.yaml
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v2
+appVersion: 2.21.0
+description: |-
+  Zipkin is a distributed tracing system. It helps gather timing
+  data needed to troubleshoot latency problems in service architectures.
+  Features include both the collection and lookup of this data.
+home: https://zipkin.io
+keywords:
+- tracing
+- observability
+- open-source
+- opentracing
+- zipkin
+maintainers:
+- email: [email protected]
+  name: dubbo
+name: zipkin
+sources:
+- https://github.com/openzipkin/zipkin/
+type: application
+version: 0.2.0
diff --git a/deploy/charts/admin-stack/charts/zipkin/templates/_charts.tpl 
b/deploy/charts/admin-stack/charts/zipkin/templates/_charts.tpl
new file mode 100644
index 00000000..bb995736
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/_charts.tpl
@@ -0,0 +1,164 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "zipkin.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 "zipkin.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 "zipkin.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | 
trimSuffix "-" -}}
+{{- end -}}
+
+
+{{/*
+Common labels
+*/}}
+{{- define "zipkin.common.labels" -}}
+helm.sh/chart: {{ include "zipkin.chart" . }}
+{{ include "zipkin.common.selectorLabels" . }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+
+{{/*
+Common Selector labels
+*/}}
+{{- define "zipkin.common.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "zipkin.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "zipkin.collector.serviceAccountName" -}}
+{{- if .Values.collector.serviceAccount.create -}}
+    {{ default (include "zipkin.collector.fullname" .) 
.Values.collector.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.collector.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+
+{{/*
+Collector name
+*/}}
+{{- define "zipkin.collector.fullname" -}}
+{{- printf "%s-%s" (include "zipkin.fullname" .) "collector" -}}
+{{- end -}}
+
+{{/*
+Collector service address
+*/}}
+{{- define "zipkin.collector.service.uri" -}}
+{{- printf "http://%s:%d"; (include "zipkin.collector.fullname" .) 
(.Values.collector.service.port | int ) -}}
+{{- end -}}
+
+{{/*
+Collector labels
+*/}}
+{{- define "zipkin.collector.labels" -}}
+app.kubernetes.io/component: collector
+app.kubernetes.io/version: {{ .Values.collector.image.tag | default 
.Chart.AppVersion | quote }}
+{{ include "zipkin.common.labels" . }}
+{{- end -}}
+
+
+{{/*
+Collector Selector labels
+*/}}
+{{- define "zipkin.collector.selectorLabels" -}}
+app.kubernetes.io/component: collector
+{{ include "zipkin.common.selectorLabels" . }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "zipkin.dependencies.serviceAccountName" -}}
+{{- if .Values.dependencies.serviceAccount.create -}}
+    {{ default (include "zipkin.dependencies.fullname" .) 
.Values.dependencies.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.dependencies.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+
+{{/*
+dependencies name
+*/}}
+{{- define "zipkin.dependencies.fullname" -}}
+{{- printf "%s-%s" (include "zipkin.fullname" .) "dependencies" -}}
+{{- end -}}
+
+
+{{/*
+dependencies labels
+*/}}
+{{- define "zipkin.dependencies.labels" -}}
+app.kubernetes.io/component: dependencies
+app.kubernetes.io/version: {{ .Values.dependencies.image.tag | quote }}
+{{ include "zipkin.common.labels" . }}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "zipkin.ui.serviceAccountName" -}}
+{{- if .Values.ui.serviceAccount.create -}}
+    {{ default (include "zipkin.ui.fullname" .) .Values.ui.serviceAccount.name 
}}
+{{- else -}}
+    {{ default "default" .Values.ui.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+
+{{/*
+ui name
+*/}}
+{{- define "zipkin.ui.fullname" -}}
+{{- printf "%s-%s" (include "zipkin.fullname" .) "ui" -}}
+{{- end -}}
+
+
+{{/*
+ui labels
+*/}}
+{{- define "zipkin.ui.labels" -}}
+app.kubernetes.io/component: ui
+app.kubernetes.io/version: {{ .Values.ui.image.tag | default .Chart.AppVersion 
| quote }}
+{{ include "zipkin.common.labels" . }}
+{{- end -}}
+
+
+{{/*
+ui Selector labels
+*/}}
+{{- define "zipkin.ui.selectorLabels" -}}
+app.kubernetes.io/component: ui
+{{ include "zipkin.common.selectorLabels" . }}
+{{- end -}}
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/collector-deploy.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/collector-deploy.yaml
new file mode 100644
index 00000000..fc3a55fc
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/collector-deploy.yaml
@@ -0,0 +1,72 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "zipkin.collector.fullname" . }}
+  labels:
+    {{- include "zipkin.collector.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.collector.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "zipkin.collector.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      labels:
+        {{- include "zipkin.collector.selectorLabels" . | nindent 8 }}
+    spec:
+    {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      serviceAccountName: {{ include "zipkin.collector.serviceAccountName" . }}
+      containers:
+        - name: {{ .Chart.Name }}-collector
+          image: "{{ .Values.collector.image.repository }}:{{ 
.Values.collector.image.tag | default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.collector.image.pullPolicy }}
+          env:
+            - name: QUERY_PORT
+              value: {{ .Values.collector.service.port | quote }}
+            {{- range .Values.collector.env }}
+            - {{ . | toYaml }}
+            {{- end }}
+          ports:
+            - name: http
+              containerPort: {{ .Values.collector.service.port }}
+              protocol: TCP
+          livenessProbe:
+            httpGet:
+              path: /
+              port: http
+          readinessProbe:
+            httpGet:
+              path: /
+              port: http
+          resources:
+            {{- toYaml .Values.collector.resources | nindent 12 }}
+      {{- with .Values.collector.nodeSelector }}
+      nodeSelector:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+    {{- with .Values.collector.affinity }}
+      affinity:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    {{- with .Values.collector.tolerations }}
+      tolerations:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/collector-hpa.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/collector-hpa.yaml
new file mode 100644
index 00000000..6762afee
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/collector-hpa.yaml
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.collector.hpa.enabled -}}
+apiVersion: autoscaling/v2beta2
+kind: HorizontalPodAutoscaler
+metadata:
+  name: {{ include "zipkin.collector.fullname" . }}
+spec:
+  scaleTargetRef:
+    apiVersion: apps/v1
+    kind: Deployment
+    name: {{ include "zipkin.collector.fullname" . }}
+  minReplicas: {{ .Values.collector.hpa.minReplicas }}
+  maxReplicas: {{ .Values.collector.hpa.maxReplicas }}
+  metrics:
+    {{- range .Values.collector.hpa.metrics -}}
+    - {{ . | toYaml }}
+    {{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/collector-ingress.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/collector-ingress.yaml
new file mode 100644
index 00000000..320bde91
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/collector-ingress.yaml
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.ui.ingress.enabled -}}
+{{- $fullName := include "zipkin.collector.fullname" . -}}
+{{- 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 "zipkin.collector.labels" . | nindent 4 }}
+  {{- with .Values.collector.ingress.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+{{- if .Values.collector.ingress.tls }}
+  tls:
+  {{- range .Values.collector.ingress.tls }}
+    - hosts:
+      {{- range .hosts }}
+        - {{ . | quote }}
+      {{- end }}
+      secretName: {{ .secretName }}
+  {{- end }}
+{{- end }}
+  rules:
+  {{- range .Values.collector.ingress.hosts }}
+    - host: {{ .host | quote }}
+      http:
+        paths:
+        {{- range .paths }}
+          - path: {{ . }}
+            backend:
+              serviceName: {{ $fullName }}
+              servicePort: http
+        {{- end }}
+  {{- end }}
+{{- end }}
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/collector-service.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/collector-service.yaml
new file mode 100644
index 00000000..8ccb0b9c
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/collector-service.yaml
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "zipkin.collector.fullname" . }}
+  labels:
+    {{- include "zipkin.collector.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.collector.service.type }}
+  ports:
+    - port: {{ .Values.collector.service.port }}
+      targetPort: http
+      protocol: TCP
+      name: http
+  selector:
+    {{- include "zipkin.collector.selectorLabels" . | nindent 4 }}
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/collector-serviceaccount.yaml
 
b/deploy/charts/admin-stack/charts/zipkin/templates/collector-serviceaccount.yaml
new file mode 100644
index 00000000..a935f74a
--- /dev/null
+++ 
b/deploy/charts/admin-stack/charts/zipkin/templates/collector-serviceaccount.yaml
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+{{- if .Values.collector.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ include "zipkin.collector.serviceAccountName" . }}
+  labels:
+    {{- include "zipkin.collector.labels" . | nindent 4 }}
+  {{- with .Values.collector.serviceAccount.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+{{- end -}}
diff --git a/deploy/charts/admin-stack/charts/zipkin/templates/dep-cronjob.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/dep-cronjob.yaml
new file mode 100644
index 00000000..87be93c1
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/dep-cronjob.yaml
@@ -0,0 +1,56 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.dependencies.enabled -}}
+apiVersion: batch/v1beta1
+kind: CronJob
+metadata:
+  name: {{ include "zipkin.dependencies.fullname" . }}
+  labels:
+    {{- include "zipkin.dependencies.labels" . | nindent 4 }}
+spec:
+  schedule: "{{ .Values.dependencies.cron }}"
+  concurrencyPolicy: Forbid
+  successfulJobsHistoryLimit: 1
+  failedJobsHistoryLimit: 1
+  jobTemplate:
+    spec:
+      template:
+        metadata:
+          labels:
+            {{- include "zipkin.dependencies.labels" . | nindent 12 }}
+        spec:
+          restartPolicy: Never
+          serviceAccountName: {{ include 
"zipkin.dependencies.serviceAccountName" . }}
+          containers:
+            - name: {{ .Chart.Name }}-dependencies
+              image: "{{ .Values.dependencies.image.repository }}:{{ 
.Values.dependencies.image.repository }}"
+              imagePullPolicy: {{ .Values.dependencies.image.pullPolicy }}
+              resources:
+                {{- toYaml .Values.collector.resources | nindent 16 }}
+          {{- with .Values.collector.nodeSelector }}
+          nodeSelector:
+            {{- toYaml . | nindent 12 }}
+          {{- end }}
+        {{- with .Values.collector.affinity }}
+          affinity:
+            {{- toYaml . | nindent 12 }}
+        {{- end }}
+        {{- with .Values.collector.tolerations }}
+          tolerations:
+            {{- toYaml . | nindent 12 }}
+        {{- end }}
+
+{{- end -}}
\ No newline at end of file
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/dep-serviceaccount.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/dep-serviceaccount.yaml
new file mode 100644
index 00000000..6b26ddd5
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/dep-serviceaccount.yaml
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+{{- if .Values.dependencies.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ include "zipkin.dependencies.serviceAccountName" . }}
+  labels:
+    {{- include "zipkin.dependencies.labels" . | nindent 4 }}
+  {{- with .Values.dependencies.serviceAccount.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+{{- end -}}
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/ui-configmap.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/ui-configmap.yaml
new file mode 100644
index 00000000..e7a89a10
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/ui-configmap.yaml
@@ -0,0 +1,116 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "zipkin.ui.fullname" . }}
+  labels:
+    {{- include "zipkin.ui.labels" . | nindent 4 }}
+data:
+  zipkin.conf.template: |
+    user  nginx nginx;
+    worker_processes  2;
+
+    error_log  /dev/stderr warn;
+    pid        /var/run/nginx.pid;
+
+    daemon off;
+
+    events {
+        worker_connections  1024;
+    }
+
+
+    http {
+        include       /etc/nginx/mime.types;
+        default_type  application/octet-stream;
+
+        log_format  main  '$remote_addr - $remote_user [$time_local] 
"$request" '
+                        '$status $body_bytes_sent "$http_referer" '
+                        '"$http_user_agent" "$http_x_forwarded_for"';
+
+        access_log  /dev/stdout  main;
+
+        sendfile        on;
+        #tcp_nopush     on;
+
+        keepalive_timeout  65;
+
+        gzip  on;
+        gzip_types    application/javascript application/json text/css;
+
+        server_tokens off;
+
+        types {
+            application/font-woff2  woff2;
+        }
+
+        server {
+            listen {{ .Values.ui.service.port }};
+
+            root /var/www/html;
+
+            index index.html;
+
+            # Make site accessible from http://set-ip-address.xip.io
+            server_name localhost;
+
+            charset utf-8;
+
+            # redirect root as UI is hosted under /zipkin
+            location / {
+            return 302 /zipkin/;
+            }
+
+            # the entrypoint of the app will expire every day.
+            # this includes links to js assets with random names.
+            location /zipkin/index.html {
+                expires 1d;
+            }
+
+            location /zipkin {
+            try_files $uri /zipkin/index.html = 404;
+            }
+
+            # accept UI config from the server
+            location /zipkin/config.json {
+                expires 10m;
+                proxy_pass ${ZIPKIN_BASE_URL};
+            }
+
+            # the UI looks for the api under the same relative path
+            location /zipkin/api {
+                expires off;
+                proxy_pass ${ZIPKIN_BASE_URL};
+            }
+
+            # due to minification, the js assets will change names.
+            # this makes them safe to cache longer
+            location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
+                expires 1y;
+                add_header Cache-Control "public";
+            }
+
+            location = /favicon.ico { log_not_found off; access_log off; }
+            location = /robots.txt  { access_log off; log_not_found off; }
+
+            # Deny .htaccess file access
+            location ~ /\.ht {
+                deny all;
+            }
+
+        }
+    }
\ No newline at end of file
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/ui-deployment.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/ui-deployment.yaml
new file mode 100644
index 00000000..01622ab0
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/ui-deployment.yaml
@@ -0,0 +1,77 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "zipkin.ui.fullname" . }}
+  labels:
+    {{- include "zipkin.ui.labels" . | nindent 4 }}
+spec:
+  replicas: {{ .Values.ui.replicaCount }}
+  selector:
+    matchLabels:
+      {{- include "zipkin.ui.selectorLabels" . | nindent 6 }}
+  template:
+    metadata:
+      labels:
+        {{- include "zipkin.ui.selectorLabels" . | nindent 8 }}
+    spec:
+    {{- with .Values.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+      serviceAccountName: {{ include "zipkin.ui.serviceAccountName" . }}
+      volumes:
+        - name: config
+          configMap:
+            name: {{ include "zipkin.ui.fullname" . }}
+      containers:
+        - name: {{ .Chart.Name }}-ui
+          image: "{{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag | 
default .Chart.AppVersion }}"
+          imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
+          volumeMounts:
+            - name: config
+              mountPath: /etc/nginx/conf.d/zipkin.conf.template
+              subPath: zipkin.conf.template
+          env:
+            - name: ZIPKIN_BASE_URL
+              value: {{ include "zipkin.collector.service.uri" . | quote }}
+          ports:
+            - name: http
+              containerPort: {{ .Values.ui.service.port }}
+              protocol: TCP
+          livenessProbe:
+            httpGet:
+              path: /
+              port: http
+          readinessProbe:
+            httpGet:
+              path: /
+              port: http
+          resources:
+            {{- toYaml .Values.ui.resources | nindent 12 }}
+      {{- with .Values.ui.nodeSelector }}
+      nodeSelector:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+    {{- with .Values.ui.affinity }}
+      affinity:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
+    {{- with .Values.ui.tolerations }}
+      tolerations:
+        {{- toYaml . | nindent 8 }}
+    {{- end }}
diff --git a/deploy/charts/admin-stack/charts/zipkin/templates/ui-hpa.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/ui-hpa.yaml
new file mode 100644
index 00000000..afad5d4c
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/ui-hpa.yaml
@@ -0,0 +1,32 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.ui.hpa.enabled -}}
+apiVersion: autoscaling/v2beta2
+kind: HorizontalPodAutoscaler
+metadata:
+  name: {{ include "zipkin.ui.fullname" . }}
+spec:
+  scaleTargetRef:
+    apiVersion: apps/v1
+    kind: Deployment
+    name: {{ include "zipkin.ui.fullname" . }}
+  minReplicas: {{ .Values.ui.hpa.minReplicas }}
+  maxReplicas: {{ .Values.ui.hpa.maxReplicas }}
+  metrics:
+    {{- range .Values.ui.hpa.metrics -}}
+    - {{ . | toYaml }}
+    {{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git a/deploy/charts/admin-stack/charts/zipkin/templates/ui-ingress.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/ui-ingress.yaml
new file mode 100644
index 00000000..b561de53
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/ui-ingress.yaml
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+{{- if .Values.ui.ingress.enabled -}}
+{{- $fullName := include "zipkin.ui.fullname" . -}}
+{{- 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 "zipkin.ui.labels" . | nindent 4 }}
+  {{- with .Values.ui.ingress.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+{{- if .Values.ui.ingress.tls }}
+  tls:
+  {{- range .Values.ui.ingress.tls }}
+    - hosts:
+      {{- range .hosts }}
+        - {{ . | quote }}
+      {{- end }}
+      secretName: {{ .secretName }}
+  {{- end }}
+{{- end }}
+  rules:
+  {{- range .Values.ui.ingress.hosts }}
+    - host: {{ .host | quote }}
+      http:
+        paths:
+        {{- range .paths }}
+          - path: {{ . }}
+            backend:
+              serviceName: {{ $fullName }}
+              servicePort: http
+        {{- end }}
+  {{- end }}
+{{- end }}
diff --git a/deploy/charts/admin-stack/charts/zipkin/templates/ui-service.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/ui-service.yaml
new file mode 100644
index 00000000..80918719
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/ui-service.yaml
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "zipkin.ui.fullname" . }}
+  labels:
+    {{- include "zipkin.ui.labels" . | nindent 4 }}
+spec:
+  type: {{ .Values.ui.service.type }}
+  ports:
+    - port: {{ .Values.ui.service.port }}
+      targetPort: http
+      protocol: TCP
+      name: http
+  selector:
+    {{- include "zipkin.ui.selectorLabels" . | nindent 4 }}
diff --git 
a/deploy/charts/admin-stack/charts/zipkin/templates/ui-serviceaccount.yaml 
b/deploy/charts/admin-stack/charts/zipkin/templates/ui-serviceaccount.yaml
new file mode 100644
index 00000000..b04ce192
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/templates/ui-serviceaccount.yaml
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+{{- if .Values.ui.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ include "zipkin.ui.serviceAccountName" . }}
+  labels:
+    {{- include "zipkin.ui.labels" . | nindent 4 }}
+  {{- with .Values.ui.serviceAccount.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+{{- end -}}
diff --git a/deploy/charts/admin-stack/charts/zipkin/values.yaml 
b/deploy/charts/admin-stack/charts/zipkin/values.yaml
new file mode 100644
index 00000000..669d845d
--- /dev/null
+++ b/deploy/charts/admin-stack/charts/zipkin/values.yaml
@@ -0,0 +1,171 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+imagePullSecrets: []
+nameOverride: ""
+fullnameOverride: ""
+
+collector:
+  replicaCount: 1
+  hpa:
+    enabled: false
+    minReplicas: 1
+    maxReplicas: 5
+    metrics: []
+    # - type: Resource
+    #   resource:
+    #     name: cpu
+    #     target:
+    #       type: Utilization
+    #       averageUtilization: 50
+
+  image:
+    repository: openzipkin/zipkin
+    tag:  # defaults to Chart.AppVersion unless this is set
+    pullPolicy: IfNotPresent
+
+  serviceAccount:
+    # Specifies whether a service account should be created
+    create: true
+    # 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:
+
+  service:
+    type: ClusterIP
+    port: 9411
+
+  ingress:
+    enabled: false
+    annotations: {}
+      # kubernetes.io/ingress.class: nginx
+      # kubernetes.io/tls-acme: "true"
+    hosts:
+      - host: collector.local
+        paths: []
+    tls: []
+    #  - secretName: collector-tls
+    #    hosts:
+    #      - collector.local
+
+  resources: {}
+    # limits:
+    #   cpu: 100m
+    #   memory: 128Mi
+    # requests:
+    #   cpu: 100m
+    #   memory: 128Mi
+
+  nodeSelector: {}
+
+  tolerations: []
+
+  affinity: {}
+
+ui:
+  replicaCount: 1
+  hpa:
+    enabled: false
+    minReplicas: 1
+    maxReplicas: 5
+    metrics: []
+    # - type: Resource
+    #   resource:
+    #     name: cpu
+    #     target:
+    #       type: Utilization
+    #       averageUtilization: 50
+
+  image:
+    repository: openzipkin/zipkin-ui
+    tag:  # defaults to Chart.AppVersion unless this is set
+    pullPolicy: IfNotPresent
+  # 
https://github.com/openzipkin/zipkin/tree/master/zipkin-server#configuration
+  env: []
+
+  serviceAccount:
+    # Specifies whether a service account should be created
+    create: true
+    # 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:
+
+  service:
+    type: ClusterIP
+    port: 8080
+
+  ingress:
+    enabled: false
+    annotations: {}
+      # kubernetes.io/ingress.class: nginx
+      # kubernetes.io/tls-acme: "true"
+    hosts:
+      - host: tracing.local
+        paths: []
+    tls: []
+    #  - secretName: tracing-tls
+    #    hosts:
+    #      - tracing.local
+
+  resources: {}
+    # limits:
+    #   cpu: 100m
+    #   memory: 128Mi
+    # requests:
+    #   cpu: 100m
+    #   memory: 128Mi
+
+  nodeSelector: {}
+
+  tolerations: []
+
+  affinity: {}
+
+dependencies:
+  enabled: false
+
+  cron: "* 0 * * *"
+
+  image:
+    repository: openzipkin/zipkin-dependencies
+    tag: "2.4.1"
+    pullPolicy: IfNotPresent
+
+  serviceAccount:
+    # Specifies whether a service account should be created
+    create: true
+    # 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:
+
+  resources: {}
+    # limits:
+    #   cpu: 100m
+    #   memory: 128Mi
+    # requests:
+    #   cpu: 100m
+    #   memory: 128Mi
+
+  nodeSelector: {}
+
+  tolerations: []
+
+  affinity: {}


Reply via email to