[Aether-1204] - Enhance the Dbuf helm chart
- Support two options for IP assigment
- Remove hardcoded service protocol and port
Change-Id: I899df50a01b4a48fccea396349c86cdb9d07c1f7
diff --git a/apps/dbuf/Chart.yaml b/apps/dbuf/Chart.yaml
index 9514e8e..d1c7915 100644
--- a/apps/dbuf/Chart.yaml
+++ b/apps/dbuf/Chart.yaml
@@ -18,7 +18,7 @@
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 0.1.0
+version: 0.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
diff --git a/apps/dbuf/templates/deployment.yaml b/apps/dbuf/templates/deployment.yaml
index 3c8ef5e..d364ece 100644
--- a/apps/dbuf/templates/deployment.yaml
+++ b/apps/dbuf/templates/deployment.yaml
@@ -24,7 +24,7 @@
spec:
{{- if .Values.image.credentials }}
imagePullSecrets:
- {{- toYaml . | nindent 8 }}
+ - name: {{ .Release.Name }}.registry
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
@@ -43,10 +43,10 @@
ports:
- name: grpc
containerPort: 10000
- protocol: TCP
- - name: stats
+ protocol: {{ .Values.service.grpc.protocol }}
+ - name: exporter
containerPort: 8080
- protocol: TCP
+ protocol: {{ .Values.service.stats.protocol }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
diff --git a/apps/dbuf/templates/networks.yaml b/apps/dbuf/templates/networks.yaml
index 0ab4521..07eb55b 100644
--- a/apps/dbuf/templates/networks.yaml
+++ b/apps/dbuf/templates/networks.yaml
@@ -15,11 +15,16 @@
"type": "sriov",
"name": "sriov-network",
"ipam": {
+ {{- if eq .Values.network.ipam "host-local" }}
"type": "host-local",
- "subnet": "10.56.217.0/24",
+ "subnet": "{{ .Values.network.static.subnets }}",
"routes": [{
"dst": "0.0.0.0/0"
}],
- "gateway": "10.56.217.1"
+ "gateway": "{{ .Values.network.static.gateway }}"
+ {{- else if eq .Values.network.ipam "dhcp" }}
+ "type": "dhcp"
+
+ {{- end }}
}
-}'
+}'
\ No newline at end of file
diff --git a/apps/dbuf/templates/secret-registry.yaml b/apps/dbuf/templates/secret-registry.yaml
index eafb8e2..f5504ad 100644
--- a/apps/dbuf/templates/secret-registry.yaml
+++ b/apps/dbuf/templates/secret-registry.yaml
@@ -14,5 +14,5 @@
release: {{ .Release.Name }}
type: kubernetes.io/dockerconfigjson
data:
- .dockerconfigjson: {{ printf `{"auths":{%s:{"auth":"%s"}}}` (.Values.images.credentials.registry | quote) (printf "%s:%s" .Values.images.credentials.username .Values.images.credentials.password | b64enc) | b64enc | quote }}
+ .dockerconfigjson: {{ printf `{"auths":{%s:{"auth":"%s"}}}` (.Values.image.credentials.registry | quote) (printf "%s:%s" .Values.image.credentials.username .Values.image.credentials.password | b64enc) | b64enc | quote }}
{{- end }}
diff --git a/apps/dbuf/templates/service.yml b/apps/dbuf/templates/service.yml
index 8139fb9..48df27e 100644
--- a/apps/dbuf/templates/service.yml
+++ b/apps/dbuf/templates/service.yml
@@ -15,9 +15,8 @@
{{- include "dbuf.selectorLabels" . | nindent 4 }}
ports:
- name: grpc
- protocol: TCP
- # TODO: define in values
- port: 10000
+ protocol: {{ .Values.service.grpc.protocol }}
+ port: {{ .Values.service.grpc.port }}
targetPort: grpc
---
@@ -31,8 +30,7 @@
selector:
{{- include "dbuf.selectorLabels" . | nindent 4 }}
ports:
- - name: stats
- protocol: TCP
- # TODO: define in values
- port: 8080
- targetPort: stats
+ - name: exporter
+ protocol: {{ .Values.service.stats.protocol }}
+ port: {{ .Values.service.stats.port }}
+ targetPort: exporter
diff --git a/apps/dbuf/values.yaml b/apps/dbuf/values.yaml
index 946d3f4..2fb3a64 100644
--- a/apps/dbuf/values.yaml
+++ b/apps/dbuf/values.yaml
@@ -3,18 +3,16 @@
image:
repository: registry.aetherproject.org/tost/dbuf
- pullPolicy: IfNotPresent
+ pullPolicy: Always
tag: "latest"
- credentials: {}
- # If specified, use this credential to access the image
- # registry:
- # username:
- # password:
+ credentials:
+ registry: "registry.aetherproject.org"
+ username: "aether_jenkins"
+ password: "9zySeOpTL"
extraParams:
- '"-max_queues=1024"'
-
replicaCount: 1
sriovNICSize: 1
sriovResourceName: intel_sriov_netdevice
@@ -22,18 +20,34 @@
# Change both in the same time
multusNetworkName: dbuf-sriov
podAnnotations:
- k8s.v1.cni.cncf.io/networks: dbuf-sriov
+ k8s.v1.cni.cncf.io/networks: dbuf-sriov
-imagePullSecrets: []
podSecurityContext: {}
resources:
requests:
- intel.com/intel_sriov_netdevice: '1'
+ intel.com/intel_sriov_netdevice: "1"
limits:
- intel.com/intel_sriov_netdevice: '1'
+ intel.com/intel_sriov_netdevice: "1"
nodeSelector: {}
tolerations: []
affinity: {}
+
+service:
+ stats:
+ port: 8080
+ protocol: TCP
+ grpc:
+ port: 10000
+ protocol: TCP
+
+# two options for ipam, dhcp or host-local
+# static is for host-local ipam
+network:
+ # ipam: dhcp
+ ipam: host-local
+ static:
+ subnets: "10.56.217.0/24"
+ gateway: "10.56.217.1"