Skip to content

Commit

Permalink
fix: permit args
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaro00 committed Mar 21, 2024
1 parent f0fd483 commit 68024bd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
5 changes: 1 addition & 4 deletions auth/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,12 @@ pub struct StartArgs {
/// Address to reach the permit.io API at
#[arg(long, default_value = "https://api.eu-central-1.permit.io")]
pub permit_api_uri: Uri,

/// Address to reach the permit.io PDP at
#[arg(long, default_value = "http://permit-pdp:7000")]
pub permit_pdp_uri: Uri,

/// Permit environment to use
#[arg(long, default_value = "local")]
pub permit_environment: String,

pub permit_env: String,
/// Permit API key
#[arg(long, default_value = "permit_")]
pub permit_api_key: String,
Expand Down
2 changes: 1 addition & 1 deletion auth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub async fn start(pool: PgPool, args: StartArgs) -> io::Result<()> {
args.permit_api_uri,
args.permit_pdp_uri,
"default".to_string(),
args.permit_environment,
args.permit_env,
&args.permit_api_key,
))
.with_jwt_signing_private_key(args.jwt_signing_private_key)
Expand Down
9 changes: 6 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ services:
- "--address=0.0.0.0:8000"
- "--stripe-secret-key=${STRIPE_SECRET_KEY}"
- "--jwt-signing-private-key=${AUTH_JWTSIGNING_PRIVATE_KEY}"
- "--permit-api=https://api.eu-central-1.permit.io"
- "--permit-api-uri=https://api.eu-central-1.permit.io"
- "--permit-pdp-uri=http://permit-pdp:7000"
- "--permit-env=${SHUTTLE_ENV}"
- "--permit-api-key=${PERMIT_API_KEY}"
healthcheck:
test: curl -f -s http://localhost:8000
Expand Down Expand Up @@ -121,9 +123,10 @@ services:
- "--proxy-fqdn=${APPS_FQDN}"
- "--use-tls=${USE_TLS}"
- "--admin-key=${GATEWAY_ADMIN_KEY}"
- "--permit-api=https://api.eu-central-1.permit.io"
- "--permit-api-uri=https://api.eu-central-1.permit.io"
- "--permit-pdp-uri=http://permit-pdp:7000"
- "--permit-env=${SHUTTLE_ENV}"
- "--permit-api-key=${PERMIT_API_KEY}"
- "--permit-pdp=http://permit-pdp:7000"
healthcheck:
test: curl -f -s http://localhost:8001
interval: 1m
Expand Down
19 changes: 12 additions & 7 deletions gateway/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ pub struct ContextArgs {
/// Api key for the user that has rights to start deploys
#[arg(long, default_value = "gateway4deployes")]
pub deploys_api_key: String,

/// Maximum number of containers to start on this node before blocking cch projects
#[arg(long, default_value = "900")]
pub cch_container_limit: u32,
Expand All @@ -86,15 +87,19 @@ pub struct ContextArgs {
/// Maximum number of containers to start on this node before blocking any project
#[arg(long, default_value = "990")]
pub hard_container_limit: u32,
/// Address to the Permit.io API

/// Address to reach the permit.io API at
#[arg(long, default_value = "https://api.eu-central-1.permit.io")]
pub permit_api: Uri,
/// Permit.io API key
#[arg(long)]
pub permit_api_key: String,
/// Address to the local Permit.io PDP
pub permit_api_uri: Uri,
/// Address to reach the permit.io PDP at
#[arg(long, default_value = "http://permit-pdp:7000")]
pub permit_pdp: Uri,
pub permit_pdp_uri: Uri,
/// Permit environment to use
#[arg(long, default_value = "local")]
pub permit_env: String,
/// Permit API key
#[arg(long, default_value = "permit_")]
pub permit_api_key: String,

/// Allow tests to set some extra /etc/hosts
pub extra_hosts: Vec<String>,
Expand Down

0 comments on commit 68024bd

Please sign in to comment.