Skip to content

Commit

Permalink
feat: CQDG-642 Add template file
Browse files Browse the repository at this point in the history
  • Loading branch information
jecos committed Mar 8, 2024
1 parent 5ec9f89 commit 60da4f8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions index-task/pod_templates/pod-template-es-cert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## This template is used to create a pod that will be used to import the OpenSearch CA certificate into the truststore of the Spark driver and executor pods.
apiVersion: v1
kind: Pod

spec:
containers:
- name: spark
image: busybox:1.28 # will be overriden by spark
volumeMounts:
- mountPath: /opt/keystores
name: keystore-volume
initContainers:
- name: init-es-certificate
image: amazoncorretto:11
command: ['sh', '-c', "keytool -importkeystore -noprompt -srckeystore /etc/pki/java/cacerts -destkeystore /opt/keystores/truststore.p12 -srcstoretype PKCS12 -deststoretype PKCS12 -srcstorepass changeit -storepass changeit && keytool -import -noprompt -keystore /opt/keystores/truststore.p12 -file /opt/es-ca/ca.crt -storepass changeit -alias es"]
volumeMounts:
- mountPath: /opt/keystores
name: keystore-volume
- name: es-ca-cert
mountPath: /opt/es-ca
readOnly: true
volumes:
- name: keystore-volume
emptyDir: {}
- name: es-ca-cert
secret:
secretName: opensearch-ca-certificate
defaultMode: 0555

0 comments on commit 60da4f8

Please sign in to comment.