You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2022/11/17 10:52:29 UTC

[skywalking-kubernetes] branch master updated: Remove `.Values.oap.initEs` and replace with Helm Hooks (#95)

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

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-kubernetes.git


The following commit(s) were added to refs/heads/master by this push:
     new 7058fe7  Remove `.Values.oap.initEs` and replace with Helm Hooks (#95)
7058fe7 is described below

commit 7058fe7d3344f41c77b82974c5d0c5630beb5cff
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Thu Nov 17 18:52:25 2022 +0800

    Remove `.Values.oap.initEs` and replace with Helm Hooks (#95)
---
 README.md                                                          | 1 -
 chart/skywalking/README.md                                         | 5 ++---
 chart/skywalking/templates/{es-init.job.yaml => oap-init.job.yaml} | 5 +++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 9a89adb..f3f0d03 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,6 @@ There are required values that you must set explicitly when deploying SkyWalking
 | ---- | ----------- | ------- |
 | `oap.image.tag` | the OAP docker image tag | `9.2.0` |
 | `oap.storageType` | the storage type of the OAP | `elasticsearch`, `postgresql`, etc. |
-| `oap.initEs`   | need to initial ElasticSearch  | `true`, `false` |
 | `ui.image.tag` | the UI docker image tag | `9.2.0` |
 
 You can set these required values via command line (e.g. `--set oap.image.tag=9.2.0 --set oap.storageType=elasticsearch`),
diff --git a/chart/skywalking/README.md b/chart/skywalking/README.md
index f845bbe..d629244 100644
--- a/chart/skywalking/README.md
+++ b/chart/skywalking/README.md
@@ -8,7 +8,7 @@ This chart bootstraps a [Apache SkyWalking](https://skywalking.apache.org/) depl
 
 ## Prerequisites
 
- - Kubernetes 1.9.6+ 
+ - Kubernetes 1.9.6+
  - PV dynamic provisioning support on the underlying infrastructure (StorageClass)
  - Helm 3
 
@@ -45,7 +45,6 @@ The following table lists the configurable parameters of the Skywalking chart an
 | `imagePullSecrets`                                           | Image pull secrets                                                                               | `[]`                                 |
 | `oap.name`                                                   | OAP deployment name                                                                              | `oap`                                |
 | `oap.dynamicConfigEnabled`                                     | Enable oap dynamic configuration through k8s configmap                                           | `false`                              |
-| `oap.initEs`                                                 | Need to initial ElasticSearch                                                                    | `true`                              |
 | `oap.image.repository`                                       | OAP container image name                                                                         | `skywalking.docker.scarf.sh/apache/skywalking-oap-server`       |
 | `oap.image.tag`                                              | OAP container image tag                                                                          | `6.1.0`                              |
 | `oap.image.pullPolicy`                                       | OAP container image pull policy                                                                  | `IfNotPresent`                       |
@@ -218,7 +217,7 @@ ui:
 
 Envoy ALS(access log service) provides fully logs about RPC routed, including HTTP and TCP.
 
-If you want to open envoy ALS, you can do this by modifying values.yaml. 
+If you want to open envoy ALS, you can do this by modifying values.yaml.
 
 ```yaml
 oap:
diff --git a/chart/skywalking/templates/es-init.job.yaml b/chart/skywalking/templates/oap-init.job.yaml
similarity index 97%
rename from chart/skywalking/templates/es-init.job.yaml
rename to chart/skywalking/templates/oap-init.job.yaml
index f030cc8..60db860 100644
--- a/chart/skywalking/templates/es-init.job.yaml
+++ b/chart/skywalking/templates/oap-init.job.yaml
@@ -15,7 +15,6 @@
 
 # https://docs.sentry.io/server/installation/docker/#running-migrations
 
-{{- if and .Values.oap.initEs (contains "elasticsearch" .Values.oap.storageType) }}
 apiVersion: batch/v1
 kind: Job
 metadata:
@@ -26,6 +25,9 @@ metadata:
     component: "{{ template "skywalking.fullname" . }}-job"
     heritage: {{ .Release.Service }}
     release: {{ .Release.Name }}
+  annotations:
+    "helm.sh/hook": post-install,post-upgrade
+    "helm.sh/hook-weight": "1"
 spec:
   template:
     metadata:
@@ -105,4 +107,3 @@ spec:
           configMap:
             name: {{ template "skywalking.fullname" . }}-oap-cm-override
         {{- end }}
-{{- end}}