From 3430147612541ddea5b92cd6ce005e30650f2148 Mon Sep 17 00:00:00 2001 From: fumingwei Date: Wed, 10 Jan 2024 18:31:51 +0800 Subject: [PATCH] =?UTF-8?q?feature:TSG-18563:=E4=BF=AE=E5=A4=8D=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E4=BD=BF=E7=94=A8sed=20-i=E5=91=BD=E4=BB=A4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9emptyDir=E6=8C=82=E8=BD=BD=E6=96=87=E4=BB=B6=E6=97=B6?= =?UTF-8?q?=E5=87=BA=E7=8E=B0"Device=20or=20resource=20busy"=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../files/helm/templates/deployment-firewall.yaml | 4 ++-- .../files/helm/templates/deployment-proxy.yaml | 4 ++-- .../files/helm/templates/deployment-service-chaining.yaml | 2 +- .../files/helm/templates/deployment-shaping.yaml | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) 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