Merge pull request #638 from nflondo/nmc-readme
Additional instructions to migrate section of READMEpull/640/head
commit
e9d0ea9f1f
17
README.md
17
README.md
|
@ -227,7 +227,7 @@ ChartMetadata:
|
||||||
icon: https://www.kubewarden.io/images/icon-kubewarden.svg
|
icon: https://www.kubewarden.io/images/icon-kubewarden.svg
|
||||||
```
|
```
|
||||||
## Migrate existing chart to automated updates
|
## Migrate existing chart to automated updates
|
||||||
After chart is migrated, it should get updated from your helm/github repo automatically.
|
These steps are for charts still using `package.yaml` to track upstream chart. These charts should be migrated to receive automatic updates via an `upstream.yaml` by following the steps below. After chart is migrated, it should get updated from your helm/github repo automatically.
|
||||||
|
|
||||||
#### 1. Fork partner-charts repository, clone your fork, checkout the main-source branch and pull the latest changes. Then create a new branch off of main-source
|
#### 1. Fork partner-charts repository, clone your fork, checkout the main-source branch and pull the latest changes. Then create a new branch off of main-source
|
||||||
|
|
||||||
|
@ -254,25 +254,24 @@ EOF
|
||||||
mv partner-charts/packages/kubewarden-controller/generated-changes/overlay partner-charts/packages/suse/kubewarden-controller/
|
mv partner-charts/packages/kubewarden-controller/generated-changes/overlay partner-charts/packages/suse/kubewarden-controller/
|
||||||
```
|
```
|
||||||
Check the old generated-changes/patch directory for any requisite other changes. If there is an edit in `Chart.yaml.patch` that needs to be replicated, it can be handled in the `upstream.yaml` `ChartMetadata` (see https://github.com/rancher/partner-charts#configuration-file). If it is a change for any other file in the chart it can be done via an overlay file. See https://github.com/rancher/partner-charts#overlay
|
Check the old generated-changes/patch directory for any requisite other changes. If there is an edit in `Chart.yaml.patch` that needs to be replicated, it can be handled in the `upstream.yaml` `ChartMetadata` (see https://github.com/rancher/partner-charts#configuration-file). If it is a change for any other file in the chart it can be done via an overlay file. See https://github.com/rancher/partner-charts#overlay
|
||||||
#### 5. Check the old `generated-changes/patch` directory for any requisite other changes. If there is an edit in `Chart.yaml.patch` that needs to be replicated, it can be handled in the upstream.yaml's `ChartMetadata` like shown above for `kubeVersion` and `icon`.
|
|
||||||
|
|
||||||
#### 6. Clean up old packages and charts directories:
|
#### 5. Clean up old packages and charts directories:
|
||||||
```bash
|
```bash
|
||||||
git rm -r packages/<chart>
|
git rm -r packages/<chart>
|
||||||
git rm -r charts/<chart>
|
git rm -r charts/<chart>
|
||||||
```
|
```
|
||||||
* Note: If a chart is using a logo file in partner-charts repo, make sure the `icon:` variable is set correctly in the `upstream.yaml ChartMetadata`.
|
* Note: If a chart is using a logo file in partner-charts repo, make sure the `icon:` variable is set correctly in the `upstream.yaml ChartMetadata`.
|
||||||
|
|
||||||
#### 7. Stage your changes (To make sure the config works, and to setup the new charts and assets directories)
|
#### 6. Stage your changes (To make sure the config works, and to setup the new charts and assets directories)
|
||||||
```bash
|
```bash
|
||||||
export PACKAGE=<company>/<chart>
|
export PACKAGE=<company>/<chart>
|
||||||
bin/partner-charts-ci stage
|
bin/partner-charts-ci stage
|
||||||
```
|
```
|
||||||
#### 8. Move the old assets files to the new directory (Sometimes this is unchanged but most times it does change)
|
#### 7. Move the old assets files to the new directory (Sometimes this is unchanged but most times it does change)
|
||||||
```bash
|
```bash
|
||||||
git mv assets/<chart>/* assets/<company>/
|
git mv assets/<chart>/* assets/<company>/
|
||||||
```
|
```
|
||||||
#### 9. Update the `index.yaml` to reflect the new assets path for existing entries
|
#### 8. Update the `index.yaml` to reflect the new assets path for existing entries
|
||||||
```bash
|
```bash
|
||||||
sed -i 's%assets/<chart>%assets/<company>%' index.yaml
|
sed -i 's%assets/<chart>%assets/<company>%' index.yaml
|
||||||
```
|
```
|
||||||
|
@ -281,13 +280,13 @@ After doing this, run this loop to validate that every assets file referenced i
|
||||||
for charts in $(yq '.entries[][] | .urls[0]' index.yaml); do stat ${charts} > /dev/null; if [[ ! $? -eq 0 ]]; then echo ${charts}; fi; done
|
for charts in $(yq '.entries[][] | .urls[0]' index.yaml); do stat ${charts} > /dev/null; if [[ ! $? -eq 0 ]]; then echo ${charts}; fi; done
|
||||||
```
|
```
|
||||||
The command should return quickly with no output. If it outputs anything it means some referenced assets files don't exist which is a problem.
|
The command should return quickly with no output. If it outputs anything it means some referenced assets files don't exist which is a problem.
|
||||||
#### 10. Add/Commit your changes
|
#### 9. Add/Commit your changes
|
||||||
```bash
|
```bash
|
||||||
git add assets charts packages index.yaml
|
git add assets charts packages index.yaml
|
||||||
git commit -m "Migrating <vendor> <chart> chart"
|
git commit -m "Migrating <vendor> <chart> chart"
|
||||||
```
|
```
|
||||||
#### 11. Push your commit
|
#### 10. Push your commit
|
||||||
```bash
|
```bash
|
||||||
git push origin <your branch>
|
git push origin <your branch>
|
||||||
```
|
```
|
||||||
#### 12. Open a pull request to the `main-source` branch for review
|
#### 11. Open a pull request to the `main-source` branch for review
|
Loading…
Reference in New Issue