Remove trailing whitespaces in README
This commit is contained in:
parent
9f04812bcf
commit
c4bc647ce9
40
README.md
40
README.md
@ -17,11 +17,11 @@ mirrors: {}
|
||||
```
|
||||
|
||||
Currently there are two types of mirrors that are supported:
|
||||
- Git
|
||||
- Git
|
||||
- Custom Comand
|
||||
|
||||
|
||||
Let's start with git.
|
||||
Let's start with git.
|
||||
|
||||
```yaml
|
||||
# Basic example
|
||||
@ -33,7 +33,7 @@ mirrors:
|
||||
path: charts/something
|
||||
commit: |-
|
||||
chore: mirror something
|
||||
|
||||
|
||||
```
|
||||
|
||||
As you can see, it won't work on scale, so all the field can be templated using the chart data and a couple of helpers.
|
||||
@ -77,7 +77,7 @@ Also you can provide `rebase<bool>` and `default_branch<string>`, if you want he
|
||||
That would be it for git, and now the second option: CustomCommand
|
||||
|
||||
The process of mirroring is split into two parts:
|
||||
- Package
|
||||
- Package
|
||||
- Upload
|
||||
|
||||
The second is being executed only if you don't run in the `dry-run` mode. Git mirror handles it in code. But for custom command you'll have to define it yourself. Just check the following example:
|
||||
@ -127,7 +127,7 @@ charts:
|
||||
# the name of the repo from the .repositories
|
||||
repository: flux-community
|
||||
# it will be latest if not provided, or you can fix it here
|
||||
#
|
||||
#
|
||||
# but if you use git repos, it makes sense to always use latest
|
||||
# becase in a git repo usually there is only one version
|
||||
# of a chart, and you either need to guess it, or just fix it
|
||||
@ -152,10 +152,10 @@ Until this moment, it looks exactly like a yet another helm chart mirroring solu
|
||||
|
||||
---
|
||||
|
||||
First one is `extensions` config property.
|
||||
> Currently it will only cope files to your chart after it was pulled from the upstream. But later I plan to add an ability to use variables there, so one extension can more-or-less easily be reused between charts.
|
||||
First one is `extensions` config property.
|
||||
> Currently it will only cope files to your chart after it was pulled from the upstream. But later I plan to add an ability to use variables there, so one extension can more-or-less easily be reused between charts.
|
||||
|
||||
Why would one need it? Well, me for example, in my clusters I use Istio as an ingress controller and db-operator to manage databases, and since usually charts are provided with `ingress` and obviously without `database` custom resources, I can't just use them without modifications. I don't want to modify manifests that are generated by helm, because of many reasons. So I need to have them in the helm chart. Since I'm using helmfile, I can add them as dependencies without forking charts, but it still not the perfect solution I guess.
|
||||
Why would one need it? Well, me for example, in my clusters I use Istio as an ingress controller and db-operator to manage databases, and since usually charts are provided with `ingress` and obviously without `database` custom resources, I can't just use them without modifications. I don't want to modify manifests that are generated by helm, because of many reasons. So I need to have them in the helm chart. Since I'm using helmfile, I can add them as dependencies without forking charts, but it still not the perfect solution I guess.
|
||||
|
||||
So, here come extensions. You can create a `VirtualService` and a `Database`, let's say you've created something like that:
|
||||
```
|
||||
@ -166,7 +166,7 @@ extensions
|
||||
virtual-service.yaml
|
||||
```
|
||||
|
||||
And then you can add it to you helmule config
|
||||
And then you can add it to you helmule config
|
||||
|
||||
```yaml
|
||||
charts:
|
||||
@ -192,13 +192,13 @@ And if you run helmule now, you'll see additional resources added to the chart.
|
||||
|
||||
---
|
||||
|
||||
The second feature is `patches`. Those are supposed to be modifications to helm chart that require more logic than just copy-paste.
|
||||
The second feature is `patches`. Those are supposed to be modifications to helm chart that require more logic than just copy-paste.
|
||||
|
||||
There are 4 kinds of patches at the moment.
|
||||
There are 4 kinds of patches at the moment.
|
||||
|
||||
1. Regexp patch. This one will create a regexp and try to replace it with desired value. It's not checking if anything was actually changed though. It can be defined like that
|
||||
1. Regexp patch. This one will create a regexp and try to replace it with desired value. It's not checking if anything was actually changed though. It can be defined like that
|
||||
```yaml
|
||||
charts:
|
||||
charts:
|
||||
- name: flux2
|
||||
patches:
|
||||
- name: Some regexp patch
|
||||
@ -222,7 +222,7 @@ It was the first kind of patch added, so it's more or less POC. I wouldn't recom
|
||||
2. Git patch. You see "Git" here, but it doesn't mean that it's working only with git repos. What it's doing is it's initializing a git repo in the chart dir, and trying to apply a git patch you've provided. To create one, you could use a flag `--init-git-patch $CHART_NAME_1,$CHART_NAME_2`. Then helmule won't try to mirror charts that are listed under that flug, but it will init git repos in their root folders and prints paths to them, so you can go there, change something, execute `git diff > $CONFIG_DIR/chart.patch` and then add it to the config like that:
|
||||
|
||||
```yaml
|
||||
charts:
|
||||
charts:
|
||||
- name: flux2
|
||||
patches:
|
||||
- name: Some git patch
|
||||
@ -256,7 +256,7 @@ charts:
|
||||
It's also possible to re-use patches by different charts. If you have a common patch, you can define it on the root level of you config:
|
||||
```yaml
|
||||
charts: {}
|
||||
patches:
|
||||
patches:
|
||||
- name: yamlfmt
|
||||
custom_command:
|
||||
commands:
|
||||
@ -268,11 +268,11 @@ patches:
|
||||
And then, if you define a patch with the name only for a chart, it's going to be taken from global patches
|
||||
|
||||
```yaml
|
||||
charts:
|
||||
charts:
|
||||
- name: flux2
|
||||
patches:
|
||||
- name: yamlfmt
|
||||
patches:
|
||||
patches:
|
||||
- name: yamlfmt
|
||||
custom_command:
|
||||
commands:
|
||||
@ -285,7 +285,7 @@ patches:
|
||||
|
||||
One last thing that is not described yet is the `include` property. It looks like that:
|
||||
```yaml
|
||||
include:
|
||||
include:
|
||||
- kind Charts # Can also be Repositories and Mirrors, other properties will be includable later
|
||||
path: ./charts.yaml
|
||||
charts: {}
|
||||
@ -297,7 +297,7 @@ The included file will be marshalled into a vector of desired property. But the
|
||||
# charts.yaml
|
||||
name: flux2
|
||||
repository: flux-community
|
||||
mirrors:
|
||||
mirrors:
|
||||
- my-git-mirror
|
||||
```
|
||||
|
||||
@ -305,6 +305,6 @@ mirrors:
|
||||
# charts.yaml
|
||||
- name: flux2
|
||||
repository: flux-community
|
||||
mirrors:
|
||||
mirrors:
|
||||
- my-git-mirror
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user