[go: up one dir, main page]

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

The kubernetes unit does not find the source file if it is above the current directory #277

Closed
kinseii opened this issue Aug 2, 2024 · 4 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@kinseii
Copy link
kinseii commented Aug 2, 2024

Problem:
The kubernetes unit does not find the source file if it is above the current directory (with relative path ../):

---
kind: StackTemplate
name: service
units:
  - name: test-configmap
    type: kubernetes
    provider_conf:
      config_context: {{ .variables.cluster_name }}
    source: ../../_templates/test-configmap/test-configmap.yaml

Error output:

19:25:12 [FATAL] Fatal error: load project configuration: read units: stack 'qwerty-aks-us-1', reading units: reading kubernetes unit 'qwerty-aks-us-1.test-configmap': reading kubernetes manifests form source '../../_templates/test-configmap/test-configmap.yaml': stat ../../_templates/test-configmap/test-configmap.yaml: no such file or directory
Unit data:
name: test-configmap
provider_conf:
    config_context: qwerty-aks-us-1
source: ../../_templates/test-configmap/test-configmap.yaml
type: kubernetes

If you don't use exit above the current directory, everything works. Example:

kind: StackTemplate
name: service
units:
  - name: test-configmap
    type: kubernetes
    provider_conf:
      config_context: {{ .variables.cluster_name }}
    source: ./test-configmap/test-configmap.yaml

Cluster.dev Version:
cdev version v0.9.5

@kinseii kinseii added the kind/bug Something isn't working label Aug 2, 2024
@kinseii
Copy link
Author
kinseii commented Aug 9, 2024

Successfully works from the current directory with ./, thus: source: ./../../_templates/test-configmap/test-configmap.yaml.
But it may be worthwhile to provide for operation without specifying ./.

@romanprog
Copy link
Contributor

Bug. Thanks for report.

@romanprog
Copy link
Contributor
romanprog commented Sep 11, 2024

Should work correct in https://github.com/shalb/cluster.dev/releases/tag/v0.9.6
Check pls

@kinseii
Copy link
Author
kinseii commented Sep 11, 2024

Worked, thanx!

@kinseii kinseii closed this as completed Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants