diff options
author | Konrad Bańka <k.banka@samsung.com> | 2019-10-21 11:04:31 +0200 |
---|---|---|
committer | Marco Platania <platania@research.att.com> | 2019-11-04 14:01:54 +0000 |
commit | 68042495ef1e1e6dff7fed7fc2691b01cf672fe1 (patch) | |
tree | 7c84d170b19f3674586d268dda3671378471ec00 /heat/vFW_CNF_CDS/templates/helm/sink | |
parent | 5e1fea9785cad165c17e1b4bc2b79c671e8cd951 (diff) |
Provide vFW CNF use case csar content
Issue-ID: INT-1259
Change-Id: I0bcd85725e7f102bdcdf813db0c0260526b5807d
Signed-off-by: Konrad Bańka <k.banka@samsung.com>
Diffstat (limited to 'heat/vFW_CNF_CDS/templates/helm/sink')
6 files changed, 153 insertions, 0 deletions
diff --git a/heat/vFW_CNF_CDS/templates/helm/sink/.helmignore b/heat/vFW_CNF_CDS/templates/helm/sink/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/sink/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/heat/vFW_CNF_CDS/templates/helm/sink/Chart.yaml b/heat/vFW_CNF_CDS/templates/helm/sink/Chart.yaml new file mode 100644 index 00000000..2feffe0c --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/sink/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart to deploy sink for vFirewall +name: sink +version: 0.2.0 diff --git a/heat/vFW_CNF_CDS/templates/helm/sink/templates/configmap.yaml b/heat/vFW_CNF_CDS/templates/helm/sink/templates/configmap.yaml new file mode 100644 index 00000000..85fbfc8e --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/sink/templates/configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.vsn_name_0 }}-configmap + labels: + release: {{ .Release.Name }} + app: {{ .Values.vnf_name }} + chart: {{ .Chart.Name }} +data: + protected_net_gw: {{ (splitn "/" 2 .Values.int_private2_gw_ip)._0 | quote }} #FIXME maybe? + protected_private_net_cidr: {{ .Values.int_private1_net_cidr | quote }} diff --git a/heat/vFW_CNF_CDS/templates/helm/sink/templates/deployment.yaml b/heat/vFW_CNF_CDS/templates/helm/sink/templates/deployment.yaml new file mode 100644 index 00000000..578f02f0 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/sink/templates/deployment.yaml @@ -0,0 +1,63 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.vsn_name_0 }} + labels: + release: {{ .Release.Name }} + app: {{ .Values.vnf_name }} #FIXME Should vnf_name be replaced with v*_name_0 for labels? + chart: {{ .Chart.Name }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + annotations: + k8s.v1.cni.cncf.io/networks: "{{ .Values.vnf_name }}-ovn-attachment" + k8s.plugin.opnfv.org/nfn-network: | + { "type": "ovn4nfv", + "interface": [ + { "name": {{ .Values.int_private2_net_id | quote }}, + "ipAddress": {{ .Values.vsn_int_private2_ip_0 | quote }}, + "interface": "eth1", + "defaultGateway": "false" }, + { "name": {{ .Values.onap_private_net_id | quote }}, + "ipAddress": {{ .Values.vsn_onap_private_ip_0 | quote }}, + "interface": "eth2" , + "defaultGateway": "false" } + ] + } + spec: + #FIXME DEBUG START + initContainers: + - name: init-test + image: busybox + command: + - env + envFrom: + - configMapRef: + name: {{ .Values.vsn_name_0 }}-configmap + #FIXME DEBUG END + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.sinkrepo }}:{{ .Values.image.sinktag }}" + envFrom: + - configMapRef: + name: {{ .Values.vsn_name_0 }}-configmap + imagePullPolicy: {{ .Values.image.pullPolicy }} + tty: true + stdin: true + securityContext: + privileged: true + - name: darkstat + image: "{{ .Values.image.darkstatrepo }}:{{ .Values.image.darkstattag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + tty: true + stdin: true + ports: + - containerPort: {{ .Values.service.ports.port }} diff --git a/heat/vFW_CNF_CDS/templates/helm/sink/templates/service.yaml b/heat/vFW_CNF_CDS/templates/helm/sink/templates/service.yaml new file mode 100644 index 00000000..8949e7d1 --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/sink/templates/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ .Values.vsn_name_0 }}-service" + labels: + app: {{ .Values.vnf_name }} + release: {{ .Release.Name }} + chart: {{ .Chart.Name }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.ports.port }} + nodePort: {{ .Values.service.ports.nodePort }} + selector: + app: {{ .Values.vnf_name }} + release: {{ .Release.Name }} diff --git a/heat/vFW_CNF_CDS/templates/helm/sink/values.yaml b/heat/vFW_CNF_CDS/templates/helm/sink/values.yaml new file mode 100644 index 00000000..978323ab --- /dev/null +++ b/heat/vFW_CNF_CDS/templates/helm/sink/values.yaml @@ -0,0 +1,36 @@ +# Default values for sink. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + sinkrepo: rtsood/onap-vfw-demo-sink + sinktag: 0.2.0 + pullPolicy: IfNotPresent + darkstatrepo: electrocucaracha/darkstat + darkstattag: latest + +service: +#serivce port value for sink service + type: NodePort + ports: + port: 667 + nodePort: 30667 + + +# Static Defaults +# +# OPENSTACK PARAMETERS +# Names +vnf_name: test-vnf +vsn_name_0: test-vnf-vsn +int_private2_net_id: protected-net +onap_private_net_id: onap-private-net + +# OWN Addresses +vsn_int_private2_ip_0: 192.168.20.3 +vsn_onap_private_ip_0: 10.10.100.4 +# Env Variables +int_private2_gw_ip: 192.168.20.1/24 +int_private1_net_cidr: 192.168.10.0/24 |