Update overrides url and structure
Change-Id: I327103c18fc0e10e989a17f69b3bff9995c45eb4
This commit is contained in:
parent
44241611d8
commit
d2ba2d1281
Binary file not shown.
24
main.go
24
main.go
@ -27,7 +27,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
const DefaultBaseUrl string = "https://opendev.org/openstack/openstack-helm/raw/branch/master"
|
const DefaultBaseUrl string = "https://opendev.org/openstack/openstack-helm/raw/branch/master/values_overrides"
|
||||||
|
|
||||||
func newRootCommand() *cobra.Command {
|
func newRootCommand() *cobra.Command {
|
||||||
var cwd string
|
var cwd string
|
||||||
@ -45,13 +45,13 @@ func newRootCommand() *cobra.Command {
|
|||||||
If 3 features are passed, then the overrides will be looked
|
If 3 features are passed, then the overrides will be looked
|
||||||
up in the following order:
|
up in the following order:
|
||||||
|
|
||||||
<overrides_path>/<chart>/values_overrides/<feature-3>.yaml
|
<overrides_path>/<chart>/<feature-3>.yaml
|
||||||
<overrides_path>/<chart>/values_overrides/<feature-2>.yaml
|
<overrides_path>/<chart>/<feature-2>.yaml
|
||||||
<overrides_path>/<chart>/values_overrides/<feature-2>-<feature-3>.yaml
|
<overrides_path>/<chart>/<feature-2>-<feature-3>.yaml
|
||||||
<overrides_path>/<chart>/values_overrides/<feature-1>.yaml
|
<overrides_path>/<chart>/<feature-1>.yaml
|
||||||
<overrides_path>/<chart>/values_overrides/<feature-1>-<feature-3>.yaml
|
<overrides_path>/<chart>/<feature-1>-<feature-3>.yaml
|
||||||
<overrides_path>/<chart>/values_overrides/<feature-1>-<feature-2>.yaml
|
<overrides_path>/<chart>/<feature-1>-<feature-2>.yaml
|
||||||
<overrides_path>/<chart>/values_overrides/<feature-1>-<feature-2>-<feature-3>.yaml
|
<overrides_path>/<chart>/<feature-1>-<feature-2>-<feature-3>.yaml
|
||||||
|
|
||||||
If you think of the features as bits of a binary number where <feature3> is
|
If you think of the features as bits of a binary number where <feature3> is
|
||||||
the least significant bit, then the order corresponds to all numbers from 001
|
the least significant bit, then the order corresponds to all numbers from 001
|
||||||
@ -102,16 +102,16 @@ func num2items(num uint32, power int) []int {
|
|||||||
|
|
||||||
func overrideFile(basePath, chart, subchart, overrideName string) string {
|
func overrideFile(basePath, chart, subchart, overrideName string) string {
|
||||||
if subchart != "" {
|
if subchart != "" {
|
||||||
return filepath.Join(basePath, chart, "values_overrides", subchart, overrideName)
|
return filepath.Join(basePath, chart, subchart, overrideName)
|
||||||
}
|
}
|
||||||
return filepath.Join(basePath, chart, "values_overrides", overrideName)
|
return filepath.Join(basePath, chart, overrideName)
|
||||||
}
|
}
|
||||||
|
|
||||||
func overrideUrl(baseUrl, chart, subchart, overrideName string) string {
|
func overrideUrl(baseUrl, chart, subchart, overrideName string) string {
|
||||||
if subchart != "" {
|
if subchart != "" {
|
||||||
return fmt.Sprintf("%s/%s/values_overrides/%s/%s", baseUrl, chart, subchart, overrideName)
|
return fmt.Sprintf("%s/%s/%s/%s", baseUrl, chart, subchart, overrideName)
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("%s/%s/values_overrides/%s", baseUrl, chart, overrideName)
|
return fmt.Sprintf("%s/%s/%s", baseUrl, chart, overrideName)
|
||||||
}
|
}
|
||||||
|
|
||||||
func downloadOverride(baseUrl, basePath, chart, subchart, overrideName string) error {
|
func downloadOverride(baseUrl, basePath, chart, subchart, overrideName string) error {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-helm-plugin-lint
|
- openstack-helm-plugin-lint
|
||||||
- openstack-helm-plugin-compute-kit-metallb-2024-1-ubuntu_jammy # 1 node + 2 nodes
|
# - openstack-helm-plugin-compute-kit-metallb-2024-1-ubuntu_jammy # 1 node + 2 nodes
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-helm-plugin-lint
|
- openstack-helm-plugin-lint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user