Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[kibana] Error when adding kibana-keystore as k8s secret mount #229

Closed
JanKowalik opened this issue Jul 22, 2019 · 2 comments · Fixed by #230
Closed

[kibana] Error when adding kibana-keystore as k8s secret mount #229

JanKowalik opened this issue Jul 22, 2019 · 2 comments · Fixed by #230

Comments

@JanKowalik
Copy link

JanKowalik commented Jul 22, 2019

Chart version:
7.2.0
Kubernetes version:
v0.6.1
Kubernetes provider: E.g. GKE (Google Kubernetes Engine)
k3s
Helm Version:
2.14.1

Describe the bug:
I generate kibana manifests using helm and then apply them to my k3s cluster.
My kibana values are attached together with a manifest produced by the helm chart

Kibana-keystore was created within a docker container using the same version of Kibana image. It was filled with elasticsearch.username and elasticsearch.password

A secret was created using the below command:
kubectl create secret generic kibana-keystore --from-file=./kibana-keystore/kibana.keystore

After applying the secret and the manifest to kubernetes cluster kibana pod shows following error:

Configuring logger failed: { Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (fs.js:494:3)
    at tryReadSync (fs.js:333:20)
    at readFileSync (fs.js:370:19)
    at Keystore.load (/usr/share/kibana/src/server/keystore/keystore.js:97:45)
    at new Keystore (/usr/share/kibana/src/server/keystore/keystore.js:46:10)
    at readKeystore (/usr/share/kibana/src/cli/serve/read_keystore.js:40:20)
    at applyConfigOverrides (/usr/share/kibana/src/cli/serve/serve.js:186:41)
    at applyConfigOverrides (/usr/share/kibana/src/cli/serve/serve.js:50:42)
    at config_1.RawConfigService.rawConfig (/usr/share/kibana/src/core/server/bootstrap.js:33:134)
    at MapSubscriber.RawConfigService.config$.rawConfigFromFile$.pipe.operators_1.map.rawConfig [as project] (/usr/share/kibana/src/core/server/config/raw_config_service.js:41:24) errno: -21, syscall: 'read', code: 'EISDIR' }

 FATAL  Error: EISDIR: illegal operation on a directory, read

This is probably related/similar to #90

Crazybus added a commit that referenced this issue Jul 22, 2019
Fixes: #229

This is needed in situation where you need to mount a specific secret as
a file in a directory that contains other files. This was added for the
Elasticsearch chart to make it possible to mount the keystore, the same
option is needed for Kibana too as seen in in #229.
Crazybus added a commit that referenced this issue Jul 22, 2019
Fixes: #229

This is needed in situation where you need to mount a specific secret as
a file in a directory that contains other files. This was added for the
Elasticsearch chart to make it possible to mount the keystore, the same
option is needed for Kibana too as seen in in #229.
@Crazybus
Copy link
Contributor

I have opened a fix in #230. The problem was that the subPath key was being ignored. This is implemented in the Elasticsearch chart but not in the Kibana chart. Can you try out that branch and see if it is working for you now?

Error: EISDIR: illegal operation on a directory, read

Because subPath was being ignored the keystore was actually mounted at /usr/share/kibana/data/kibana.keystore/kibana.keystore instead.

@JanKowalik
Copy link
Author

JanKowalik commented Jul 22, 2019

Good stuff. It works.
Weird cause I thought I had tried to add the subPath before, as I noticed it is missing. I guess I had not actually done that.

Thanks

Crazybus added a commit that referenced this issue Jul 23, 2019
Fixes: #229

This is needed in situation where you need to mount a specific secret as
a file in a directory that contains other files. This was added for the
Elasticsearch chart to make it possible to mount the keystore, the same
option is needed for Kibana too as seen in in #229.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants