Skip to content

Commit 3c0ba19

Browse files
[Helm] Add helm plugin code from Operator SDK (#109)
This PR moves the helm operator plugin code from Operator SDK to `pkg/plugins/helm/v1`. The previous folder contained obsolete code and has been removed.
1 parent de746ea commit 3c0ba19

35 files changed

+43
-49
lines changed

pkg/plugins/v1/api.go renamed to pkg/plugins/helm/v1/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
"strings"
2121

2222
"github.com/iancoleman/strcase"
23+
"github.com/operator-framework/helm-operator-plugins/pkg/plugins/helm/v1/chartutil"
24+
"github.com/operator-framework/helm-operator-plugins/pkg/plugins/helm/v1/scaffolds"
2325
"github.com/operator-framework/helm-operator-plugins/pkg/plugins/util"
24-
"github.com/operator-framework/helm-operator-plugins/pkg/plugins/v1/chartutil"
25-
"github.com/operator-framework/helm-operator-plugins/pkg/plugins/v1/scaffolds"
2626
"github.com/spf13/pflag"
2727
"helm.sh/helm/v3/pkg/chart"
2828
"sigs.k8s.io/kubebuilder/v3/pkg/config"

pkg/plugins/v1/chartutil/chart_test.go renamed to pkg/plugins/helm/v1/chartutil/chartutil_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"helm.sh/helm/v3/pkg/chart"
2626
"helm.sh/helm/v3/pkg/repo/repotest"
2727

28-
"github.com/operator-framework/helm-operator-plugins/pkg/plugins/v1/chartutil"
28+
"github.com/operator-framework/helm-operator-plugins/pkg/plugins/helm/v1/chartutil"
2929
)
3030

3131
func TestChart(t *testing.T) {

pkg/plugins/v1/chartutil/testdata/test-chart/templates/_helpers.tpl renamed to pkg/plugins/helm/v1/chartutil/testdata/test-chart/templates/_helpers.tpl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,5 @@ app.kubernetes.io/instance: {{ .Release.Name }}
5555
Create the name of the service account to use
5656
*/}}
5757
{{- define "test-chart.serviceAccountName" -}}
58-
{{- if .Values.serviceAccount.create -}}
59-
{{ default (include "test-chart.fullname" .) .Values.serviceAccount.name }}
60-
{{- else -}}
61-
{{ default "default" .Values.serviceAccount.name }}
62-
{{- end -}}
63-
{{- end -}}
58+
{{ default "controller-manager" .Values.serviceAccount.name }}
59+
{{- end -}}

0 commit comments

Comments
 (0)