Skip to content

Commit 25f9627

Browse files
feat: add optional flag to install airbyte with auth disabled (#156)
Co-authored-by: Alex Buchanan <[email protected]>
1 parent 0414536 commit 25f9627

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

internal/cmd/local/helm/airbyte_values.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ type ValuesOpts struct {
1515
InsecureCookies bool
1616
TelemetryUser string
1717
ImagePullSecret string
18+
DisableAuth bool
1819
}
1920

2021
func BuildAirbyteValues(ctx context.Context, opts ValuesOpts) (string, error) {
2122
span := trace.SpanFromContext(ctx)
2223

2324
vals := []string{
2425
"global.env_vars.AIRBYTE_INSTALLATION_ID=" + opts.TelemetryUser,
25-
"global.auth.enabled=true",
2626
"global.jobs.resources.limits.cpu=3",
2727
"global.jobs.resources.limits.memory=4Gi",
2828
"airbyte-bootloader.env_vars.PLATFORM_LOG_FORMAT=json",
@@ -34,6 +34,10 @@ func BuildAirbyteValues(ctx context.Context, opts ValuesOpts) (string, error) {
3434
attribute.Bool("image-pull-secret", opts.ImagePullSecret != ""),
3535
)
3636

37+
if !opts.DisableAuth {
38+
vals = append(vals, "global.auth.enabled=true")
39+
}
40+
3741
if opts.LowResourceMode {
3842
vals = append(vals,
3943
"server.env_vars.JOB_RESOURCE_VARIANT_OVERRIDE=lowresource",

internal/cmd/local/local_install.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
type InstallCmd struct {
1919
Chart string `help:"Path to chart." xor:"chartver"`
2020
ChartVersion string `help:"Version to install." xor:"chartver"`
21+
DisableAuth bool `help:"Disable auth."`
2122
DockerEmail string `group:"docker" help:"Docker email." env:"ABCTL_LOCAL_INSTALL_DOCKER_EMAIL"`
2223
DockerPassword string `group:"docker" help:"Docker password." env:"ABCTL_LOCAL_INSTALL_DOCKER_PASSWORD"`
2324
DockerServer string `group:"docker" default:"https://index.docker.io/v1/" help:"Docker server." env:"ABCTL_LOCAL_INSTALL_DOCKER_SERVER"`
@@ -68,6 +69,7 @@ func (i *InstallCmd) InstallOpts(ctx context.Context, user string) (*local.Insta
6869
ValuesFile: i.Values,
6970
InsecureCookies: i.InsecureCookies,
7071
LowResourceMode: i.LowResourceMode,
72+
DisableAuth: i.DisableAuth,
7173
}
7274

7375
if opts.DockerAuth() {
@@ -166,9 +168,9 @@ func (i *InstallCmd) Run(ctx context.Context, provider k8s.Provider, telClient t
166168
return fmt.Errorf("unable to initialize local command: %w", err)
167169
}
168170

169-
spinner.UpdateText("Pulling images")
171+
spinner.UpdateText("Pulling images")
170172
lc.PrepImages(ctx, cluster, opts)
171-
173+
172174
if err := lc.Install(ctx, opts); err != nil {
173175
spinner.Fail("Unable to install Airbyte locally")
174176
return err

0 commit comments

Comments
 (0)