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

feat(cryostat): deploy cryostat 3.0 #111

Merged
merged 31 commits into from
Jan 23, 2024

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Dec 18, 2023

Related to #110
Fixes #113
Depends on cryostatio/cryostat#209
Depends on cryostatio/cryostat-storage#1

This is a very rough first pass at getting Cryostat 3.0.0-snapshot deployed. A cryostat-db instance and cryostat-storage instance are deployed alongside the Cryostat container as part of the same Pod.

These things are still TODO and I intend to tackle them as follow-up PRs either into this same feature branch, or into the upstream base branch I'm targeting:

@andrewazores andrewazores marked this pull request as draft December 18, 2023 16:24
@andrewazores andrewazores added the feat New feature or request label Dec 18, 2023
@mergify mergify bot added the safe-to-test label Dec 18, 2023
@andrewazores andrewazores changed the base branch from main to cryostat3 December 18, 2023 17:11
Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

Just a few comments so far, mainly for my own knowledge.

| `Configuration` | for Cryostat's object storage provider | |
| `storage.image.repository` | Repository for the storage container image | `quay.io/cryostat/cryostat-storage` |
| `storage.image.pullPolicy` | Image pull policy for the storage container image | `Always` |
| `storage.image.tag` | Tag for the storage container image | `2023-12-19` |
Copy link
Member

Choose a reason for hiding this comment

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

I think the README/schema need to be regenerated after changing the default to latest.

{{- end }}
- name: CRYOSTAT_JMX_CREDENTIALS_DB_PASSWORD
- name: QUARKUS_S3_AWS_REGION
value: us-east-1
Copy link
Member

Choose a reason for hiding this comment

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

Is this just a dummy value for now? Does it do something with SeaweedFS?

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't actually do anything when using SeaweedFS, or probably when using any other "self-hosted" kind of S3 provider, but the SDK client wants this variable to be set to something - presumably because the actual AWS S3 requires it.

Copy link
Member Author

Choose a reason for hiding this comment

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

https://docs.quarkiverse.io/quarkus-amazon-services/dev/amazon-s3.html#_configuring_s3_clients

quarkus.s3.aws.region - It’s required by the client, but since you’re using a local S3 instance you can pick any valid AWS region.

Copy link
Member Author

Choose a reason for hiding this comment

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

It would also be possible to hardcode a default value for this property in https://github.com/cryostatio/cryostat3/blob/main/src/main/resources/application.properties , so that end users can still override it if necessary but have a fallback if they don't, but I'm not sure if that's worthwhile. In the end if the user is going to choose some other S3 provider than the one we ship, they'll have to change all these related configuration knobs anyway.

Comment on lines 73 to 88
- name: QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_ACCESS_KEY_ID
value: cryostat
- name: AWS_ACCESS_KEY_ID
value: cryostat
- name: QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ default (printf "%s-jmx-credentials-db" .Release.Name) .Values.core.databaseSecretName }}
key: CRYOSTAT_JMX_CREDENTIALS_DB_PASSWORD
name: {{ printf "%s-storage-secret-key" .Release.Name }}
key: SECRET_KEY
optional: false
- name: CRYOSTAT_AUTH_MANAGER
{{- if (.Values.authentication).basicAuth.enabled }}
value: io.cryostat.net.BasicAuthManager
{{- else }}
value: io.cryostat.net.NoopAuthManager
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ printf "%s-storage-secret-key" .Release.Name }}
key: SECRET_KEY
optional: false
Copy link
Member

Choose a reason for hiding this comment

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

For my own info, why are there two pairs of these environment variables? (e.g. QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_SECRET_ACCESS_KEY and AWS_SECRET_ACCESS_KEY).

Copy link
Member Author

Choose a reason for hiding this comment

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

I need to double-check that myself, actually. I think the QUARKUS_ one is what is actually needed on the Cryostat side, and the AWS_ one was needed for Minio previously? Or perhaps the SDK client does actually need both, for some reason.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this was probably just a configuration hold-over:

https://docs.quarkiverse.io/quarkus-amazon-services/dev/amazon-s3.html#quarkus-amazon-s3_quarkus.s3.aws.credentials.type

If using the env-variable credentials type then the AWS_SECRET_ACCESS_KEY would be checked. Since in any case this configuration is going to expose the credentials to the container via environment variables, just using static with the QUARKUS_-prefixed pair is simpler.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like this was actually used for something after all: #120

Copy link
Member

@ebaron ebaron left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for doing this

@andrewazores andrewazores merged commit 5be6759 into cryostatio:cryostat3 Jan 23, 2024
2 checks passed
@andrewazores andrewazores deleted the deploy-cryostat-3 branch January 23, 2024 23:17
andrewazores added a commit that referenced this pull request Jan 25, 2024
aali309 pushed a commit to aali309/cryostat-helm that referenced this pull request Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request safe-to-test
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants