This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-helm.git
The following commit(s) were added to refs/heads/master by this push:
new 3eb9fc8 Add doc to re-run OAP init job (#144)
3eb9fc8 is described below
commit 3eb9fc8235fd3a773650d1f08adfccfd5d0745fc
Author: kezhenxu94 <[email protected]>
AuthorDate: Tue Feb 27 16:39:56 2024 +0800
Add doc to re-run OAP init job (#144)
---
README.md | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/README.md b/README.md
index 196b725..66853ba 100644
--- a/README.md
+++ b/README.md
@@ -213,6 +213,24 @@ You can set those environment variables by `--set
oap.env.<ENV_NAME>=<ENV_VALUE>
> The environment variables take priority over the overrode configuration
> files.
+## Rerun OAP init job
+
+Kubernetes Job cannot be rerun by default, if you want to rerun the OAP init
+job, you need to delete the Job and recreate it.
+
+```shell
+# Make sure to export the Job manifest to a file before deleting it.
+kubectl get job -n "${SKYWALKING_RELEASE_NAMESPACE}" -l
release=$SKYWALKING_RELEASE_NAME -o yaml > oap-init.job.yaml
+# Trim the Job manifest to keep only the Job part, you can either download yq
from https://github.com/mikefarah/yq or
+# manually remove the fields that are not needed.
+yq
'del(.items[0].metadata.creationTimestamp,.items[0].metadata.resourceVersion,.items[0].metadata.uid,.items[0].status,.items[0].spec.template.metadata.labels."batch.kubernetes.io/controller-uid",.items[0].spec.template.metadata.labels."controller-uid",.items[0].spec.selector.matchLabels."batch.kubernetes.io/controller-uid")'
oap-init.job.yaml > oap-init.job.trimmed.yaml
+# Check the file oap-init.job.trimmed.yaml to make sure it has correct content
+# Delete the Job
+kubectl delete job -n "${SKYWALKING_RELEASE_NAMESPACE}" -l
release=$SKYWALKING_RELEASE_NAME
+# Create the Job
+kubectl -n "${SKYWALKING_RELEASE_NAMESPACE}" apply -f oap-init.job.trimmed.yaml
+```
+
# Contact Us
* Submit an [issue](https://github.com/apache/skywalking/issues)
* Mail list: **[email protected]**. Mail to
`[email protected]`, follow the reply to subscribe the mail
list.