- Notifications
You must be signed in to change notification settings - Fork936
feat: deployment flags#4426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
11 commits Select commitHold shift + click to select a range
03a77ae
wip
f0ssel091b754
fix errors
f0ssel3d02a4f
holy shit
f0ssel815f678
add deployment route
f0ssel972c0ba
tests
f0ssel7e73583
add enterprise flags
f0ssel2889c2d
tests
f0ssel9343f84
fix coderdtest
f0ssel4780a5a
make gen
f0sselea8c73f
use reflect to scrub secret valyes
f0sselbfdf859
pr comments
f0sselFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
add enterprise flags
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit7e735838f765593862194949db7cbb8339a770ae
There are no files selected for viewing
44 changes: 36 additions & 8 deletionscli/deployment/flags.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -339,9 +339,45 @@ func NewFlags() codersdk.DeploymentFlags { | ||
Shorthand: "v", | ||
Description: "Enables verbose logging.", | ||
}, | ||
AuditLogging: codersdk.BoolFlag{ | ||
Name: "Audit Logging", | ||
Flag: "audit-logging", | ||
EnvVar: "CODER_AUDIT_LOGGING", | ||
Description: "Specifies whether audit logging is enabled.", | ||
Default: true, | ||
}, | ||
f0ssel marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
BrowserOnly: codersdk.BoolFlag{ | ||
Name: "Browser Only", | ||
Flag: "browser-only", | ||
EnvVar: "CODER_BROWSER_ONLY", | ||
Description: "Whether Coder only allows connections to workspaces via the browser.", | ||
f0ssel marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
}, | ||
ScimAuthHeader: codersdk.StringFlag{ | ||
Name: "SCIM Authentication Header", | ||
Flag: "scim-auth-header", | ||
EnvVar: "CODER_SCIM_API_KEY", | ||
Description: "Enables SCIM and sets the authentication header for the built-in SCIM server. New users are automatically created with OIDC authentication.", | ||
Default: "ed25519", | ||
}, | ||
UserWorkspaceQuota: codersdk.IntFlag{ | ||
Name: "User Workspace Quota", | ||
Flag: "user-workspace-quota", | ||
EnvVar: "CODER_USER_WORKSPACE_QUOTA", | ||
Description: "Enables and sets a limit on how many workspaces each user can create.", | ||
Default: 0, | ||
}, | ||
} | ||
} | ||
func RemoveSensitiveValues(df codersdk.DeploymentFlags) codersdk.DeploymentFlags { | ||
df.Oauth2GithubClientSecret.Value = secretValue | ||
df.OidcClientSecret.Value = secretValue | ||
df.PostgresURL.Value = secretValue | ||
df.ScimAuthHeader.Value = secretValue | ||
return df | ||
} | ||
func StringFlag(flagset *pflag.FlagSet, fl *codersdk.StringFlag) { | ||
cliflag.StringVarP(flagset, | ||
&fl.Value, | ||
@@ -409,11 +445,3 @@ func defaultCacheDir() string { | ||
return filepath.Join(defaultCacheDir, "coder") | ||
} | ||
5 changes: 4 additions & 1 deletioncli/root.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletionscli/server.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletionscoderd/flags_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletionscodersdk/deployment.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
47 changes: 23 additions & 24 deletionsenterprise/cli/server.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.