From 85d00249cd7fd51320c736851b40844bb54fbd3c Mon Sep 17 00:00:00 2001 From: Hu Zhou Date: Thu, 9 Jan 2020 15:47:20 +0200 Subject: [PATCH] Add maintenance toleration for caas-registry Change-Id: I451be9e44d564589b37556e7a1a19948312fbea9 Signed-off-by: Hu Zhou --- SPECS/registry.spec | 2 +- SPECS/swift.spec | 2 +- ansible/roles/registry/templates/main/docker-registry.yml | 5 +++++ ansible/roles/registry/templates/update/docker-registry-update.yml | 5 +++++ ansible/roles/swift/templates/main/swift_main.yml | 5 +++++ ansible/roles/swift/templates/update/swift_update.yml | 5 +++++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/SPECS/registry.spec b/SPECS/registry.spec index 0e788ef..55dc448 100644 --- a/SPECS/registry.spec +++ b/SPECS/registry.spec @@ -15,7 +15,7 @@ %define COMPONENT registry %define RPM_NAME caas-%{COMPONENT} %define RPM_MAJOR_VERSION 2.7.1 -%define RPM_MINOR_VERSION 11 +%define RPM_MINOR_VERSION 12 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION} %define go_version 1.12.10 diff --git a/SPECS/swift.spec b/SPECS/swift.spec index ab73228..1f9697a 100644 --- a/SPECS/swift.spec +++ b/SPECS/swift.spec @@ -15,7 +15,7 @@ %define COMPONENT swift %define RPM_NAME caas-%{COMPONENT} %define RPM_MAJOR_VERSION 2.23.1 -%define RPM_MINOR_VERSION 0 +%define RPM_MINOR_VERSION 1 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION} %define centos_build 191001 Name: %{RPM_NAME} diff --git a/ansible/roles/registry/templates/main/docker-registry.yml b/ansible/roles/registry/templates/main/docker-registry.yml index 4dced77..2c98088 100644 --- a/ansible/roles/registry/templates/main/docker-registry.yml +++ b/ansible/roles/registry/templates/main/docker-registry.yml @@ -32,6 +32,11 @@ spec: dnsPolicy: ClusterFirst nodeSelector: nodetype: caas_master + tolerations: + - key: "node-maintenancemode" + value: "enabled" + operator: "Equal" + effect: "NoExecute" securityContext: runAsUser: {{ caas.uid.dockerreg }} containers: diff --git a/ansible/roles/registry/templates/update/docker-registry-update.yml b/ansible/roles/registry/templates/update/docker-registry-update.yml index 3df440b..d499c4c 100644 --- a/ansible/roles/registry/templates/update/docker-registry-update.yml +++ b/ansible/roles/registry/templates/update/docker-registry-update.yml @@ -32,6 +32,11 @@ spec: dnsPolicy: ClusterFirst nodeSelector: nodetype: caas_master + tolerations: + - key: "node-maintenancemode" + value: "enabled" + operator: "Equal" + effect: "NoExecute" securityContext: runAsUser: {{ caas.uid.dockerreg }} containers: diff --git a/ansible/roles/swift/templates/main/swift_main.yml b/ansible/roles/swift/templates/main/swift_main.yml index 40b9d85..d514e46 100644 --- a/ansible/roles/swift/templates/main/swift_main.yml +++ b/ansible/roles/swift/templates/main/swift_main.yml @@ -33,6 +33,11 @@ spec: dnsPolicy: ClusterFirstWithHostNet nodeSelector: nodetype: caas_master + tolerations: + - key: "node-maintenancemode" + value: "enabled" + operator: "Equal" + effect: "NoExecute" securityContext: runAsUser: {{ caas.uid.swift }} containers: diff --git a/ansible/roles/swift/templates/update/swift_update.yml b/ansible/roles/swift/templates/update/swift_update.yml index 1533625..3f24346 100644 --- a/ansible/roles/swift/templates/update/swift_update.yml +++ b/ansible/roles/swift/templates/update/swift_update.yml @@ -33,6 +33,11 @@ spec: dnsPolicy: ClusterFirstWithHostNet nodeSelector: nodetype: caas_master + tolerations: + - key: "node-maintenancemode" + value: "enabled" + operator: "Equal" + effect: "NoExecute" securityContext: runAsUser: {{ caas.uid.swift }} containers: -- 2.16.6