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

Elasticsearch secret mountmode #596

Merged
merged 2 commits into from
May 28, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added test for defaultMode on secret mount
  • Loading branch information
domgoodwin committed Apr 23, 2020
commit 8a48458141728449a0d2e74bca485ff4e00e649d
18 changes: 18 additions & 0 deletions elasticsearch/tests/elasticsearch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,24 @@ def test_adding_a_secret_mount_with_subpath():
}


def test_adding_a_secret_mount_with_default_mode():
config = """
secretMounts:
- name: elastic-certificates
secretName: elastic-certs
path: /usr/share/elasticsearch/config/certs
subPath: cert.crt
defaultMode: 0755
"""
r = helm_template(config)
s = r["statefulset"][uname]["spec"]["template"]["spec"]
assert s["containers"][0]["volumeMounts"][-1] == {
"mountPath": "/usr/share/elasticsearch/config/certs",
"subPath": "cert.crt",
"name": "elastic-certificates",
}


def test_adding_image_pull_secrets():
config = """
imagePullSecrets:
Expand Down