Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
correct tls source settings (#238)
Browse files Browse the repository at this point in the history
Signed-off-by: gforeman <[email protected]>

Co-authored-by: Sebastien Dupont <[email protected]>
  • Loading branch information
gforeman02 and banzo authored Mar 15, 2022
1 parent 8e08e28 commit ceca5ad
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,18 +197,25 @@ spec:
done
echo === end of files ===

function prop () {
target_file=${NIFI_HOME}/conf/nifi.properties
egrep "^${1}=" ${target_file} | cut -d'=' -f2
}

function offloadNode() {
FQDN=$(hostname -f)
echo "disconnecting node '$FQDN'"
baseUrl=https://${FQDN}:{{ .Values.properties.httpsPort }}

keystore=${NIFI_HOME}/config-data/certs/keystore.jks
keystorePasswd=$(jq -r .keyStorePassword ${NIFI_HOME}/config-data/certs/config.json)
keyPasswd=$(jq -r .keyPassword ${NIFI_HOME}/config-data/certs/config.json)
truststore=${NIFI_HOME}/config-data/certs/truststore.jks
truststorePasswd=$(jq -r .trustStorePassword ${NIFI_HOME}/config-data/certs/config.json)

secureArgs=" --truststore ${truststore} --truststoreType JKS --truststorePasswd ${truststorePasswd} --keystore ${keystore} --keystoreType JKS --keystorePasswd ${keystorePasswd} --proxiedEntity "{{ .Values.auth.admin }}""
echo "keystoreType=$(prop nifi.security.keystoreType)" > secure.properties
echo "keystore=$(prop nifi.security.keystore)" >> secure.properties
echo "keystorePasswd=$(prop nifi.security.keystorePasswd)" >> secure.properties
echo "truststoreType=$(prop nifi.security.truststoreType)" >> secure.properties
echo "truststore=$(prop nifi.security.truststore)" >> secure.properties
echo "truststorePasswd=$(prop nifi.security.truststorePasswd)" >> secure.properties
echo "proxiedEntity={{ .Values.auth.admin }}" >> secure.properties

secureArgs="-p secure.properties"

echo baseUrl ${baseUrl}
echo "gracefully disconnecting node '$FQDN' from cluster"
Expand Down

0 comments on commit ceca5ad

Please sign in to comment.