Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit f023ec9

Browse files
committed
installer: make chart url configureble
Signed-off-by: sallyom <somalley@redhat.com>
1 parent bf16675 commit f023ec9

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Chart.lock
33
# Vim swap files
44
*.swp
55

6+
*.tgz
7+
68
*tas-env-variables*
79
keys-cert
810
./keys-cert/*.pem
@@ -12,4 +14,4 @@ keys-cert
1214
.idea
1315

1416
tas-install
15-
pull-secret.json
17+
pull-secret.json

charts/trusted-artifact-signer/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ sources:
3333
# This is the chart version. This version number should be incremented each time you make changes
3434
# to the chart and its templates, including the app version.
3535
# Versions are expected to follow Semantic Versioning (https://semver.org/)
36-
version: 0.1.28
36+
version: 0.1.29

charts/trusted-artifact-signer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
A Helm chart for deploying Sigstore scaffold chart that is opinionated for OpenShift
55

6-
![Version: 0.1.28](https://img.shields.io/badge/Version-0.1.28-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
6+
![Version: 0.1.29](https://img.shields.io/badge/Version-0.1.29-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
77

88
## Overview
99

tas-installer/cmd/install.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const (
1717
)
1818

1919
var (
20+
helmChartURL string
2021
helmChartVersion string
2122
helmValuesFile string
2223
)
@@ -68,7 +69,7 @@ func installTas(tasNamespace string) error {
6869
},
6970
func() error {
7071
log.Print("installing helm chart")
71-
if err := install.HandleHelmChartInstall(kc, tasNamespace, tasReleaseName, helmValuesFile, helmChartVersion); err != nil {
72+
if err := install.HandleHelmChartInstall(kc, tasNamespace, tasReleaseName, helmValuesFile, helmChartURL, helmChartVersion); err != nil {
7273
return err
7374
}
7475
return nil
@@ -83,7 +84,8 @@ func installTas(tasNamespace string) error {
8384
}
8485

8586
func init() {
86-
installCmd.PersistentFlags().StringVar(&helmChartVersion, "chartVersion", "0.1.26", "Version of the Helm chart")
87+
installCmd.PersistentFlags().StringVar(&helmChartVersion, "chartVersion", "0.1.29", "Version of the Helm chart")
88+
installCmd.PersistentFlags().StringVar(&helmChartURL, "chartURL", "oci://quay.io/redhat-user-workloads/arewm-tenant/sigstore-ocp/trusted-artifact-signer", "Version of the Helm chart")
8789
installCmd.PersistentFlags().StringVar(&helmValuesFile, "valuesFile", "", "Custom values file for chart configuration")
8890
}
8991

tas-installer/internal/install/install.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"time"
1313
)
1414

15-
func HandleHelmChartInstall(kc *kubernetes.KubernetesClient, tasNamespace, tasReleaseName, helmValuesFile, helmChartVersion string) error {
16-
if err := helm.InstallTrustedArtifactSigner(kc, tasNamespace, tasReleaseName, helmValuesFile, helmChartVersion); err != nil {
15+
func HandleHelmChartInstall(kc *kubernetes.KubernetesClient, tasNamespace, tasReleaseName, helmValuesFile, helmChartURL, helmChartVersion string) error {
16+
if err := helm.InstallTrustedArtifactSigner(kc, tasNamespace, tasReleaseName, helmValuesFile, helmChartURL, helmChartVersion); err != nil {
1717
return err
1818
}
1919
return nil

tas-installer/pkg/helm/helm.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ func UninstallTrustedArtifactSigner(tasNamespace, tasReleaseName string) (*relea
3636
return action.NewUninstall(actionConfig).Run(tasReleaseName)
3737
}
3838

39-
func InstallTrustedArtifactSigner(kc *kubernetes.KubernetesClient, tasNamespace, tasReleaseName, pathToValuesFile, chartVersion string) error {
40-
chartUrl := "oci://quay.io/redhat-user-workloads/arewm-tenant/sigstore-ocp/trusted-artifact-signer"
41-
39+
func InstallTrustedArtifactSigner(kc *kubernetes.KubernetesClient, tasNamespace, tasReleaseName, pathToValuesFile, chartUrl, chartVersion string) error {
4240
tv := templatedValues{
4341
OpenShiftAppsSubdomain: kc.ClusterCommonName,
4442
}

0 commit comments

Comments
 (0)