Skip to content

Commit

Permalink
ensure only valid values are passed in for auth mode
Browse files Browse the repository at this point in the history
  • Loading branch information
TiberiuGC committed Apr 25, 2024
1 parent a21a8c1 commit 8035ee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/actions/accessentry/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func NewMigrator(
}

func (m *Migrator) MigrateToAccessEntry(ctx context.Context, options MigrationOptions) error {
if m.tgAuthMode == ekstypes.AuthenticationModeConfigMap {
if m.tgAuthMode != ekstypes.AuthenticationModeApi && m.tgAuthMode != ekstypes.AuthenticationModeApiAndConfigMap {
return fmt.Errorf("target authentication mode is invalid, must be either %s or %s", ekstypes.AuthenticationModeApi, ekstypes.AuthenticationModeApiAndConfigMap)
}
if m.curAuthMode == ekstypes.AuthenticationModeApi {
Expand Down

0 comments on commit 8035ee3

Please sign in to comment.