• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

helm3-charts: 精选的Rancher 2.0增强版Helm 3 charts

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

helm3-charts

开源软件地址:

https://gitee.com/rancher/helm3-charts

开源软件介绍:

Rancher Catalog

A curated collection of Rancher 2.0 enhanced Helm 3 charts. To see how catalogs are added and used in Rancher 2.0 take a look at the docs page.

Note: This is specific to Helm 3 charts and is added into Rancher to be deployed using Helm3.

Rancher Chart Structure

A Rancher chart repository differs slightly in directory structure from upstream repos in that it includes an app version directory. Though Rancher can use native Helm repositories as well.

A Rancher chart also has two additional files an app-readme.md file that provides a high level overview display in the Rancher 2.0 UI and a questions.yml file defining questions to prompt the user with.

charts/wordpress/<app version>/  app-readme.md            # Rancher Specific: Readme file for display in Rancher 2.0 UI  charts/                  # Directory containing dependency charts  Chart.yaml               # Required Helm chart information file  questions.yml            # Rancher Specific: File containing questions for Rancher 2.0 UI  README.md                # Optional: Helm Readme file (will be rendered in Rancher 2.0 UI as well)  requirements.yaml        # Optional YAML file listing dependencies for the chart  templates/               # A directory of templates that, when combined with values.yml will generate K8s YAML  values.yaml              # The default configuration values for this chart

See the upstream Helm chart developer reference for a complete walk through of developing charts.

To convert an upstream chart to take advantage of Rancher's enhanced UX, first create an app-readme.md file in the root of your chart.

$ cat ./app-readme.md# Wordpress ROCKS!

Then add a questions.yml file to prompt the user for something.

categories:- Blog- CMSquestions:- variable: persistence.enabled  default: "false"  description: "Enable persistent volume for WordPress"  type: boolean  required: true  label: WordPress Persistent Volume Enabled  show_subquestion_if: true  group: "WordPress Settings"  subquestions:  - variable: persistence.size    default: "10Gi"    description: "WordPress Persistent Volume Size"    type: string    label: WordPress Volume Size  - variable: persistence.storageClass    default: ""    description: "If undefined or null, uses the default StorageClass. Default to null"    type: storageclass    label: Default StorageClass for WordPress

The above will prompt the user with a true / false radio button in the UI for enabling persistent storage. If the user choses to enable persistent storage they will be prompted for a storage class and volume size.

The above file also provides a list of categories that this chart fits into. This helps users navigate and filtering when browsing the catalog UI.

Question Variable Reference

VariableTypeRequiredDescription
variablestringtruedefine the variable name specified in the values.yamlfile, using foo.bar for nested object.
labelstringtruedefine the UI label.
descriptionstringfalsespecify the description of the variable.
typestringfalsedefault to string if not specified (current supported types are string, multiline, boolean, int, enum, password, storageclass, hostname, pvc, and secret).
requiredboolfalsedefine if the variable is required or not (true | false)
defaultstringfalsespecify the default value.
groupstringfalsegroup questions by input value.
min_lengthintfalsemin character length.
max_lengthintfalsemax character length.
minintfalsemin integer length.
maxintfalsemax integer length.
options[]stringfalsespecify the options when the vriable type is enum, for example: options:
- "ClusterIP"
- "NodePort"
- "LoadBalancer"
valid_charsstringfalseregular expression for input chars validation.
invalid_charsstringfalseregular expression for invalid input chars validation.
subquestions[]subquestionfalseadd an array of subquestions.
show_ifstringfalseshow current variable if conditional variable is true, for example show_if: "serviceType=Nodeport"
show_subquestion_ifstringfalseshow subquestions if is true or equal to one of the options. for example show_subquestion_if: "true"

subquestions: subquestions[] cannot contain subquestions or show_subquestions_if keys, but all other keys in the above table are supported.

License

Copyright (c) 2018 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
hoaven-libRedis: 基于Redis搭建的分布式锁发布时间:2022-03-25
下一篇:
awesome-kubernetes: 一份精心策划的 kubernetes 资料清单发布时间:2022-03-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap