From 44841fbffcf75321243cd2352025b5f33d84feca Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Wed, 4 Apr 2018 21:51:31 -0500 Subject: [PATCH] Storage: increase robustness of storage clean jobs This PS increases the robustness of storage cleaning jobs by precreating the service accounts and roles for the pod to consume, and removes the potential for race conditions by removing the delete hook. Change-Id: I1f3c35fe2bd2a4325430e8025951349526f683af --- cinder/templates/job-clean.yaml | 6 ------ glance/templates/job-clean.yaml | 6 ------ gnocchi/templates/job-clean.yaml | 6 ------ 3 files changed, 18 deletions(-) diff --git a/cinder/templates/job-clean.yaml b/cinder/templates/job-clean.yaml index 0098e34171..005d353c1f 100644 --- a/cinder/templates/job-clean.yaml +++ b/cinder/templates/job-clean.yaml @@ -28,9 +28,6 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: Role metadata: name: {{ $serviceAccountName }} - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeeded rules: - apiGroups: - "" @@ -44,9 +41,6 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding metadata: name: {{ $serviceAccountName }} - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeeded roleRef: apiGroup: rbac.authorization.k8s.io kind: Role diff --git a/glance/templates/job-clean.yaml b/glance/templates/job-clean.yaml index e67e567a87..9dd15912a9 100644 --- a/glance/templates/job-clean.yaml +++ b/glance/templates/job-clean.yaml @@ -28,9 +28,6 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: Role metadata: name: {{ $serviceAccountName }} - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeeded rules: - apiGroups: - "" @@ -44,9 +41,6 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding metadata: name: {{ $serviceAccountName }} - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeeded roleRef: apiGroup: rbac.authorization.k8s.io kind: Role diff --git a/gnocchi/templates/job-clean.yaml b/gnocchi/templates/job-clean.yaml index 1003d796a1..2bfa74c68a 100644 --- a/gnocchi/templates/job-clean.yaml +++ b/gnocchi/templates/job-clean.yaml @@ -27,9 +27,6 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: Role metadata: name: {{ $serviceAccountName }} - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeeded rules: - apiGroups: - "" @@ -43,9 +40,6 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding metadata: name: {{ $serviceAccountName }} - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeeded roleRef: apiGroup: rbac.authorization.k8s.io kind: Role