diff --git a/ansible/roles/traffic-engine/files/helm/conf/conflist.inf b/ansible/roles/traffic-engine/files/helm/conf/conflist.inf index 752bb3f6..3fb8c1d9 100644 --- a/ansible/roles/traffic-engine/files/helm/conf/conflist.inf +++ b/ansible/roles/traffic-engine/files/helm/conf/conflist.inf @@ -75,7 +75,7 @@ {{- if eq .Values.packet_capture.enable .Values.define_enable_val_yes }} ./plug/business/capture_packet_plug/capture_packet_plug.inf {{- end }} -{{- if eq .Values.proxy.enable .Values.define_enable_val_yes }} +{{- if and (eq .Values.proxy.enable .Values.define_enable_val_yes) (ge (len .Values.tfe_affinity) 1) }} ./plug/business/kni/kni.inf {{- end }} {{- if eq .Values.firewall.enable .Values.define_enable_val_yes }} diff --git a/ansible/roles/traffic-engine/files/helm/templates/sapp.yaml b/ansible/roles/traffic-engine/files/helm/templates/sapp.yaml index f9618a06..b322f2ed 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/sapp.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/sapp.yaml @@ -11,7 +11,9 @@ data: tsg_conn_sketch.inf: {{ tpl (.Files.Get "conf/tsg_conn_sketch.inf") . | quote }} sapp.toml: {{ tpl (.Files.Get "conf/sapp.toml") . | quote }} send_raw_pkt.conf: {{ tpl (.Files.Get "conf/send_raw_pkt.conf") . | quote }} +{{- if and (eq .Values.proxy.enable .Values.define_enable_val_yes) (ge (len .Values.tfe_affinity) 1) }} kni.conf: {{ tpl (.Files.Get "conf/kni.conf") . | quote }} +{{- end }} wangw.conf: {{ tpl (.Files.Get "conf/wangw.conf") . | quote }} wire_graft.conf: {{ tpl (.Files.Get "conf/wire_graft.conf") . | quote }} vlan_flipping_map.conf: {{ tpl (.Files.Get "conf/vlan_flipping_map.conf") . | quote }} diff --git a/ansible/roles/traffic-engine/files/helm/templates/tfe.yaml b/ansible/roles/traffic-engine/files/helm/templates/tfe.yaml index c6f5e7e5..0c555647 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/tfe.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/tfe.yaml @@ -4,6 +4,8 @@ metadata: name: tfe-{{ .Release.Name }} namespace: default data: +{{- if and (eq .Values.proxy.enable .Values.define_enable_val_yes) (ge (len .Values.tfe_affinity) 1) }} tfe.conf: {{ tpl (.Files.Get "conf/tfe.conf") . | quote }} pangu_pxy.conf: {{ tpl (.Files.Get "conf/pangu_pxy.conf") . | quote }} +{{- end }} tsg_device_tag.json: {{ tpl (.Files.Get "conf/tsg_device_tag.json") . | quote }} diff --git a/ansible/roles/traffic-engine/files/helm/templates/traffic-engine.yaml b/ansible/roles/traffic-engine/files/helm/templates/traffic-engine.yaml index 7d10369c..1dde31a1 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/traffic-engine.yaml +++ b/ansible/roles/traffic-engine/files/helm/templates/traffic-engine.yaml @@ -113,7 +113,7 @@ spec: mountPath: /etc/localtime readOnly: true -{{- if eq .Values.proxy.enable .Values.define_enable_val_yes }} +{{- if and (eq .Values.proxy.enable .Values.define_enable_val_yes) (ge (len .Values.tfe_affinity) 1) }} - name: proxy image: "{{ .Values.image.proxy.repository }}:{{ .Values.image.proxy.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.proxy.pullPolicy }}