-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathREADME.md.gotmpl
More file actions
170 lines (126 loc) · 7.08 KB
/
Copy pathREADME.md.gotmpl
File metadata and controls
170 lines (126 loc) · 7.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
tika-helm
=========
[](https://artifacthub.io/packages/helm/apache-tika/tika)
{{ template "chart.versionBadge" . }}
{{ template "chart.typeBadge" . }}
{{ template "chart.appVersionBadge" . }}
<div class="artifacthub-widget" data-url="https://artifacthub.io/packages/helm/apache-tika/tika" data-theme="dark" data-header="true" data-stars="true" data-responsive="true"><blockquote><p lang="en" dir="ltr"><b>tika</b>: The official Helm chart for Apache Tika</p>— Open in <a href="https://artifacthub.io/packages/helm/apache-tika/tika">Artifact Hub</a></blockquote></div>
<img src="https://tika.apache.org/tika.png" width="300" />
We recommend that the Helm chart version is aligned to the version Tika (and subsequently the
version of the [Tika Docker image][]) you want to deploy.
This will ensure that you using a chart version that has been tested against the corresponding
production version. This will also ensure that the documentation and examples for the chart
will work with the version of Tika you are installing.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Installing](#installing)
- [Install released version from Helm OCI registry](#install-released-version-from-helm-oci-registry)
- [Install development version using main branch](#install-development-version-using-main-branch)
- [Custom configuration for tika](#custom-configuration-for-tika)
- [Upgrading](#upgrading)
- [Values](#values)
- [Testing](#testing)
- [Contributing](#contributing)
- [More Information](#more-information)
- [License](#license)
- [Maintainers](#maintainers)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- Use this to update TOC: -->
<!-- docker run --rm -it -v $(pwd):/usr/src jorgeandrada/doctoc --github -->
## Installing
### Install released version from Helm OCI registry
Charts are published to the [Tika Helm OCI repository](https://apache.jfrog.io/ui/repos/tree/General/tika-helm?projectKey=tika) on Apache JFrog Artifactory. Install directly from the OCI registry (Helm 3.8+).
**N.B.** You may or may not need/wish to install the chart into a specific **namespace**,
in which case you may need to augment the commands below.
* If the registry requires authentication (e.g. for private access), log in first:
`helm registry login apache.jfrog.io --username <your-username> --password <your-password>`
* **Snapshot builds from `main`:** Each merge publishes a chart to the same OCI repository with version `{chart_version}-{git_short_sha}` (for example `3.2.3-a1b2c3d`). These are not official releases. Use `helm install` or `helm pull` with that version and the OCI URL below.
* Install from OCI (replace `<version>` with the chart version you want, e.g. `3.2.3`):
- with Helm 3: `helm install tika oci://apache.jfrog.io/tika-helm/tika --version <version> --set image.tag=<app-version> -n tika-test`
- Example:
```console
helm install tika oci://apache.jfrog.io/tika-helm/tika --version 3.2.3 --set image.tag=latest-full -n tika-test
```
Example installation notes:
```text
NAME: tika
LAST DEPLOYED: Mon Jan 24 13:38:01 2022
NAMESPACE: tika-test
STATUS: deployed
REVISION: 1
NOTES:
1. Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace tika-test -l "app.kubernetes.io/name=tika,app.kubernetes.io/instance=tika" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace tika-test $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:9998 to use your application"
kubectl --namespace tika-test port-forward $POD_NAME 9998:$CONTAINER_PORT
```
You may notice that the _kubectl port forwarding_ experiences a _timeout issue_ which ultimately kills the app. In this case you can run port forwarding in a loop:
```console
while true; do kubectl --namespace tika-test port-forward $POD_NAME 9998:$CONTAINER_PORT ; done
```
This should keep `kubectl` reconnecting on connection lost.
**Note:** The classic Helm repository (`helm repo add tika https://apache.jfrog.io/artifactory/tika`) is deprecated. Official releases and `main`-branch snapshot charts are published to the Helm OCI repository above.
### Install development version using main branch
* Clone the git repo: `git clone git@github.com:apache/tika-helm.git`
* Install it:
- with Helm 3: `helm install tika . --set image.tag=latest-full`
### Custom configuration for tika
To use custom [configuration]( https://tika.apache.org/2.9.1/configuring.html) values for apache tika, use the `tikaConfig` key in the `values.yaml`.
Example:
```
tikaConfig: |
<?xml version="1.0" encoding="UTF-8"?>
<properties>
<mtrandata>
<mime-table-path>/tika-config/custom-mimetypes.xml</mime-table-path>
</mtrandata>
<parsers>
<!-- Default Parser for most things, except for 2 mime types -->
<parser class="org.apache.tika.parser.DefaultParser">
<mime-exclude>image/jpeg</mime-exclude>
<mime-exclude>application/pdf</mime-exclude>
</parser>
</parsers>
</properties>
additionalConfigs:
custom-mimetypes.xml: |
<?xml version="1.0" encoding="UTF-8"?>
<mime-info>
<mime-type type="application/pdf">
<magic priority="80">
<match value="%PDF-" type="string" offset="0:8192"/>
</magic>
<glob pattern="*.pdf"/>
</mime-type>
</mime-info>
```
## Upgrading
Please check `artifacthub.io/changes` in `Chart.yaml` before upgrading.
{{ template "chart.valuesSectionHtml" . }}
## Testing
```
helm plugin install https://github.com/helm-unittest/helm-unittest.git
helm unittest .
```
See [helm-unittest][] for canonical documentation.
## Contributing
Please check [CONTRIBUTING][] before any contribution or for any questions
about our development and testing process.
## More Information
For more infomation on Apache Tika Server, go to the [Apache Tika Server documentation][].
For more information on Apache Tika, go to the official [Apache Tika][] project website.
For more information on the Apache Software Foundation, go to the [Apache Software Foundation][] website.
## License
The code is licensed permissively under the [Apache License v2.0][].
{{ template "chart.maintainersSection" . }}
{{ template "helm-docs.versionFooter" . }}
[Apache License v2.0]: https://www.apache.org/licenses/LICENSE-2.0.html
[Apache Software Foundation]: http://apache.org
[Apache Tika]: https://tika.apache.org
[Apache Tika Server documentation]: https://cwiki.apache.org/confluence/display/TIKA/TikaServer
[BREAKING_CHANGES.md]: https://github.com/apache/tika-helm/blob/master/BREAKING_CHANGES.md
[CHANGELOG.md]: https://github.com/apache/tika-helm/blob/master/CHANGELOG.md
[CONTRIBUTING]: https://github.com/apache/tika/blob/main/CONTRIBUTING.md
[helm-unittest]: https://github.com/helm-unittest/helm-unittest
[Tika Docker image]: https://hub.docker.com/r/apache/tika/tags?page=1&ordering=last_updated