Add replica and anti-affinity to rbd-provisioner

The rbd-provisioner does not follow the same template as the other
openstack-helm charts so we need to use specific methods to set the
affinity and replica parameters.

Story: 2004520
Task: 29845
Change-Id: I05b97b8254a541753031ba051707092eae301d6a
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
This commit is contained in:
David Sullivan 2019-03-06 22:31:51 -05:00
parent 564d6ff92a
commit 5348bca741
5 changed files with 17 additions and 17 deletions

View File

@ -1,3 +1,3 @@
SRC_DIR="stx-openstack-helm"
COPY_LIST_TO_TAR="$PKG_BASE/../../../helm-charts/rbd-provisioner $PKG_BASE/../../../helm-charts/garbd $PKG_BASE/../../../helm-charts/ceph-pools-audit"
TIS_PATCH_VER=7
TIS_PATCH_VER=8

View File

@ -126,12 +126,6 @@ data:
- type: job
labels:
app: rbd-provisioner
values:
pod:
affinity:
anti:
type:
default: requiredDuringSchedulingIgnoredDuringExecution
source:
type: tar
location: http://172.17.0.1/helm_charts/rbd-provisioner-0.1.0.tgz

View File

@ -24,6 +24,16 @@ spec:
{{- if (.Values.global.rbac) or (.Values.global.reuseRbac)}}
serviceAccount: {{ .Values.rbac.serviceAccount }}
{{- end }}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- {{ .Values.global.name }}
topologyKey: kubernetes.io/hostname
containers:
- name: {{ .Values.global.name }}
image: {{ .Values.images.tags.rbd_provisioner | quote }}

View File

@ -1,2 +1,2 @@
SRC_DIR="sysinv"
TIS_PATCH_VER=306
TIS_PATCH_VER=307

View File

@ -65,12 +65,16 @@ class RbdProvisionerHelm(base.BaseHelm):
}
classes.append(cls)
global_settings = {
"replicas": self._num_controllers()
}
overrides = {
common.HELM_NS_OPENSTACK: {
"classdefaults": classdefaults,
"classes": classes,
"images": self._get_images_overrides(),
"pods": self._get_pod_overrides()
"global": global_settings
}
}
@ -82,14 +86,6 @@ class RbdProvisionerHelm(base.BaseHelm):
else:
return overrides
def _get_pod_overrides(self):
overrides = {
'replicas': {
'rbd-provisioner': self._num_controllers()
}
}
return overrides
def _get_images_overrides(self):
# TODO: Remove after ceph upgrade
# Format the name of the stx specific ceph config helper