Comments (12)
I have some ideas. I distinguish the stored files and pkg according to the angocd application. Each application is assigned a stored file, so that it should be able to be installed.
from kcl.
Hello @riven-blade I've updated the package cache path to /tmp in this PR kcl-lang/kcl-lang.io#390 you can refer it to update the plugin config.
Thanks for the feedback.
from kcl.
from kcl.
@riven-blade Your configuration seems to rely on external packages, but it doesn't seem to have placed the cache in the corresponding location. Have you changed the configuration of argocd kcl plugin and restarted argocd?
from kcl.
Yes, I changed the cache and pkg paths according to the issuer, and restarted argocd
from kcl.
Yes, I changed the cache and pkg paths according to the issuer, and restarted argocd
Can you set this environment variable locally, run this configuration repeatedly locally, and tell me the time cost and show the ls /tmp
output? Besides, what's the kcl version in the kcllang/kcllang-cmp-plugin
image?
from kcl.
export KCL_CACHE_PATH="/tmp/kcl_cache.${ARGOCD_APP_NAME}.${ARGOCD_APP_NAMESPACE}"
export KCL_PKG_PATH="/tmp/kcl_pkg.${ARGOCD_APP_NAME}.${ARGOCD_APP_NAMESPACE}"
create_dir_if_not_exists() {
local dir_path=$1
if [ ! -d "$dir_path" ]; then
mkdir -p "$dir_path"
fi
}
create_dir_if_not_exists "$KCL_CACHE_PATH"
create_dir_if_not_exists "$KCL_PKG_PATH"
from kcl.
Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): plugin sidecar failed. error generating manifests in cmp: rpc error: code = Unknown desc = error generating manifests: /home/argocd/generate.sh
failed exit status 1: EvaluationError failed to access the file '/tmp/_cmp_server/f48cbbfa-b6fb-445a-b94a-332cec8bdb83/kcl-tiangong/./datastore/staging/application-config.yaml': No such file or directory (os error 2)
The yaml file is referenced in the code, and the cache server has an absolute path.
from kcl.
base: tiangong.App {
configMap = {"application-config.yaml": "./datastore/staging/application-config.yaml"}
secret = {"application-secret.yaml": "./datastore/staging/application-secret.yaml"}
}
from kcl.
Hello, you can use the file.modpath()
function to get the path. For example
import file
base: tiangong.App {
configMap = {"application-config.yaml": file.modpath() + "datastore/staging/application-config.yaml"}
secret = {"application-secret.yaml": file.modpath() + "datastore/staging/application-secret.yaml"}
}
from kcl.
@riven-blade KCL caches external dependency package code and compilation cache, both of which are recorded in relative paths. If you are a custom YAML configuration file, please ensure that it exists within kcl. mod and use a path relative to kcl. mod in the code to read it. For example.
import file
base: tiangong.App {
configMap = {"application-config.yaml": file.modpath() + "datastore/staging/application-config.yaml"}
secret = {"application-secret.yaml": file.modpath() + "datastore/staging/application-secret.yaml"}
}
from kcl.
Hello @riven-blade
The file.modpath
maybe cached cross different KCL modules, which is a bug. And I will fix it latter. Thanks for the feedback.
from kcl.
Related Issues (20)
- [Enhancement] Add hover information when input the function argument HOT 1
- Assignments in expressions with square brackets fail HOT 2
- bug in adding to list HOT 1
- [Bug] Hover definition not found in the nest schema without the schema name HOT 4
- [Enhancement] Enhance highlighting of nested quotes in long strings. HOT 8
- [Enhancement] Do not upgrade type in the assign statement for the literal type
- Implicit interfaces HOT 2
- kcl run split stderr and stdout ? HOT 2
- Have not get the | - + from """ HOT 2
- Have Repeat run the if conditional . HOT 2
- [BUG] Support configurable PROTOC environment variable with fallback to vendored binaries
- The implicit type specification issue (KCL_FAST_EVAL=1) HOT 1
- Conditional checks on imported resources HOT 1
- doc generate error / 文档生成错误 HOT 4
- When I use attribute as a literal type, the doc generate error. HOT 2
- [GLCC] Enhancement: KCL IDE automatically updates the dependencies through the mod toolchain. HOT 4
- [Enhancement] Enhance the completion experience of KCL Import for both internal and external packages
- How to check dict type in schema HOT 2
- Support procedural for loops HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kcl.