Skip to content

Commit

Permalink
Remove flux repo helpers
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 30, 2023
1 parent 783c2e2 commit 028aebe
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions hub/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ const (
bootstrapHelmRepositoryNamespace = "kubeops"
EnvVarBootstrapHelmRepositoryNamespace = "BOOTSTRAP_HELM_REPOSITORY_NAMESPACE"

fluxcdHelmRepositoryName = "fluxcd-community"
EnvVarFluxcdHelmRepositoryName = "FLUXCD_HELM_REPOSITORY_NAME"

BootstrapPresetsName = "bootstrap-presets"

ChartACE = "ace"
Expand Down Expand Up @@ -73,14 +70,6 @@ func BootstrapHelmRepositoryName() string {
return bootstrapHelmRepositoryName
}

func FluxCDHelmRepositoryName() string {
ns := os.Getenv(EnvVarFluxcdHelmRepositoryName)
if ns != "" {
return ns
}
return fluxcdHelmRepositoryName
}

func BootstrapHelmRepository(kc client.Client) kmapi.TypedObjectReference {
if kc != nil {
var repo fluxsrc.HelmRepository
Expand All @@ -102,27 +91,6 @@ func BootstrapHelmRepository(kc client.Client) kmapi.TypedObjectReference {
}
}

func FluxCDHelmRepository(kc client.Client) kmapi.TypedObjectReference {
if kc != nil {
var repo fluxsrc.HelmRepository
err := kc.Get(context.TODO(), client.ObjectKey{Name: FluxCDHelmRepositoryName(), Namespace: BootstrapHelmRepositoryNamespace()}, &repo)
if err == nil {
return kmapi.TypedObjectReference{
APIGroup: releasesapi.SourceGroupHelmRepository,
Kind: releasesapi.SourceKindHelmRepository,
Namespace: BootstrapHelmRepositoryNamespace(),
Name: FluxCDHelmRepositoryName(),
}
}
}
return kmapi.TypedObjectReference{
APIGroup: releasesapi.SourceGroupLegacy,
Kind: releasesapi.SourceKindLegacy,
Namespace: "",
Name: FluxCDChartsURL,
}
}

func GetBootstrapPresets(kc client.Client) (*shared.BootstrapPresets, bool) {
if kc != nil {
var ccp chartsapi.ClusterChartPreset
Expand Down

0 comments on commit 028aebe

Please sign in to comment.