Fix lint errors
Some checks failed
Lint Checks / Run linter (pull_request) Successful in 1m26s
Deploy Test / Run deploy test suite (pull_request) Successful in 3m27s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Successful in 4m42s
Webapp Test / Run webapp test suite (pull_request) Failing after 4m49s
Smoke Test / Run basic test suite (pull_request) Successful in 5m20s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 5m47s

This commit is contained in:
Prathamesh Musale 2025-12-02 15:13:30 +05:30
parent fbe65561f9
commit 6586afc6e8

View File

@ -13,13 +13,11 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
import shutil
from pathlib import Path
from stack_orchestrator import constants
from stack_orchestrator.opts import opts
from stack_orchestrator.util import (
get_stack_path,
get_parsed_stack_config,
get_pod_list,
get_pod_file_path,
@ -59,7 +57,11 @@ def _wrap_job_templates_with_conditionals(chart_dir: Path, jobs: list) -> None:
# Wrap with conditional (default false)
# Use 'index' function to handle job names with dashes
# Provide default dict for .Values.jobs to handle case where it doesn't exist
wrapped_content = f"""{{{{- if (index (.Values.jobs | default dict) "{job_name}" | default dict).enabled | default false }}}}
condition = (
f"{{{{- if (index (.Values.jobs | default dict) "
f'"{job_name}" | default dict).enabled | default false }}}}'
)
wrapped_content = f"""{condition}
{content}{{{{- end }}}}
"""
@ -351,10 +353,10 @@ Edit the generated template files in `templates/` to customize:
print(" 2. Review generated templates:")
print(" ls templates/")
print("")
print(f" 3. Install to Kubernetes:")
print(" 3. Install to Kubernetes:")
print(f" helm install {chart_name} {chart_dir}")
print("")
print(f" # Or use your own release name")
print(" # Or use your own release name")
print(f" helm install <your-release-name> {chart_dir}")
print("")
print(" 4. Check deployment:")