The kubernetes unit does not find the source file if it is above the current directory
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
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 ./.
Bug. Thanks for report.
Should work correct in https://github.com/shalb/cluster.dev/releases/tag/v0.9.6 Check pls
Worked, thanx!