Change CDN to assign static IP for S1U interface
Change-Id: I1493cdd7c89a0bc86a47f631e91ad79863fb2a11
diff --git a/cdn-services/cdn-local/templates/cm.yaml b/cdn-services/cdn-local/templates/cm.yaml
index d6d7849..49b5f95 100644
--- a/cdn-services/cdn-local/templates/cm.yaml
+++ b/cdn-services/cdn-local/templates/cm.yaml
@@ -21,9 +21,9 @@
data:
nginx_rtmp_config.sh: |+
#!/bin/bash
- ip route add {{ .Values.ue_ip_subnet1 }} via {{ .Values.spgwu_sgiip }} dev sgi-net;
- ip route add {{ .Values.ue_ip_subnet2 }} via {{ .Values.spgwu_sgiip }} dev sgi-net;
- ip link set sgi-net mtu 1200;
+ ip route add {{ .Values.ue_ip_subnet1 }} via {{ .Values.spgwu_sgiip }} dev sgi-net-nd;
+ ip route add {{ .Values.ue_ip_subnet2 }} via {{ .Values.spgwu_sgiip }} dev sgi-net-nd;
+ ip link set sgi-net-nd mtu 1200;
cp /conf/nginx.conf /etc/nginx/
nginx -g "daemon off;"
---
diff --git a/cdn-services/cdn-local/templates/networks.yaml b/cdn-services/cdn-local/templates/networks.yaml
index ec2707f..3af289c 100644
--- a/cdn-services/cdn-local/templates/networks.yaml
+++ b/cdn-services/cdn-local/templates/networks.yaml
@@ -14,29 +14,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-{{- range .Values.network.networks }}
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
- name: {{ .name }}
-{{- if $.Values.network.sriov.enabled }}
+ name: sgi-net-nd
+{{- if .Values.networks.sriov.enabled }}
annotations:
k8s.v1.cni.cncf.io/resourceName: intel.com/sriov_netdevice
{{- end }}
spec:
config: '{
- "type": {{ .type | quote }},
+ "type": {{ .Values.networks.sgi_net_nd.type | quote }},
"ipam": {
- "type": {{ .ipam | quote }},
- {{- if eq .ipam "host-local" }}
- "subnet": {{ .subnet | quote }},
- "gateway": {{ .gateway | quote }}
- {{- else if eq .ipam "centralip" }}
- "ipType": "cluster",
- "network": {{ .subnet | quote }},
- "etcdURL": {{ $.Values.etcdurl | quote }}
- {{- end }}
+ "type": {{ .Values.networks.sgi_net_nd.ipam | quote }}
}
}'
-{{- end }}
diff --git a/cdn-services/cdn-local/templates/nginx.yaml b/cdn-services/cdn-local/templates/nginx.yaml
index 8b97592..05cc691 100644
--- a/cdn-services/cdn-local/templates/nginx.yaml
+++ b/cdn-services/cdn-local/templates/nginx.yaml
@@ -43,12 +43,10 @@
app: nginx-rtmp
annotations:
k8s.v1.cni.cncf.io/networks: '[
- { "name": "sgi-net-nd", "interface": "sgi-net-nd" }
+ { "name": "sgi-net-nd", "interface": "sgi-net-nd", "ips": {{ .Values.networks.sgi_net_nd.ip | quote }} }
]'
spec:
#hostNetwork: true
- nodeSelector:
-{{ toYaml .Values.nginx.nodeselector | indent 8 }}
terminationGracePeriodSeconds: 0
imagePullSecrets:
- name: nexus-docker-secret
@@ -104,4 +102,4 @@
- key: nginx.conf
path: nginx.conf
- name: shared-volume
- emptyDir: {}
\ No newline at end of file
+ emptyDir: {}