You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/flux/create_helmrelease.go
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,13 @@ var createHelmReleaseCmd = &cobra.Command{
94
94
--source=HelmRepository/podinfo \
95
95
--chart=podinfo
96
96
97
+
# Create a HelmRelease with custom storage namespace for hub-and-spoke model
98
+
flux create hr podinfo \
99
+
--target-namespace=production \
100
+
--storage-namespace=fluxcd-system \
101
+
--source=HelmRepository/podinfo \
102
+
--chart=podinfo
103
+
97
104
# Create a HelmRelease using a source from a different namespace
98
105
flux create hr podinfo \
99
106
--namespace=default \
@@ -127,6 +134,7 @@ type helmReleaseFlags struct {
127
134
chartVersionstring
128
135
chartRefstring
129
136
targetNamespacestring
137
+
storageNamespacestring
130
138
createNamespacebool
131
139
valuesFiles []string
132
140
valuesFrom []string
@@ -150,6 +158,7 @@ func init() {
150
158
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.chartVersion, "chart-version", "", "Helm chart version, accepts a semver range (ignored for charts from GitRepository sources)")
151
159
createHelmReleaseCmd.Flags().StringSliceVar(&helmReleaseArgs.dependsOn, "depends-on", nil, "HelmReleases that must be ready before this release can be installed, supported formats '<name>' and '<namespace>/<name>'")
152
160
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.targetNamespace, "target-namespace", "", "namespace to install this release, defaults to the HelmRelease namespace")
161
+
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.storageNamespace, "storage-namespace", "", "namespace to store the Helm release, defaults to the target namespace")
153
162
createHelmReleaseCmd.Flags().BoolVar(&helmReleaseArgs.createNamespace, "create-target-namespace", false, "create the target namespace if it does not exist")
154
163
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.saName, "service-account", "", "the name of the service account to impersonate when reconciling this HelmRelease")
155
164
createHelmReleaseCmd.Flags().StringVar(&helmReleaseArgs.reconcileStrategy, "reconcile-strategy", "ChartVersion", "the reconcile strategy for helm chart created by the helm release(accepted values: Revision and ChartRevision)")
0 commit comments