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(cryostat3): deploy Cryostat 3.0 #815

Merged
merged 54 commits into from
Jun 6, 2024
Merged

feat(cryostat3): deploy Cryostat 3.0 #815

merged 54 commits into from
Jun 6, 2024

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented May 9, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits: git commit -S -m "YOUR_COMMIT_MESSAGE"

Merge feature branch cryostat3 into main, rolling up all 3.0-related PRs.

ebaron and others added 30 commits February 22, 2024 10:54
* feat(csv): require AllNamespaces install mode

* Remove unused function

* Remove install mode variable from Makefile
…s (backport #715) (#725)

* feat(discovery): options to configure discovery port names and numbers (#715)

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
(cherry picked from commit a552021)

* resolve conflict

---------

Co-authored-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Andrew Azores <aazores@redhat.com>
* feat(api): combine Cryostat and ClusterCryostat CRDs

* Make webhook internal, add tests

* Add v1beta2 apiVersion with conversion webhook

* Add conversion webhook tests

* Run multi-namespace tests for Cryostat CRD

* Formatting, generate bundle

* Enable conversion webhooks

* add conversion webhook to bundle, fixes

* Remove log message

* Update spec descriptors patch and initialization resource

---------

Signed-off-by: Elliott Baron <ebaron@redhat.com>
* feat(discovery): discovery port name/number options for v1betav2

* fix(conversion): add missing conversion to betav1
* chore(api): remove ClusterCryostat CRD

* Update config.md

* Delete docs/multi-namespace.md

* Add RoleBinding finalizer tests
(cherry picked from commit 2af4362)

Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
(cherry picked from commit 6b2e997)

Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
* remove MaxWsConnections

* keep v1beta1 spec

* add test v1->v2
) (#752)

* test(scorecard): scorecard tests for recording management (#698)

* test(scorecard): scorecard tests for recording management

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>

* fixup(scorecard): fix cr cleanup func

* test(scorecard): registry recording test to suite

* chore(scorecard): reorganize client def

* chore(scorecard): clean up common setup func

* chore(bundle): regenerate bundle with scorecard tag

* chore(bundle): correct image tag in bundle

* fix(bundle): add missing scorecard test config patch

* feat(scorecard): scaffold cryostat API client

* chore(scorecard): clean up API client

* test(scorecard): implement recording scorecard test

* fixup(scorecard): correctly add scorecard test via hack templates

* fix(client): ignore unverified tls certs and base64 oauth token

* chore(bundle): split cryostat tests to separate stage

* fix(scorecard): extend default transport instead of overwriting

* chore(scorecard): refactor client to support multi-part

* fixup(client): fix request verb

* fix(client): fix recording create form format

* fix(scorecard): create stored credentials for target JVM

* fix(scorecard): fix 502 status error

* chore(scorecard): simplify client def

* chore(scorecard): fetch recordings to ensure action is correctly performed

* test(scorecard): test generating report for a recording

* chore(scorecard): clean up

* test(scorecard): list archives in tests

* ci(scorecard): reconfigure ingress for kind

* ci(k8s): correct cluster name

* test(scorecard): use role instead of clusterrole for oauth rules

* test(scorecard): parse health response for additional checks

* chore(scorecard): add missing newline in logs

* chore(scorecard): check status code before parsing body in health check

* test(scorecard): add custom target discovery to recording scorecard test

* add EOF wait and resp headers

* add resp headers

* chore(client): configure all clients to send safe requests

* fix(clients): add missing content-type header

* fix(scorecard): add missing test name in help message

* chore(client): create new http requests when retrying

* chore(bundle): update scorecard image tags

---------

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
Co-authored-by: Ming Wang <miwan@redhat.com>
(cherry picked from commit cfcbfc7)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml

* Fix conflicts

---------

Co-authored-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
… (backport #739) (#756)

* test(scorecard): scorecard test for Cryostat CR configuration changes (#739)

* CR config scorecard

* reformat

* reviews

* add kubectl license

(cherry picked from commit bf8df15)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml

* Fix conflicts

---------

Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
* remove CommandConfig

* udpate

* make bundle

* correct test
…767)

* test(scorecard): scorecard test for report generator  (#753)

* deploy reports sidecar

* report scorecard test

* update

* rebase fix

* query health

(cherry picked from commit 96ea4cb)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml
#	bundle/tests/scorecard/config.yaml

* Fix conflicts

---------

Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
(cherry picked from commit 2201704)

Co-authored-by: Thuan Vo <thuan.votann@gmail.com>
…) (#770)

* test(scorecard): add container logs to scorecard results (#758)

* test(scorecard): add container logs to scorecard results

* build(bundle): regenerate bundle with new scorecard tags

* chore(scorecard): refactor to remove duplicate codes

(cherry picked from commit d01e0d2)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml
#	bundle/tests/scorecard/config.yaml

* Fix conflicts

---------

Co-authored-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
(cherry picked from commit 6498b0f)

Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
(cherry picked from commit 903e93f)

Co-authored-by: Elliott Baron <ebaron@redhat.com>
…port #759) (#779)

* test(scorecard): logWorkloadEvent for cryostat-recording errors (#759)

* logWorkLoadEvent for cryostat-recording errors

* reviews

* tr.LogChannel

---------

Co-authored-by: Elliott Baron <ebaron@redhat.com>
(cherry picked from commit baebe17)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml
#	bundle/tests/scorecard/config.yaml
#	config/scorecard/patches/custom.config.yaml

* Fix conflicts

---------

Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
* Merge pull request #8 from ebaron/scorecard-methods

test(scorecard): use methods for more easily passing data

* update bundle image

(cherry picked from commit b397095)

Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
* 3.0 multi-namespace scorecard test

* refractor testResources
…#772) (#796)

* test(scorecard): add container logs for report sidecard test (#772)

* test(scorecard): add container logs for report sidecard test

odified:   internal/test/scorecard/common_utils.go

* test(scorecard): clean up

(cherry picked from commit 4b8ad76)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml
#	bundle/tests/scorecard/config.yaml
#	config/scorecard/patches/custom.config.yaml
#	internal/test/scorecard/logger.go

* Fix conflicts

---------

Co-authored-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
)

* test(scorecard): retry on cryostat update conflict (#774)

* retry on cryostat update conflict

* review

* review

(cherry picked from commit d7b0379)

# Conflicts:
#	bundle/manifests/cryostat-operator.clusterserviceversion.yaml
#	bundle/tests/scorecard/config.yaml
#	config/scorecard/patches/custom.config.yaml
#	internal/test/scorecard/common_utils.go
#	internal/test/scorecard/tests.go

* Fix conflicts

---------

Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
* feat(discovery): options to configure discovery port names and numbers (backport #715) (#725)

* feat(discovery): options to configure discovery port names and numbers (#715)

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
(cherry picked from commit a552021)

* resolve conflict

---------

Co-authored-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Andrew Azores <aazores@redhat.com>

* Deploy cryostat 3.0

* Remove extraneous file

* test adjustments

* feat(discovery): options to configure discovery port names and numbers (#715)

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>

* Fix typo in environment variable breaking reconciler test, fix missing SecurityContext

* Fix conflict with cluster cryostat removal

* ci(gh): add comment when /build_test is finished (#745)

* add scorecard test/suite selection (#746)

* test(scorecard): scorecard tests for recording management (#698)

* test(scorecard): scorecard tests for recording management

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>

* fixup(scorecard): fix cr cleanup func

* test(scorecard): registry recording test to suite

* chore(scorecard): reorganize client def

* chore(scorecard): clean up common setup func

* chore(bundle): regenerate bundle with scorecard tag

* chore(bundle): correct image tag in bundle

* fix(bundle): add missing scorecard test config patch

* feat(scorecard): scaffold cryostat API client

* chore(scorecard): clean up API client

* test(scorecard): implement recording scorecard test

* fixup(scorecard): correctly add scorecard test via hack templates

* fix(client): ignore unverified tls certs and base64 oauth token

* chore(bundle): split cryostat tests to separate stage

* fix(scorecard): extend default transport instead of overwriting

* chore(scorecard): refactor client to support multi-part

* fixup(client): fix request verb

* fix(client): fix recording create form format

* fix(scorecard): create stored credentials for target JVM

* fix(scorecard): fix 502 status error

* chore(scorecard): simplify client def

* chore(scorecard): fetch recordings to ensure action is correctly performed

* test(scorecard): test generating report for a recording

* chore(scorecard): clean up

* test(scorecard): list archives in tests

* ci(scorecard): reconfigure ingress for kind

* ci(k8s): correct cluster name

* test(scorecard): use role instead of clusterrole for oauth rules

* test(scorecard): parse health response for additional checks

* chore(scorecard): add missing newline in logs

* chore(scorecard): check status code before parsing body in health check

* test(scorecard): add custom target discovery to recording scorecard test

* add EOF wait and resp headers

* add resp headers

* chore(client): configure all clients to send safe requests

* fix(clients): add missing content-type header

* fix(scorecard): add missing test name in help message

* chore(client): create new http requests when retrying

* chore(bundle): update scorecard image tags

---------

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
Co-authored-by: Ming Wang <miwan@redhat.com>

* test(scorecard): scorecard test for Cryostat CR configuration changes (#739)

* CR config scorecard

* reformat

* reviews

* add kubectl license

* test(scorecard): scorecard test for report generator  (#753)

* deploy reports sidecar

* report scorecard test

* update

* rebase fix

* query health

* fix(build-ci): fix scorecard image tag returned as null (#760)

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>

* test(scorecard): add container logs to scorecard results (#758)

* test(scorecard): add container logs to scorecard results

* build(bundle): regenerate bundle with new scorecard tags

* chore(scorecard): refactor to remove duplicate codes

* add permission to publish comment when ci fails (#769)

Co-authored-by: Elliott Baron <ebaron@redhat.com>

* Update NewCoreContainer and associated tests

* build(go): update Golang to 1.21 (#777)

* test(scorecard): logWorkloadEvent for cryostat-recording errors (#759)

* logWorkLoadEvent for cryostat-recording errors

* reviews

* tr.LogChannel

---------

Co-authored-by: Elliott Baron <ebaron@redhat.com>

* test(scorecard): fix rebasing skipped commit (#780)

* Merge pull request #8 from ebaron/scorecard-methods

test(scorecard): use methods for more easily passing data

* update bundle image

* Review fixes

* generate storage key, create expected Secret

* fixup! generate storage key, create expected Secret

* database secret handling corrections

* combine database connection password and encryption key into one secret

* correct storage secret key/access key

* update datasource port number to not conflict with storage

* precreate eventtemplates bucket

* remove storage volume parameter overrides

* use HTTP for Cryostat probe even when TLS is enabled - TLS will be done via auth proxy later

* correct environment variable names for proxy awareness

* Fix remaining merge conflict

* Fix makefile

* config cleanup and test fixup

---------

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Thuan Vo <thuan.votann@gmail.com>
Co-authored-by: Andrew Azores <aazores@redhat.com>
Co-authored-by: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com>
Co-authored-by: Ming Wang <miwan@redhat.com>
Co-authored-by: Elliott Baron <ebaron@redhat.com>
* build(insights): consume out-of-tree Insights module

* Upgrade dependencies

* Fix environment variable name

* Remove unneeded replace directives
@andrewazores
Copy link
Member Author

@mwangggg c1b194a looks like an accident - can I remove that?

@mwangggg
Copy link
Member

I removed it already!

mwangggg and others added 12 commits May 27, 2024 17:17
…cret (#823)

* chore(jmx): remove configuration for JMX server, service, and auth secret

* regen

* remove jmx credential

* readme

* correct agent sample cryostat service port

* increase memory limit

* default agent to enable API writes

* re-add JMX port in v1beta1 conversion test

* fixup conversion test

* fixup envtest
#828)

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
* update OLM to 0.28.0

* fix typo
* test(env): ensure crd dir path is valid

* test(env): add validations for auth proxy arguments
* fix(scorecard): error when constructing request should be checked

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>

* chore(scorecard): better error message and avoid nil pointer

---------

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
* build(golang): build images with Go 1.22

* Add comment for go directive
* fix(database): emit an Event when database secret is mismatched

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>

* fix(secret): mark generated db secret as immutable

* docs(crd): more details on immutable secrets

* docs(crd): fix typo in crd markers

* docs(readme): mention min k8s version in README

* docs(readme): re-organize readme

* fix(secret): ensure secret is immutable in createOrUpdate

---------

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
@tthvo
Copy link
Member

tthvo commented Jun 5, 2024

Looks like controller-gen is panicking in go 1.22 :((

@tthvo
Copy link
Member

tthvo commented Jun 5, 2024

Looks like controller-gen is panicking in go 1.22 :((

Bumping controller-tools to 0.14.0+ seems to solve the issue: kubernetes-sigs/controller-tools#880. But we usually upgrade these tools alongside operator-sdk so is it ok to upgrade controller-tools now?

@andrewazores andrewazores marked this pull request as ready for review June 6, 2024 17:40
@andrewazores andrewazores requested a review from a team as a code owner June 6, 2024 17:40
@ebaron
Copy link
Member

ebaron commented Jun 6, 2024

I think we can just upgrade controller-tools to 0.14.0. I did a test run with make bundle and it seems like it just made some YAML formatting nicer.

Signed-off-by: Thuan Vo <thuan.votann@gmail.com>
@andrewazores
Copy link
Member Author

/build_test

Copy link

github-actions bot commented Jun 6, 2024

/build_test completed successfully ✅.
View Actions Run.

@ebaron
Copy link
Member

ebaron commented Jun 6, 2024

I'd like to do a merge if possible to preserve individual commits

@andrewazores
Copy link
Member Author

Sure, makes sense

@ebaron ebaron merged commit 26ee9c4 into main Jun 6, 2024
31 checks passed
@andrewazores andrewazores deleted the cryostat3 branch June 6, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This change (potentially) breaks API compatibility and requires corresponding changes elsewhere feat New feature or request safe-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants