For non-XOS charts, use a global registry var, split docker image name/tag/pullPolicy
Change-Id: Icffc569e2c152e0b413f4c7b7d9a546bd9a3ef58
diff --git a/dhcp-server/Chart.yaml b/dhcp-server/Chart.yaml
index 844e777..6a1ea18 100644
--- a/dhcp-server/Chart.yaml
+++ b/dhcp-server/Chart.yaml
@@ -14,3 +14,4 @@
name: dhcp-server
version: 1.0.0
+appVersion: 'latest'
diff --git a/dhcp-server/templates/deployment.yaml b/dhcp-server/templates/deployment.yaml
index 95a3b03..4a63279 100644
--- a/dhcp-server/templates/deployment.yaml
+++ b/dhcp-server/templates/deployment.yaml
@@ -1,3 +1,4 @@
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,8 +28,8 @@
spec:
containers:
- name: dhcp-server
- image: {{ .Values.dhcpServerImage }}
- imagePullPolicy: {{ .Values.imagePullPolicy }}
+ image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
#command: ["/bin/bash", "-", "sleep 86400"]
ports:
- containerPort: 67
diff --git a/dhcp-server/values.yaml b/dhcp-server/values.yaml
index b0c8bb9..7ac1ba7 100644
--- a/dhcp-server/values.yaml
+++ b/dhcp-server/values.yaml
@@ -1,3 +1,4 @@
+---
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,13 +15,18 @@
# helm install dhcp-server -n dhcp-server
-dhcpServerImage: 'networkboot/dhcpd:latest'
-imagePullPolicy: Always
+image:
+ repository: 'networkboot/dhcpd'
+ tag: '{{ .Chart.AppVersion }}'
+ pullPolicy: 'Always'
+
+global:
+ registry: ''
config: |
subnet 10.233.0.0 netmask 255.255.0.0 {
- range 10.233.0.1 10.233.0.2;
+ range 10.233.0.1 10.233.0.2;
}
subnet 10.200.0.0 netmask 255.255.0.0 {
range 10.200.0.1 10.200.0.253;