-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helm file plugin and local dependency chart usage readme (#3178)
* Add helm file plugin and local dependency chart usage readme * Revert stress infrastructure to use http repository reference * Update tools/stress-cluster/cluster/kubernetes/stress-test-addons/file-plugin/README.md Co-authored-by: Albert Cheng <38804567+ckairen@users.noreply.github.com> * Use 'git root' as placeholder path name Co-authored-by: Albert Cheng <38804567+ckairen@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
tools/stress-cluster/cluster/kubernetes/stress-test-addons/file-plugin/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Simple helm plugin to enable the file protocol for `helm repo add file://` paths in order to simplify | ||
local development of the stress-test-addon library chart with stress test charts that take it as a dependency. | ||
Requires powershell core. | ||
|
||
Example usage to override remove chart dependencies with a local version below. | ||
|
||
For a helm chart with a named chart dependency `@stresstestcharts`: | ||
|
||
``` | ||
$ tail Chart.yaml -n 3 | ||
- name: stress-test-addons | ||
version: 0.1.16 | ||
repository: "@stresstestcharts" | ||
``` | ||
|
||
Install named `stresstestcharts` repository from remote ur: | ||
|
||
``` | ||
helm repo add stresstestcharts https://stresstestcharts.blob.core.windows.net/helm/ | ||
``` | ||
|
||
Install remote library chart from stresstestcharts repositor: | ||
|
||
``` | ||
helm dependency update | ||
``` | ||
|
||
Add file plugin to support `file://` repositories, this only has to be done once: | ||
|
||
``` | ||
helm plugin add <git root>/tools/stress-cluster/cluster/kubernetes/stress-test-addons/file-plugin | ||
``` | ||
|
||
Use local version of named `stresstestcharts` library chart: | ||
|
||
``` | ||
helm repo add --force-update stresstestcharts file:///<git root>/azure-sdk-tools/tools/stress-cluster/cluster/kubernetes/stress-test-addons | ||
helm dependency update | ||
``` | ||
|
||
Revert to remote version of library chart | ||
|
||
``` | ||
helm repo add --force-update stresstestcharts https://stresstestcharts.blob.core.windows.net/helm/ | ||
helm dependency update | ||
``` |
12 changes: 12 additions & 0 deletions
12
tools/stress-cluster/cluster/kubernetes/stress-test-addons/file-plugin/bin/file.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
# See https://helm.sh/docs/topics/plugins/#downloader-plugins | ||
param( | ||
[string]$certFile, | ||
[string]$keyFile, | ||
[string]$caFile, | ||
[string]$url | ||
) | ||
|
||
$path = $url -replace "file://" | ||
Get-Content "$path" -Raw |
7 changes: 7 additions & 0 deletions
7
tools/stress-cluster/cluster/kubernetes/stress-test-addons/file-plugin/plugin.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: file | ||
version: 0.1 | ||
description: Enables file:// protocol for helm repositories | ||
downloaders: | ||
- command: "bin/file.ps1" | ||
protocols: | ||
- "file" |