Skip to content

Commit

Permalink
[digital ocean] Removed s3 mount
Browse files Browse the repository at this point in the history
  • Loading branch information
welbon committed Dec 10, 2024
1 parent c14e367 commit 20fa7fa
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions kube/elasticsearch/elasticsearch-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ spec:
- name: elasticsearch-config
mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
subPath: elasticsearch.yml
# - name: s3-mount-point
# mountPath: /mnt/s3_mount

env:
- name: discovery.type
value: single-node
Expand All @@ -60,25 +59,7 @@ spec:
secretKeyRef:
name: elasticsearch
key: password
# S3 配置
- name: S3_CLIENT_DEFAULT_REGION
value: "ap-northeast-1"
- name: S3_CLIENT_ACCESS_KEY
valueFrom:
secretKeyRef:
name: aws-credentials
key: access-key
- name: S3_CLIENT_SECRET_KEY
valueFrom:
secretKeyRef:
name: aws-credentials
key: secret-key
lifecycle:
postStart:
exec:
command: ["/bin/bash", "-c", "/usr/share/elasticsearch/bin/elasticsearch-plugin list | grep -q repository-s3 || /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch repository-s3 && \
echo ${S3_CLIENT_ACCESS_KEY} | /usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.default.access_key --stdin &&\
echo ${S3_CLIENT_SECRET_KEY} | /usr/share/elasticsearch/bin/elasticsearch-keystore add s3.client.default.secret_key --stdin"]

volumes:
- name: es-data
persistentVolumeClaim:
Expand Down

0 comments on commit 20fa7fa

Please sign in to comment.