mirror of
https://github.com/holos-run/holos.git
synced 2026-03-19 00:37:45 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d696b958b | ||
|
|
1bf627b5e1 | ||
|
|
df69198cef |
@@ -274,8 +274,8 @@ type Chart struct {
|
||||
// repository. Holos gets the username and password from the environment
|
||||
// variables represented by the Auth field.
|
||||
type Repository struct {
|
||||
Name string `json:"name" yaml:"name"`
|
||||
URL string `json:"url" yaml:"url"`
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty"`
|
||||
URL string `json:"url,omitempty" yaml:"url,omitempty"`
|
||||
Auth Auth `json:"auth,omitempty" yaml:"auth,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
|
||||
-- command.sh --
|
||||
holos --version
|
||||
-- output.txt --
|
||||
0.105.0
|
||||
0.105.1
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.104.3
|
||||
0.105.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
rendered podinfo in 160.977334ms
|
||||
rendered platform in 161.101292ms
|
||||
rendered podinfo in 192.932708ms
|
||||
rendered platform in 193.051959ms
|
||||
|
||||
@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
|
||||
-- command.sh --
|
||||
holos --version
|
||||
-- output.txt --
|
||||
0.105.0
|
||||
0.105.1
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.104.3
|
||||
0.105.0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[main 11e8f96] add blackbox configuration
|
||||
[main 535726f] add blackbox configuration
|
||||
1 file changed, 15 insertions(+)
|
||||
create mode 100644 config/prometheus/blackbox.cue
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[main 1ea1005] integrate blackbox and prometheus together
|
||||
[main 797f2d6] integrate blackbox and prometheus together
|
||||
3 files changed, 1348 insertions(+), 2 deletions(-)
|
||||
create mode 100644 components/prometheus/values.cue.orig
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[main a2e337a] import values
|
||||
[main 69f44c9] import values
|
||||
2 files changed, 1815 insertions(+)
|
||||
create mode 100644 components/blackbox/values.cue
|
||||
create mode 100644 components/prometheus/values.cue
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
rendered blackbox in 143.36875ms
|
||||
rendered prometheus in 170.982208ms
|
||||
rendered platform in 171.067125ms
|
||||
rendered blackbox in 114.666583ms
|
||||
rendered prometheus in 148.566542ms
|
||||
rendered platform in 148.701ms
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[main 58e925d] add blackbox and prometheus
|
||||
[main a6310d2] add blackbox and prometheus
|
||||
5 files changed, 1550 insertions(+)
|
||||
create mode 100644 components/blackbox/blackbox.cue
|
||||
create mode 100644 components/prometheus/prometheus.cue
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
rendered blackbox in 5.63152525s
|
||||
rendered prometheus in 9.53072125s
|
||||
rendered platform in 9.530793625s
|
||||
rendered blackbox in 763.438542ms
|
||||
rendered prometheus in 903.55375ms
|
||||
rendered platform in 903.625583ms
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
[main f4371e4] render integrated blackbox and prometheus manifests
|
||||
[main 6d7e29b] render integrated blackbox and prometheus manifests
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
|
||||
-- command.sh --
|
||||
holos --version
|
||||
-- output.txt --
|
||||
0.105.0
|
||||
0.105.1
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.104.3
|
||||
0.105.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[main da03e4a] add httpbin
|
||||
[main 185fc76] add httpbin
|
||||
4 files changed, 113 insertions(+)
|
||||
create mode 100644 components/httpbin/httpbin.cue
|
||||
create mode 100644 components/httpbin/httpbin.yaml
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[main 2d3c3cb] annotate httpbin for prometheus probes
|
||||
[main da34784] annotate httpbin for prometheus probes
|
||||
2 files changed, 18 insertions(+)
|
||||
create mode 100644 components/httpbin/patches.cue
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
rendered httpbin in 99.597583ms
|
||||
rendered platform in 99.678042ms
|
||||
rendered httpbin in 80.450916ms
|
||||
rendered platform in 80.532083ms
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
rendered httpbin in 2.595108833s
|
||||
rendered platform in 2.595221s
|
||||
rendered httpbin in 80.982541ms
|
||||
rendered platform in 81.059042ms
|
||||
|
||||
@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
|
||||
-- command.sh --
|
||||
holos --version
|
||||
-- output.txt --
|
||||
0.105.0
|
||||
0.105.1
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.104.3
|
||||
0.105.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
rendered podinfo in 4.155374125s
|
||||
rendered platform in 4.155477334s
|
||||
rendered podinfo in 173.452208ms
|
||||
rendered platform in 173.536625ms
|
||||
|
||||
@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
|
||||
-- command.sh --
|
||||
holos --version
|
||||
-- output.txt --
|
||||
0.105.0
|
||||
0.105.1
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.104.3
|
||||
0.105.0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[main d448299] add blackbox configuration
|
||||
[main c7f13ba] add blackbox configuration
|
||||
1 file changed, 15 insertions(+)
|
||||
create mode 100644 config/prometheus/blackbox.cue
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[main 2ce5a78] integrate blackbox and prometheus together
|
||||
[main 0c0f974] integrate blackbox and prometheus together
|
||||
3 files changed, 1348 insertions(+), 2 deletions(-)
|
||||
create mode 100644 components/prometheus/values.cue.orig
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[main 2f0cd50] import values
|
||||
[main 941c7eb] import values
|
||||
2 files changed, 1815 insertions(+)
|
||||
create mode 100644 components/blackbox/values.cue
|
||||
create mode 100644 components/prometheus/values.cue
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
rendered blackbox in 143.137333ms
|
||||
rendered prometheus in 167.300583ms
|
||||
rendered platform in 167.341209ms
|
||||
rendered blackbox in 113.91075ms
|
||||
rendered prometheus in 147.542125ms
|
||||
rendered platform in 147.604125ms
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[main b7e507c] add blackbox and prometheus
|
||||
[main c5cfce0] add blackbox and prometheus
|
||||
5 files changed, 1550 insertions(+)
|
||||
create mode 100644 components/blackbox/blackbox.cue
|
||||
create mode 100644 components/prometheus/prometheus.cue
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
rendered blackbox in 5.595935416s
|
||||
rendered prometheus in 5.602449167s
|
||||
rendered platform in 5.602527541s
|
||||
rendered blackbox in 745.5255ms
|
||||
rendered prometheus in 851.327458ms
|
||||
rendered platform in 851.384291ms
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
[main 137f66a] render integrated blackbox and prometheus manifests
|
||||
[main c043d3d] render integrated blackbox and prometheus manifests
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
|
||||
-- command.sh --
|
||||
holos --version
|
||||
-- output.txt --
|
||||
0.105.0
|
||||
0.105.1
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.104.3
|
||||
0.105.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[main 2c843b8] add httpbin
|
||||
[main 860fc67] add httpbin
|
||||
4 files changed, 113 insertions(+)
|
||||
create mode 100644 components/httpbin/httpbin.cue
|
||||
create mode 100644 components/httpbin/httpbin.yaml
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[main a324ab5] annotate httpbin for prometheus probes
|
||||
[main 9c6598a] annotate httpbin for prometheus probes
|
||||
2 files changed, 18 insertions(+)
|
||||
create mode 100644 components/httpbin/patches.cue
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
rendered httpbin in 113.981791ms
|
||||
rendered platform in 114.0585ms
|
||||
rendered httpbin in 79.295541ms
|
||||
rendered platform in 79.3905ms
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
rendered httpbin in 2.546013s
|
||||
rendered platform in 2.546090458s
|
||||
rendered httpbin in 77.872917ms
|
||||
rendered platform in 77.964167ms
|
||||
|
||||
@@ -3,11 +3,13 @@ package helm
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/holos-run/holos/internal/errors"
|
||||
"github.com/holos-run/holos/internal/logger"
|
||||
"helm.sh/helm/v3/pkg/action"
|
||||
"helm.sh/helm/v3/pkg/cli"
|
||||
"helm.sh/helm/v3/pkg/registry"
|
||||
)
|
||||
|
||||
// PullChart downloads and caches a Helm chart locally. It handles both OCI and
|
||||
@@ -32,6 +34,20 @@ func PullChart(ctx context.Context, settings *cli.EnvSettings, chartRef, chartVe
|
||||
}
|
||||
actionConfig.RegistryClient = registryClient
|
||||
|
||||
chartRefURL, err := url.Parse(chartRef)
|
||||
if err != nil {
|
||||
return errors.Format("Failed to parse the Chart: %w", err)
|
||||
}
|
||||
|
||||
// If the chart been pulled is an OCI chart, the repo authentication has to be done ahead of the pull.
|
||||
if chartRefURL.Scheme == "oci" && username != "" && password != "" {
|
||||
loginOption := registry.LoginOptBasicAuth(username, password)
|
||||
err = registryClient.Login(chartRefURL.Host, loginOption)
|
||||
if err != nil {
|
||||
return errors.Format("failed to login to registry: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
pullClient := action.NewPullWithOpts(action.WithConfig(actionConfig))
|
||||
pullClient.Untar = true
|
||||
pullClient.RepoURL = repoURL
|
||||
|
||||
@@ -1 +1 @@
|
||||
0
|
||||
1
|
||||
|
||||
Reference in New Issue
Block a user