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
|
appVersion: v1.0.0
|
||||||
description: OpenStack-Helm rally
|
description: OpenStack-Helm rally
|
||||||
name: rally
|
name: rally
|
||||||
version: 0.2.4
|
version: 0.2.5
|
||||||
home: https://docs.openstack.org/developer/rally
|
home: https://docs.openstack.org/developer/rally
|
||||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/rally/OpenStack_Project_rally_vertical.png
|
icon: https://www.openstack.org/themes/openstack/images/project-mascots/rally/OpenStack_Project_rally_vertical.png
|
||||||
sources:
|
sources:
|
||||||
|
@ -12,7 +12,17 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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 }}
|
{{- if .Values.manifests.job_db_init }}
|
||||||
{{- $dbInitJob := dict "envAll" . "serviceName" "rally" -}}
|
{{- $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" }}
|
{{ $dbInitJob | include "helm-toolkit.manifests.job_db_init_mysql" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -12,7 +12,16 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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 }}
|
{{- if and .Values.manifests.job_image_repo_sync .Values.images.local_registry.active }}
|
||||||
{{- $imageRepoSyncJob := dict "envAll" . "serviceName" "rally" -}}
|
{{- $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" }}
|
{{ $imageRepoSyncJob | include "helm-toolkit.manifests.job_image_repo_sync" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -24,6 +24,10 @@ metadata:
|
|||||||
name: rally-ks-endpoints
|
name: rally-ks-endpoints
|
||||||
annotations:
|
annotations:
|
||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
{{ 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:
|
spec:
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -24,6 +24,10 @@ metadata:
|
|||||||
name: rally-ks-service
|
name: rally-ks-service
|
||||||
annotations:
|
annotations:
|
||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
{{ 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:
|
spec:
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -12,7 +12,17 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
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 }}
|
{{- if .Values.manifests.job_ks_user }}
|
||||||
{{- $ksUserJob := dict "envAll" . "serviceName" "rally" -}}
|
{{- $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" }}
|
{{ $ksUserJob | include "helm-toolkit.manifests.job_ks_user" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -24,6 +24,10 @@ metadata:
|
|||||||
name: rally-manage-db
|
name: rally-manage-db
|
||||||
annotations:
|
annotations:
|
||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
{{ 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:
|
spec:
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -24,6 +24,10 @@ metadata:
|
|||||||
name: rally-run-task
|
name: rally-run-task
|
||||||
annotations:
|
annotations:
|
||||||
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
|
{{ 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:
|
spec:
|
||||||
backoffLimit: {{ .Values.jobs.run_tasks.backoffLimit }}
|
backoffLimit: {{ .Values.jobs.run_tasks.backoffLimit }}
|
||||||
template:
|
template:
|
||||||
|
@ -4001,6 +4001,10 @@ conf:
|
|||||||
times: 6
|
times: 6
|
||||||
type: constant
|
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:
|
manifests:
|
||||||
configmap_bin: true
|
configmap_bin: true
|
||||||
configmap_etc: true
|
configmap_etc: true
|
||||||
|
@ -7,4 +7,5 @@ rally:
|
|||||||
- 0.2.2 Add values for backoffLimit and restartPolicy
|
- 0.2.2 Add values for backoffLimit and restartPolicy
|
||||||
- 0.2.3 Update default image values to Wallaby
|
- 0.2.3 Update default image values to Wallaby
|
||||||
- 0.2.4 Migrated PodDisruptionBudget resource to policy/v1 API version
|
- 0.2.4 Migrated PodDisruptionBudget resource to policy/v1 API version
|
||||||
|
- 0.2.5 Add helm hook for jobs
|
||||||
...
|
...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user