Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: remove dev-only defaults #394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,20 @@ module "intake_smoketests" {
helm_values = indent(10, trimspace(local.smoketests_values))
}

resource "random_password" "minio-password" {
length = 16
special = false
}

output "minio-username" {
value = "indico"
}

output "minio-password" {
sensitive = true
value = random_password.minio-password.result
}

locals {
insights_pre_reqs_values = [<<EOF
crunchy-postgres:
Expand Down Expand Up @@ -1093,14 +1107,10 @@ crunchy-postgres:
ingress:
useStaticCertificate: false
secretName: indico-ssl-static-cert
tls.crt: #base64 encoded value of certificate chain
tls.key: #base64 encoded value of certificate key
minio:
topology:
volumeSize: 128Gi
storage:
accessKey: <path:tools/argo/data/indico-dev/ins-dev/storage#access_key_id>
secretKey: <path:tools/argo/data/indico-dev/ins-dev/storage#secret_access_key>
accessKey: ${random_password.minio-username.result}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the secrets being referenced here are AWS credentials to connect to a storage bucket. Is it okay to set these as minio:<random_password>?

Have you tested deploying a cluster with this change?

Copy link
Author

@thearchitector thearchitector Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they configure the root username & password for minio, not to an external s3 iam user

secretKey: ${random_password.minio-password.result}
backup:
enabled: ${var.include_miniobkp}
schedule: "0 4 * * 2" # This schedules the job to run at 4:00 AM every Tuesday
Expand All @@ -1115,20 +1125,22 @@ weaviate:
weaviate-backup:
enabled: true
backupStorageConfig:
accessKey: <path:tools/argo/data/indico-dev/ins-dev/storage#access_key_id>
secretKey: <path:tools/argo/data/indico-dev/ins-dev/storage#secret_access_key>
accessKey: ${random_password.minio-username.result}
secretKey: ${random_password.minio-password.result}
url: http://minio-tenant-hl.insights.svc.cluster.local:9000
weaviate:
env:
GOMEMLIMIT: "31GiB" # 1 less than the hard limit on the used nodes
# 1 less than the hard limit of the weaviate node group type
GOMEMLIMIT: "31GiB"
# TODO: switch this to a dedicated weaviate backup bucket
backups:
s3:
enabled: true
envconfig:
BACKUP_S3_ENDPOINT: minio-tenant-hl.insights.svc.cluster.local:9000
secrets:
AWS_ACCESS_KEY_ID: <path:tools/argo/data/indico-dev/ins-dev/storage#access_key_id>
AWS_SECRET_ACCESS_KEY: <path:tools/argo/data/indico-dev/ins-dev/storage#secret_access_key>
AWS_ACCESS_KEY_ID: ${random_password.minio-username.result}
AWS_SECRET_ACCESS_KEY: ${random_password.minio-password.result}
EOF
]

Expand All @@ -1137,15 +1149,6 @@ global:
host: ${lower("${var.label}.${var.region}.${var.aws_account}.indico.io")}
features:
askMyDocument: true
insights-edge:
additionalAllowedOrigins:
- https://local.indico.io:1234
server:
services:
lagoon:
env:
FIELD_AUTOCONFIRM_CONFIDENCE: 0.8
FIELD_CONFIG_PATH: "fields_config.yaml"
ask-my-docs:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not convinced this is correct either since it means all clusters will spin up using our dev openai creds, which feels wrong

llmConfig:
llm: indico-azure-instance
Expand Down
50 changes: 24 additions & 26 deletions azure/application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,20 @@ module "intake_smoketests" {
helm_values = indent(10, trimspace(local.smoketests_values))
}

resource "random_password" "minio-password" {
length = 16
special = false
}

output "minio-username" {
value = "indico"
}

output "minio-password" {
sensitive = true
value = random_password.minio-password.result
}

locals {
insights_pre_reqs_values = [<<EOF
crunchy-postgres:
Expand Down Expand Up @@ -907,37 +921,35 @@ crunchy-postgres:
ingress:
useStaticCertificate: false
secretName: indico-ssl-static-cert
tls.crt: #base64 encoded value of certificate chain
tls.key: #base64 encoded value of certificate key
minio:
createStorageClass: false
topology:
volumeSize: 128Gi
storageClassName: default
storage:
accessKey: <path:tools/argo/data/indico-dev/ins-dev/storage#access_key_id>
secretKey: <path:tools/argo/data/indico-dev/ins-dev/storage#secret_access_key>
accessKey: ${random_password.minio-username.result}
secretKey: ${random_password.minio-password.result}
weaviate:
cronjob:
services:
weaviate-backup:
enabled: true
backupStorageConfig:
accessKey: <path:tools/argo/data/indico-dev/ins-dev/storage#access_key_id>
secretKey: <path:tools/argo/data/indico-dev/ins-dev/storage#secret_access_key>
accessKey: ${random_password.minio-username.result}
secretKey: ${random_password.minio-password.result}
url: http://minio-tenant-hl.insights.svc.cluster.local:9000
weaviate:
env:
GOMEMLIMIT: "31GiB" # 1 less than the hard limit on the used nodes
# TODO: enable this when we have a backup bucket
# 1 less than the hard limit of the weaviate node group type
GOMEMLIMIT: "31GiB"
# TODO: switch this to a dedicated weaviate backup bucket
backups:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, looks like we'll need to change the backup configuration for Azure, it shouldn't be pointing to s3

Copy link
Author

@thearchitector thearchitector Mar 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weaviate backs up to minio, not s3

given that we're getting rid of weaviate soon, i figured it didn't matter much

s3:
enabled: false
enabled: true
envconfig:
BACKUP_S3_ENDPOINT: minio-tenant-hl.insights.svc.cluster.local:9000
secrets:
AWS_ACCESS_KEY_ID: <path:tools/argo/data/indico-dev/ins-dev/storage#access_key_id>
AWS_SECRET_ACCESS_KEY: <path:tools/argo/data/indico-dev/ins-dev/storage#secret_access_key>
AWS_ACCESS_KEY_ID: ${random_password.minio-username.result}
AWS_SECRET_ACCESS_KEY: ${random_password.minio-password.result}
EOF
]

Expand All @@ -946,20 +958,6 @@ global:
host: ${var.label}.${var.region}.indico-dev.indico.io
features:
askMyDocument: true
intake:
host: dev-ci.us-east-2.indico-dev.indico.io
apiToken: <path:tools/argo/data/indico-dev/ins-dev/intake#api_token>
tokenSecret: <path:tools/argo/data/indico-dev/ins-dev/intake#noct_token_secret>
cookieSecret: <path:tools/argo/data/indico-dev/ins-dev/intake#noct_cookie_secret>
insights-edge:
additionalAllowedOrigins:
- https://local.indico.io:1234
server:
services:
lagoon:
env:
FIELD_AUTOCONFIRM_CONFIDENCE: 0.8
FIELD_CONFIG_PATH: "fields_config.yaml"
ask-my-docs:
llmConfig:
llm: indico-azure-instance
Expand Down