掌舵服务集合 [英] Helm managing a collection of services

查看:78
本文介绍了掌舵服务集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Kubernetes集群,该集群运行许多独立的离散服务.我想使用头盔来部署它们,并且为每个单独的资源都制作了头盔图.

I have a Kubernetes cluster that runs a number of independent, discrete services. I want to use helm to deploy them, and I have made a helm chart for every individual resource.

但是,现在我希望能够将集群作为单个实体进行部署,但是我不清楚掌舵如何支持将多个图表拼接在一起.

However, now I want to be able to deploy the cluster as a single entity, but it is not clear to me how helm supports stitching together multiple charts.

当我查看示例存储库时,它们只是在单个图表的模板文件夹中包含每个单个模板文件,然后是一个庞大而庞大的Values.yaml文件.

When I look at example repos, they simply have every single template file in the template folder of a single chart, and then a giant, sprawling Values.yaml file.

在我看来,这似乎是无稽之谈,尤其是在2000行Values.yaml上爬行以查找设置.

To me, that seems unwieldly, especially crawling around a 2000 line Values.yaml looking for settings.

有没有办法采用如下所示的文件夹结构:

Is there any way to take a folder structure that looks like this:

helm
|____ Service1
      |_______ values.yaml
      |_______ templates
      Service2
      |_______ values.yaml
      |_______ templates
      Service3
      |_______ values.yaml
      |_______ templates

然后将其打包到一个部署中,而无需手动合并和删除重复数据和值?

And package it into one deployment without manually merging and de-duping the files and values?

推荐答案

使用 helm子图

您需要使用元图myapps之类的东西.然后,您将像这样添加requirements.yaml文件:

You'd need to have something like a meta-chart, myapps. Then you'd add a requirements.yaml file like so:

# myapp/requirements.yaml
dependencies:
  - name: Service1
    repository: http://localhost:10191
    version: 0.1.0
  - name: Service2
    repository: http://localhost:10191
    version: 0.1.0
  - name: Service3
    repository: http://localhost:10191
    version: 0.1.0

这篇关于掌舵服务集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆