舵手依赖项
舵手依赖项
管理图表的依赖项
概要
管理图表的依赖项。
舵手图表将其依赖项存储在 'charts/' 中。对于图表开发人员来说,通常在 'Chart.yaml' 中管理依赖项更容易,它声明了所有依赖项。
依赖项命令对该文件进行操作,从而使同步所需依赖项和存储在 'charts/' 目录中的实际依赖项变得容易。
例如,此 Chart.yaml 声明了两个依赖项
# Chart.yaml
dependencies:
- name: nginx
version: "1.2.3"
repository: "https://example.com/charts"
- name: memcached
version: "3.2.1"
repository: "https://another.example.com/charts"
'name' 应该是图表的名称,该名称必须与该图表 'Chart.yaml' 文件中的名称匹配。
'version' 字段应包含语义版本或版本范围。
'repository' URL 应该指向图表仓库。舵手期望通过将 '/index.yaml' 附加到 URL 来检索图表仓库的索引。注意:'repository' 可以是别名。别名必须以 'alias:' 或 '@' 开头。
从 2.2.0 开始,可以将 repository 定义为本地存储的依赖图表目录的路径。路径应以 "file://" 为前缀。例如,
# Chart.yaml
dependencies:
- name: nginx
version: "1.2.3"
repository: "file://../dependency_chart/nginx"
如果依赖图表是在本地检索的,则不需要通过 "helm add repo" 将仓库添加到舵手中。版本匹配也适用于这种情况。
选项
-h, --help help for dependency
从父命令继承的选项
--burst-limit int client-side default throttling limit (default 100)
--debug enable verbose output
--kube-apiserver string the address and the port for the Kubernetes API server
--kube-as-group stringArray group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--kube-as-user string username to impersonate for the operation
--kube-ca-file string the certificate authority file for the Kubernetes API server connection
--kube-context string name of the kubeconfig context to use
--kube-insecure-skip-tls-verify if true, the Kubernetes API server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kube-tls-server-name string server name to use for Kubernetes API server certificate validation. If it is not provided, the hostname used to contact the server is used
--kube-token string bearer token used for authentication
--kubeconfig string path to the kubeconfig file
-n, --namespace string namespace scope for this request
--qps float32 queries per second used when communicating with the Kubernetes API, not including bursting
--registry-config string path to the registry config file (default "~/.config/helm/registry/config.json")
--repository-cache string path to the file containing cached repository indexes (default "~/.cache/helm/repository")
--repository-config string path to the file containing repository names and URLs (default "~/.config/helm/repositories.yaml")
另请参阅
- 舵手 - Kubernetes 的舵手包管理器。
- 舵手依赖项构建 - 根据 Chart.lock 文件重建 charts/ 目录
- 舵手依赖项列表 - 列出给定图表的依赖项
- 舵手依赖项更新 - 根据 Chart.yaml 的内容更新 charts/