-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jecos
committed
Mar 8, 2024
1 parent
5ec9f89
commit 60da4f8
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |