diff options
Diffstat (limited to 'tools/k8s/app-deployment/helm/charts/trexchart/templates')
3 files changed, 62 insertions, 0 deletions
diff --git a/tools/k8s/app-deployment/helm/charts/trexchart/templates/daemonset.yaml b/tools/k8s/app-deployment/helm/charts/trexchart/templates/daemonset.yaml new file mode 100644 index 00000000..39d4662f --- /dev/null +++ b/tools/k8s/app-deployment/helm/charts/trexchart/templates/daemonset.yaml @@ -0,0 +1,25 @@ +{{- if eq .Values.kind "DaemonSet"}} +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: trex + annotations: + k8s.v1.cni.cncf.io/networks: "{{- join "\",\"" .Values.extraInterfaces }}" +spec: + selector: + matchLabels: + app: trex + template: + metadata: + labels: + app: trex + spec: + containers: + - name: trex + image: vsperf/trex:lakelse + imagePullPolicy: IfNotPresent + ports: + - containerPort: 3000 + nodeSelector: + {{- .Values.nodeSelector.matchLables | toYaml | nindent 12 }} +{{- end }} diff --git a/tools/k8s/app-deployment/helm/charts/trexchart/templates/deployment.yaml b/tools/k8s/app-deployment/helm/charts/trexchart/templates/deployment.yaml new file mode 100644 index 00000000..8b0f447e --- /dev/null +++ b/tools/k8s/app-deployment/helm/charts/trexchart/templates/deployment.yaml @@ -0,0 +1,26 @@ +{{- if eq .Values.kind "Deployment"}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: trex + annotations: + k8s.v1.cni.cncf.io/networks: "{{- join "\",\"" .Values.extraInterfaces | toYaml | nindent 8}}" +spec: + selector: + matchLabels: + app: trex + replicas: {{ .Values.replicas }} + template: + metadata: + labels: + app: trex + spec: + containers: + - name: trex + image: vsperf/trex:lakelse + imagePullPolicy: IfNotPresent + ports: + - containerPort: 3000 + nodeSelector: + {{- .Values.nodeSelector.matchLables | toYaml | nindent 12 }} +{{- end }} diff --git a/tools/k8s/app-deployment/helm/charts/trexchart/templates/service.yaml b/tools/k8s/app-deployment/helm/charts/trexchart/templates/service.yaml new file mode 100644 index 00000000..8965194d --- /dev/null +++ b/tools/k8s/app-deployment/helm/charts/trexchart/templates/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: trexchart +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http |