From 1fb34b368fbedaba2f9545df01c71f27dc564981 Mon Sep 17 00:00:00 2001 From: kumarrahul04 <146384313+kumarrahul04@users.noreply.github.com> Date: Mon, 13 Jan 2025 13:18:59 -0500 Subject: [PATCH] CASMCMS-9203: Generate unique name for cms-ipxe job (#112) * Generate unique job name for cms-ipxe * updated * updated * updated * updated * updated * review comments --- CHANGELOG.md | 5 +++++ kubernetes/cms-ipxe/templates/post-upgrade.yaml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2093065..7f42aef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Fixed +- Assigning unique name to cms-ipxe job to avoid following upgrade issue: + `post-upgrade cms-ipxe/templates/post-upgrade.yaml failed: jobs.batch "cms-ipxe" already exists chart=cms-ipxe` + ## [1.15.1] - 2025-1-6 ### Changed - Added additional logic to correct for whitespace characters in helm options file diff --git a/kubernetes/cms-ipxe/templates/post-upgrade.yaml b/kubernetes/cms-ipxe/templates/post-upgrade.yaml index b818f6d..44bcd63 100644 --- a/kubernetes/cms-ipxe/templates/post-upgrade.yaml +++ b/kubernetes/cms-ipxe/templates/post-upgrade.yaml @@ -1,7 +1,7 @@ {{/* MIT License -(C) Copyright 2021-2023 Hewlett Packard Enterprise Development LP +(C) Copyright 2022-2025 Hewlett Packard Enterprise Development LP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -24,7 +24,7 @@ OTHER DEALINGS IN THE SOFTWARE. apiVersion: batch/v1 kind: Job metadata: - name: "{{ .Release.Name }}" + name: "{{ .Release.Name }}-{{ randAlphaNum 6 | lower }}" labels: app.kubernetes.io/managed-by: {{ .Release.Service | quote }} app.kubernetes.io/instance: {{ .Release.Name | quote }}