[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/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