diff --git a/ansible/roles/traffic-engine/files/helm/templates/deployment-firewall.yaml b/ansible/roles/traffic-engine/files/helm/templates/deployment-firewall.yaml index 478f5d47..73f762b2 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/deployment-firewall.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/deployment-firewall.yaml @@ -49,11 +49,11 @@ spec: {{- end }} {{- if eq .Values.external_resources.cm.connectivity "local_cache" }} {{- include "traffic-engine.global.cm.read-server-ip" . | nindent 12 }} - sed -Ei "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/sapp/tsgconf/maat.conf + sed -Ei -c "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/sapp/tsgconf/maat.conf {{- end }} {{- if eq .Values.external_resources.sd.connectivity "local_cache" }} {{- include "traffic-engine.global.sd.read-server-ip" . | nindent 12 }} - sed -Ei "s|SD_POLICY_LOCAL_CACHE_IP_LOCATION|${SD_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/sapp/tsgconf/maat.conf + sed -Ei -c "s|SD_POLICY_LOCAL_CACHE_IP_LOCATION|${SD_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/sapp/tsgconf/maat.conf {{- end }} {{- if eq .Values.debug.firewall.enable_prestart_script .Values.define_enable_val_yes }} chmod 0755 /opt/tsg/scripts/prestart.sh diff --git a/ansible/roles/traffic-engine/files/helm/templates/deployment-proxy.yaml b/ansible/roles/traffic-engine/files/helm/templates/deployment-proxy.yaml index e49ec894..26ca3efa 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/deployment-proxy.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/deployment-proxy.yaml @@ -49,7 +49,7 @@ spec: {{- if eq .Values.external_resources.cm.connectivity "local_cache" }} {{- include "public.prepare-access-API" . | nindent 12 }} {{- include "traffic-engine.global.cm.read-server-ip" . | nindent 12 }} - sed -Ei "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/tfe/conf/tfe/tfe.conf + sed -Ei -c "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/tfe/conf/tfe/tfe.conf {{- end }} {{- if eq .Values.debug.proxy.enable_prestart_script .Values.define_enable_val_yes }} chmod 0755 /opt/tsg/scripts/prestart.sh @@ -126,7 +126,7 @@ spec: {{- if eq .Values.external_resources.cm.connectivity "local_cache" }} {{- include "public.prepare-access-API" . | nindent 12 }} {{- include "traffic-engine.global.cm.read-server-ip" . | nindent 12 }} - sed -Ei "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/certstore/conf/cert_store.ini + sed -Ei -c "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/certstore/conf/cert_store.ini {{- end }} exec /opt/tsg/certstore/bin/certstore securityContext: diff --git a/ansible/roles/traffic-engine/files/helm/templates/deployment-service-chaining.yaml b/ansible/roles/traffic-engine/files/helm/templates/deployment-service-chaining.yaml index f31d7953..c18622db 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/deployment-service-chaining.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/deployment-service-chaining.yaml @@ -49,7 +49,7 @@ spec: {{- if eq .Values.external_resources.cm.connectivity "local_cache" }} {{- include "public.prepare-access-API" . | nindent 12 }} {{- include "traffic-engine.global.cm.read-server-ip" . | nindent 12 }} - sed -Ei "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/sce/conf/sce.conf + sed -Ei -c "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/sce/conf/sce.conf {{- end }} {{- if eq .Values.debug.service_chaining.enable_prestart_script .Values.define_enable_val_yes }} chmod 0755 /opt/tsg/scripts/prestart.sh diff --git a/ansible/roles/traffic-engine/files/helm/templates/deployment-shaping.yaml b/ansible/roles/traffic-engine/files/helm/templates/deployment-shaping.yaml index c0b2befa..2512ef06 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/deployment-shaping.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/deployment-shaping.yaml @@ -49,7 +49,7 @@ spec: {{- include "public.prepare-access-API" . | nindent 12 }} {{- if eq .Values.external_resources.cm.connectivity "local_cache" }} {{- include "traffic-engine.global.cm.read-server-ip" . | nindent 12 }} - sed -Ei "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/shaping_engine/conf/shaping.conf + sed -Ei -c "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/shaping_engine/conf/shaping.conf {{- end }} curl --cacert ${CACERT} --header "Authorization: Bearer ${TOKEN}" -X GET ${APISERVER}/api/v1/namespaces/${NAMESPACE}/services/${SERVICENAME} -o /tmp/service.txt export CLUSTER_ANNOUNCE_PORT=$(cat /tmp/service.txt | jq '.spec.ports[] | select(.name=="cluster-announce-port") | .nodePort') @@ -58,9 +58,9 @@ spec: echo "export HEALTH_CHECK_ANNOUNCE_PORT=${HEALTH_CHECK_ANNOUNCE_PORT}" >> /etc/profile.d/announceinfo.sh chmod 0755 /etc/profile.d/announceinfo.sh - sed -Ei "s|NODE_IP_LOCATION|${NODE_IP?}|g" /opt/tsg/shaping_engine/conf/shaping.conf - sed -Ei "s|CLUSTER_ANNOUNCE_PORT_LOCATION|${CLUSTER_ANNOUNCE_PORT?}|g" /opt/tsg/shaping_engine/conf/shaping.conf - sed -Ei "s|HEALTH_CHECK_ANNOUNCE_PORT_LOCATION|${HEALTH_CHECK_ANNOUNCE_PORT?}|g" /opt/tsg/shaping_engine/conf/shaping.conf + sed -Ei -c "s|NODE_IP_LOCATION|${NODE_IP?}|g" /opt/tsg/shaping_engine/conf/shaping.conf + sed -Ei -c "s|CLUSTER_ANNOUNCE_PORT_LOCATION|${CLUSTER_ANNOUNCE_PORT?}|g" /opt/tsg/shaping_engine/conf/shaping.conf + sed -Ei -c "s|HEALTH_CHECK_ANNOUNCE_PORT_LOCATION|${HEALTH_CHECK_ANNOUNCE_PORT?}|g" /opt/tsg/shaping_engine/conf/shaping.conf {{- if eq .Values.debug.shaping.enable_prestart_script .Values.define_enable_val_yes }} chmod 0755 /opt/tsg/scripts/prestart.sh /opt/tsg/scripts/prestart.sh