Add helm hook for Rally jobs
Change-Id: I983c5c25527761c028f550e5de2a9d8b08d892ce
This commit is contained in:
parent
32afc483e5
commit
3a39afe890
@ -14,7 +14,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm rally
|
||||
name: rally
|
||||
version: 0.2.4
|
||||
version: 0.2.5
|
||||
home: https://docs.openstack.org/developer/rally
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/rally/OpenStack_Project_rally_vertical.png
|
||||
sources:
|
||||
|
@ -12,7 +12,17 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- define "metadata.annotations.job.db_init" }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
helm.sh/hook-weight: "-3"
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.manifests.job_db_init }}
|
||||
{{- $dbInitJob := dict "envAll" . "serviceName" "rally" -}}
|
||||
|
||||
{{- if .Values.helm3_hook }}
|
||||
{{- $_ := set $dbInitJob "jobAnnotations" (include "metadata.annotations.job.db_init" . | fromYaml) }}
|
||||
{{- end }}
|
||||
|
||||
{{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }}
|
||||
{{- end }}
|
||||
|
@ -12,7 +12,16 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- define "metadata.annotations.job.repo_sync" }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
{{- end }}
|
||||
|
||||
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
||||
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "rally" -}}
|
||||
|
||||
{{- if .Values.helm3_hook }}
|
||||
{{- $_ := $imageRepoSyncJob "jobAnnotations" (include "metadata.annotations.job.repo_sync" . | fromYaml) }}
|
||||
{{- end }}
|
||||
|
||||
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
||||
{{- end }}
|
||||
|
@ -24,6 +24,10 @@ metadata:
|
||||
name: rally-ks-endpoints
|
||||
annotations:
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
||||
{{- if .Values.helm3_hook }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
helm.sh/hook-weight: "-1"
|
||||
{{- end }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
|
@ -24,6 +24,10 @@ metadata:
|
||||
name: rally-ks-service
|
||||
annotations:
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
||||
{{- if .Values.helm3_hook }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
helm.sh/hook-weight: "-2"
|
||||
{{- end }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
|
@ -12,7 +12,17 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- define "metadata.annotations.job.ks_user" }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
helm.sh/hook-weight: "1"
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.manifests.job_ks_user }}
|
||||
{{- $ksUserJob := dict "envAll" . "serviceName" "rally" -}}
|
||||
|
||||
{{- if .Values.helm3_hook }}
|
||||
{{- $_ := set $ksUserJob "jobAnnotations" (include "metadata.annotations.job.ks_user" . | fromYaml) }}
|
||||
{{- end }}
|
||||
|
||||
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
||||
{{- end }}
|
||||
|
@ -24,6 +24,10 @@ metadata:
|
||||
name: rally-manage-db
|
||||
annotations:
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
||||
{{- if .Values.helm3_hook }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
helm.sh/hook-weight: "2"
|
||||
{{- end }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
|
@ -24,6 +24,10 @@ metadata:
|
||||
name: rally-run-task
|
||||
annotations:
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
||||
{{- if .Values.helm3_hook }}
|
||||
helm.sh/hook: post-install,post-upgrade
|
||||
helm.sh/hook-weight: "3"
|
||||
{{- end }}
|
||||
spec:
|
||||
backoffLimit: {{ .Values.jobs.run_tasks.backoffLimit }}
|
||||
template:
|
||||
|
@ -4001,6 +4001,10 @@ conf:
|
||||
times: 6
|
||||
type: constant
|
||||
|
||||
# NOTE(helm_hook): helm_hook might break for helm2 binary.
|
||||
# set helm3_hook: false when using the helm2 binary.
|
||||
helm3_hook: true
|
||||
|
||||
manifests:
|
||||
configmap_bin: true
|
||||
configmap_etc: true
|
||||
|
@ -7,4 +7,5 @@ rally:
|
||||
- 0.2.2 Add values for backoffLimit and restartPolicy
|
||||
- 0.2.3 Update default image values to Wallaby
|
||||
- 0.2.4 Migrated PodDisruptionBudget resource to policy/v1 API version
|
||||
- 0.2.5 Add helm hook for jobs
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user