Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Using direct link to docker/kubernetes/kustomize in kustomization.yaml on local raises submodule access error #6110

Closed
2 tasks done
prateek-ec opened this issue Jul 18, 2024 · 1 comment
Labels

Comments

@prateek-ec
Copy link

📜 Description

Hello,
I was trying to directly enter the link to the docker/kubernetes/kustomize in my kustomization.yaml file as mentioned below:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - https://github.com/novuhq/novu.git//docker/kubernetes/kustomize?ref=086b62851098d59809cfcc1773a91dc3aed1eec6

On running the kustomize build . in the directory results in an error.

Error: accumulating resources: accumulation err='accumulating resources from 'https://github.com/novuhq/novu.git//docker/kubernetes/kustomize?ref=086b62851098d59809cfcc1773a91dc3aed1eec6': URL is a git repository': failed to run '/usr/bin/git submodule update --init --recursive': Submodule 'enterprise' ([email protected]:novuhq/packages-enterprise.git) registered for path '.source'
Cloning into '/private/var/folders/0z/07y73hp94xl_bjfrsfctztcc0000gn/T/kustomize-347933844/.source'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:novuhq/packages-enterprise.git' into submodule path '/private/var/folders/0z/07y73hp94xl_bjfrsfctztcc0000gn/T/kustomize-347933844/.source' failed
Failed to clone '.source'. Retry scheduled
Cloning into '/private/var/folders/0z/07y73hp94xl_bjfrsfctztcc0000gn/T/kustomize-347933844/.source'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:novuhq/packages-enterprise.git' into submodule path '/private/var/folders/0z/07y73hp94xl_bjfrsfctztcc0000gn/T/kustomize-347933844/.source' failed
Failed to clone '.source' a second time, aborting
: exit status 1

👟 Reproduction steps

  1. Copy the URL of the docker/kubernetes/kustomize directory as resource in kustomization.yaml file.
  2. Run kustomize build .

kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - https://github.com/novuhq/novu.git//docker/kubernetes/kustomize?ref=086b62851098d59809cfcc1773a91dc3aed1eec6

👍 Expected behavior

It should clone the files locally without getting the submodule and build the files in docker/kubernetes/kustomize directory.

👎 Actual Behavior with Screenshots

Here is the error:

Error: accumulating resources: accumulation err='accumulating resources from 'https://github.com/novuhq/novu.git//docker/kubernetes/kustomize?ref=086b62851098d59809cfcc1773a91dc3aed1eec6': URL is a git repository': failed to run '/usr/bin/git submodule update --init --recursive': Submodule 'enterprise' ([email protected]:novuhq/packages-enterprise.git) registered for path '.source'
Cloning into '/private/var/folders/0z/07y73hp94xl_bjfrsfctztcc0000gn/T/kustomize-347933844/.source'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:novuhq/packages-enterprise.git' into submodule path '/private/var/folders/0z/07y73hp94xl_bjfrsfctztcc0000gn/T/kustomize-347933844/.source' failed
Failed to clone '.source'. Retry scheduled
Cloning into '/private/var/folders/0z/07y73hp94xl_bjfrsfctztcc0000gn/T/kustomize-347933844/.source'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:novuhq/packages-enterprise.git' into submodule path '/private/var/folders/0z/07y73hp94xl_bjfrsfctztcc0000gn/T/kustomize-347933844/.source' failed
Failed to clone '.source' a second time, aborting
: exit status 1

Novu version

next

npm version

8.12.1

node version

v18.4.0

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

@prateek-ec
Copy link
Author

Added the flag for submodules=false fixed the issue.

Here is the updated kustomization.yaml file

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - https://github.com/novuhq/novu//docker/kubernetes/kustomize?ref=v0.24.1&submodules=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant