mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-23 12:06:20 +10:00
* [bitnami/solr] Chart standardized Signed-off-by: juan131 <juanariza@vmware.com> * Including missing parameters Signed-off-by: juan131 <juanariza@vmware.com> * Update deps + requested changes Signed-off-by: juan131 <juanariza@vmware.com> * Add kubeVersion Signed-off-by: juan131 <juanariza@vmware.com> * [bitnami/solr] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Bitnami Containers <containers@bitnami.com>
45 lines
2.1 KiB
YAML
45 lines
2.1 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ printf "%s-scripts" (include "common.names.fullname" .) }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: solr
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
data:
|
|
init-certs.sh: |-
|
|
#!/bin/bash
|
|
|
|
if [[ -f "/certs/ca.crt" ]] && [[ -f "/certs/tls.key" ]] && [[ -f "/certs/tls.crt" ]]; then
|
|
openssl pkcs12 -export -in "/certs/tls.crt" \
|
|
-inkey "/certs/tls.key" -out "/tmp/keystore.p12" \
|
|
-passin pass:"/certs/tls.key" -passout pass:"${SOLR_SSL_KEY_STORE_PASSWORD}"
|
|
keytool -importkeystore -srckeystore "/tmp/keystore.p12" \
|
|
-srcstoretype PKCS12 \
|
|
-srcstorepass "${SOLR_SSL_KEY_STORE_PASSWORD}" \
|
|
-deststorepass "${SOLR_SSL_KEY_STORE_PASSWORD}" \
|
|
-destkeystore "/opt/bitnami/solr/certs/keystore.p12"
|
|
rm "/tmp/keystore.p12"
|
|
keytool -import -file "/certs/ca.crt" -keystore "/opt/bitnami/solr/certs/truststore.p12" -storepass "${SOLR_SSL_TRUST_STORE_PASSWORD}" -noprompt
|
|
else
|
|
cp "/certs/keystore.p12" "/opt/bitnami/solr/certs/keystore.p12"
|
|
cp "/certs/truststore.p12" "/opt/bitnami/solr/certs/truststore.p12"
|
|
fi
|
|
setup.sh: |-
|
|
#!/bin/bash
|
|
|
|
{{- if .Values.cloudBootstrap }}
|
|
NODE_ID="${MY_POD_NAME#"{{ include "common.names.fullname" . }}-"}"
|
|
if [[ "$NODE_ID" -eq "0" ]]; then
|
|
export SOLR_CLOUD_BOOTSTRAP=yes
|
|
fi
|
|
{{- end }}
|
|
# Use hostname instead of IP to register in ZooKeeper
|
|
export SOLR_HOST="${MY_POD_NAME}.{{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
|
|
/opt/bitnami/scripts/solr/entrypoint.sh /opt/bitnami/scripts/solr/run.sh
|