diff options
Diffstat (limited to 'tools/k8s/app-deployment/helm/charts/proxchart')
5 files changed, 91 insertions, 0 deletions
diff --git a/tools/k8s/app-deployment/helm/charts/proxchart/Chart.yaml b/tools/k8s/app-deployment/helm/charts/proxchart/Chart.yaml new file mode 100644 index 00000000..6acc06f4 --- /dev/null +++ b/tools/k8s/app-deployment/helm/charts/proxchart/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: proxchart +version: 0.1.0 +appVersion: "1.0" +description: To deploy prox diff --git a/tools/k8s/app-deployment/helm/charts/proxchart/templates/daemonset.yaml b/tools/k8s/app-deployment/helm/charts/proxchart/templates/daemonset.yaml new file mode 100644 index 00000000..e1d3a563 --- /dev/null +++ b/tools/k8s/app-deployment/helm/charts/proxchart/templates/daemonset.yaml @@ -0,0 +1,25 @@ +{{- if eq .Values.kind "DaemonSet"}} +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: prox + annotations: + k8s.v1.cni.cncf.io/networks: "{{- join "\",\"" .Values.extraInterfaces }}" +spec: + selector: + matchLabels: + app: prox + template: + metadata: + labels: + app: prox + spec: + containers: + - name: prox + image: opnfv/rapid:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 3000 + nodeSelector: + {{- .Values.nodeSelector.matchLables | toYaml | nindent 12 }} +{{- end }} diff --git a/tools/k8s/app-deployment/helm/charts/proxchart/templates/deployment.yaml b/tools/k8s/app-deployment/helm/charts/proxchart/templates/deployment.yaml new file mode 100644 index 00000000..235b02cd --- /dev/null +++ b/tools/k8s/app-deployment/helm/charts/proxchart/templates/deployment.yaml @@ -0,0 +1,30 @@ +{{- if eq .Values.kind "Deployment"}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prox + annotations: + k8s.v1.cni.cncf.io/networks: "{{- join "\",\"" .Values.extraInterfaces | toYaml | nindent 8}}" +spec: + selector: + matchLabels: + app: prox + replicas: {{ .Values.replicas }} + template: + metadata: + labels: + app: prox + spec: + containers: + - name: prox + image: opnfv/rapid:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 3000 + - name: nginx + image: nginx:alpine + ports: + - containerPort: 80 + nodeSelector: + {{- .Values.nodeSelector.matchLables | toYaml | nindent 12 }} +{{- end }} diff --git a/tools/k8s/app-deployment/helm/charts/proxchart/templates/service.yaml b/tools/k8s/app-deployment/helm/charts/proxchart/templates/service.yaml new file mode 100644 index 00000000..15215f35 --- /dev/null +++ b/tools/k8s/app-deployment/helm/charts/proxchart/templates/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: proxchart +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http diff --git a/tools/k8s/app-deployment/helm/charts/proxchart/values.yaml b/tools/k8s/app-deployment/helm/charts/proxchart/values.yaml new file mode 100644 index 00000000..405e4c25 --- /dev/null +++ b/tools/k8s/app-deployment/helm/charts/proxchart/values.yaml @@ -0,0 +1,20 @@ +# daemonset, deployment +kind: Deployment + +# Nodes to deploy on +nodeSelector: {} + # matchLables: + # key1: value1 + # key2: value2 + +# multus +metacniType: multus +extraInterfaces: + net-attach-def1 + net-attach-def2 + +replicas: 1 + +service: + type: NodePort + port: 8081 |