Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Support of kustomize remotebase / git submodule #232

Description

@dwkop

Issue

Currently kargo-render uses a flag --load-restrictor LoadRestrictionsRootOnly in case of kustomize, which actually blocks the usage of kustomize remote bases or kustomize remote components.

#kargo-render.yaml
configVersion: v1alpha1
branchConfigs:
- name: stage/dev
  appConfigs:
    demo:
      configManagement:
        kustomize:
          path: stages/dev
      outputPath: demo
#stages/dev/kustomization.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

## Remote Components
resources:
  - https://gh-enterprise.com/org/kargo-demo-kustomize.git//stages/dev-remote?ref=HEAD
#components:
#  - https://gh-enterprise.com/org/kargo-demo-kustomize.git//stages/dev-remote?ref=HEAD

Error

time="2024-01-03T11:35:09Z" level=error msg="error executing Promotion: error executing Git-based promotion mechanisms: error executing Kargo Render promotion mechanisms: error rendering manifests for git repo \"https://gh-enterprise.com/org/kargo-demo-service\" via Kargo Render: error rendering manifests: error executing cmd [/usr/local/bin/kargo-render render --repo https://gh-enterprise.com/org/kargo-demo-service --ref  --target-branch stage/dev --repo-username cortex-bot --output json --image artifacts.rbi.tech/docker/org/cortex-template-kustomize-application/nginx:2023.52.13]: Error: error pre-rendering manifests: error generating manifests using Argo CD repo server: `kustomize build /tmp/1395234519/repo/stages/dev --load-restrictor LoadRestrictionsRootOnly` failed exit status 1: Error: accumulating resources: accumulating resources from 'https://gh-enterprise.com/org/kargo-demo-kustomize.git//stages/dev-remote?ref=HEAD': MalformedYAMLError: yaml: line 175: mapping values are not allowed in this context in File: https://gh-enterprise.com/org/kargo-demo-kustomize.git//stages/dev-remote?ref=HEAD\n" freight=4fadca4b6a0c9f671f143df43e50272e9201083c namespace=kargo-demo-service promotion=dev.01hk7hp6sf8hpq1q7ektcrfjsf.4fadca4 stage=dev

Proposal

  • Support the usage of kustomize remote base or remote components by using kustomize flag --load-restrictor LoadRestrictionsNone
  • Support git submodules as an equivalent way to render manifests into another repo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions