Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework config map's #154

Merged
merged 2 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions charts/ccsm-helm/charts/zeebe-gateway/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,6 @@ metadata:
labels: {{- include "zeebe.labels.gateway" . | nindent 4 }}
apiVersion: v1
data:
startup.sh: |
#!/usr/bin/env bash
set -eux -o pipefail

export ZEEBE_BROKER_NETWORK_ADVERTISEDHOST=${ZEEBE_BROKER_NETWORK_ADVERTISEDHOST:-$(hostname -f)}
export ZEEBE_BROKER_CLUSTER_NODEID=${ZEEBE_BROKER_CLUSTER_NODEID:-${K8S_POD_NAME##*-}}

# As the number of replicas or the DNS is not obtainable from the downward API yet,
# defined them here based on conventions
export ZEEBE_BROKER_CLUSTER_CLUSTERSIZE=${ZEEBE_BROKER_CLUSTER_CLUSTERSIZE:-1}
contactPointPrefix=${K8S_POD_NAME%-*}
contactPoints=${ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS:-""}
if [[ -z "${contactPoints}" ]]; then
for ((i=0; i<${ZEEBE_BROKER_CLUSTER_CLUSTERSIZE}; i++))
do
contactPoints="${contactPoints},${contactPointPrefix}-$i.$(hostname -d):{{ .Values.service.internalPort }}"
done

export ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS="${contactPoints}"
fi

if [ "$(ls -A /exporters/)" ]; then
mkdir /usr/local/zeebe/exporters/
cp -a /exporters/*.jar /usr/local/zeebe/exporters/
else
echo "No exporters available."
fi

exec /usr/local/zeebe/bin/broker

gateway-log4j2.xml: |
{{- if .Values.log4j2 }}
{{ .Values.log4j2 | indent 4 | trim }}
Expand Down
20 changes: 3 additions & 17 deletions charts/ccsm-helm/charts/zeebe/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,16 @@ data:
#!/usr/bin/env bash
set -eux -o pipefail

export ZEEBE_BROKER_NETWORK_ADVERTISEDHOST=${ZEEBE_BROKER_NETWORK_ADVERTISEDHOST:-$(hostname -f)}
export ZEEBE_BROKER_CLUSTER_NODEID=${ZEEBE_BROKER_CLUSTER_NODEID:-${K8S_POD_NAME##*-}}
export ZEEBE_BROKER_CLUSTER_NODEID=${ZEEBE_BROKER_CLUSTER_NODEID:-${K8S_NAME##*-}}

# As the number of replicas or the DNS is not obtainable from the downward API yet,
# defined them here based on conventions
export ZEEBE_BROKER_CLUSTER_CLUSTERSIZE=${ZEEBE_BROKER_CLUSTER_CLUSTERSIZE:-1}
contactPointPrefix=${K8S_POD_NAME%-*}
contactPoints=${ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS:-""}
if [[ -z "${contactPoints}" ]]; then
for ((i=0; i<${ZEEBE_BROKER_CLUSTER_CLUSTERSIZE}; i++))
do
contactPoints="${contactPoints},${contactPointPrefix}-$i.$(hostname -d):{{ .Values.service.internalPort }}"
done

export ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS="${contactPoints}"
fi

if [ "$(ls -A /exporters/)" ]; then
mkdir /usr/local/zeebe/exporters/
cp -a /exporters/*.jar /usr/local/zeebe/exporters/
else
else
echo "No exporters available."
fi

env
exec /usr/local/zeebe/bin/broker

application.yaml: |
Expand Down
17 changes: 17 additions & 0 deletions charts/ccsm-helm/charts/zeebe/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ spec:
env:
- name: LC_ALL
value: C.UTF-8
- name: K8S_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: K8S_SERVICE_NAME
value: {{ include "zeebe.names.broker" . }}
- name: K8S_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: ZEEBE_BROKER_NETWORK_ADVERTISEDHOST
value: "$(K8S_NAME).$(K8S_SERVICE_NAME).$(K8S_NAMESPACE).svc.cluster.local"
- name: ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS
value:
{{- range (untilStep 0 (int .Values.clusterSize) 1) }}
$(K8S_SERVICE_NAME)-{{ . }}.$(K8S_SERVICE_NAME).$(K8S_NAMESPACE).svc.cluster.local,
{{- end }}
- name: ZEEBE_BROKER_CLUSTER_CLUSTERNAME
value: {{ tpl .Values.global.zeebeClusterName . }}
- name: ZEEBE_LOG_LEVEL
Expand Down