-
Notifications
You must be signed in to change notification settings - Fork 20
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(deploy): deploy cryostat 3.0 #727
Conversation
02818ef
to
62f848c
Compare
a8ae2c6
to
5b66ff1
Compare
…s (backport cryostatio#715) (cryostatio#725) * feat(discovery): options to configure discovery port names and numbers (cryostatio#715) Signed-off-by: Thuan Vo <[email protected]> (cherry picked from commit a552021) * resolve conflict --------- Co-authored-by: Thuan Vo <[email protected]> Co-authored-by: Andrew Azores <[email protected]>
cryostatio#715) Signed-off-by: Thuan Vo <[email protected]>
62f848c
to
60de1b6
Compare
Doesn't seem to compile, just me? $ make manager
mkdir -p /home/work/workspace/cryostat-operator/bin
test -s /home/work/workspace/cryostat-operator/bin/controller-gen && /home/work/workspace/cryostat-operator/bin/controller-gen --version | grep -q 0.11.1 || \
GOBIN=/home/work/workspace/cryostat-operator/bin go install sigs.k8s.io/controller-tools/cmd/[email protected]
/home/work/workspace/cryostat-operator/bin/controller-gen rbac:roleName=role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
envsubst < hack/image_tag_patch.yaml.in > config/default/image_tag_patch.yaml
envsubst < hack/image_pull_patch.yaml.in > config/default/image_pull_patch.yaml
go generate ./...
/home/work/workspace/cryostat-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
test -s /home/work/workspace/cryostat-operator/bin/go-license || GOBIN=/home/work/workspace/cryostat-operator/bin go install github.com/palantir/[email protected]
Adding license...
/home/work/workspace/cryostat-operator/bin/go-license --config=go-license.yml api/v1beta1/groupversion_info.go api/v1beta1/cryostat_conversion.go api/v1beta1/cryostat_conversion_test.go api/v1beta1/cryostat_suite_test.go api/v1beta1/cryostat_types.go api/v1beta1/zz_generated.deepcopy.go api/v1beta2/cryostat_conversion.go api/v1beta2/cryostat_types.go api/v1beta2/groupversion_info.go api/v1beta2/zz_generated.deepcopy.go internal/controllers/common/resource_definitions/certificates.go internal/controllers/common/resource_definitions/resource_definitions.go internal/controllers/common/tls.go internal/controllers/common/finalizer_utils.go internal/controllers/common/common_utils.go internal/controllers/constants/constants.go internal/controllers/model/instance.go internal/controllers/configmaps.go internal/controllers/secrets.go internal/controllers/suite_test.go internal/controllers/insights/apicast.go internal/controllers/insights/insights.go internal/controllers/insights/insights_controller.go internal/controllers/insights/insights_controller_test.go internal/controllers/insights/insights_controller_unit_test.go internal/controllers/insights/insights_suite_test.go internal/controllers/insights/setup.go internal/controllers/insights/setup_test.go internal/controllers/insights/test/manager.go internal/controllers/insights/test/utils.go internal/controllers/insights/test/resources.go internal/controllers/openshift.go internal/controllers/certmanager.go internal/controllers/const_generated.go internal/controllers/cryostat_controller.go internal/controllers/cryostat_controller_test.go internal/controllers/ingresses.go internal/controllers/pvc.go internal/controllers/rbac.go internal/controllers/reconciler.go internal/controllers/reconciler_test.go internal/controllers/routes.go internal/controllers/services.go internal/images/custom-scorecard-tests/main.go internal/test/scorecard/clients.go internal/test/scorecard/openshift.go internal/test/scorecard/tests.go internal/test/expect.go internal/test/clients.go internal/test/conversion.go internal/test/reconciler.go internal/test/resources.go internal/tools/const_generator.go internal/main.go internal/webhooks/cryostat_webhook.go internal/webhooks/defaulter.go internal/webhooks/test/resources.go internal/webhooks/validator.go internal/webhooks/validator_test.go internal/webhooks/webhook_suite_test.go
go fmt ./...
go vet ./...
# github.com/cryostatio/cryostat-operator/internal/controllers/common/resource_definitions
internal/controllers/common/resource_definitions/resource_definitions.go:1126:63: cr.Spec.SecurityOptions.StorageSecurityContext undefined (type *"github.com/cryostatio/cryostat-operator/api/v1beta2".SecurityOptions has no field or method StorageSecurityContext)
internal/controllers/common/resource_definitions/resource_definitions.go:1127:41: cr.Spec.SecurityOptions.StorageSecurityContext undefined (type *"github.com/cryostatio/cryostat-operator/api/v1beta2".SecurityOptions has no field or method StorageSecurityContext)
internal/controllers/common/resource_definitions/resource_definitions.go:1148:63: cr.Spec.SecurityOptions.DatabaseSecurityContext undefined (type *"github.com/cryostatio/cryostat-operator/api/v1beta2".SecurityOptions has no field or method DatabaseSecurityContext)
internal/controllers/common/resource_definitions/resource_definitions.go:1149:41: cr.Spec.SecurityOptions.DatabaseSecurityContext undefined (type *"github.com/cryostatio/cryostat-operator/api/v1beta2".SecurityOptions has no field or method DatabaseSecurityContext) |
It looks like there's a missing commit or two from what I have, hang on while I resolve some merge conflicts |
…g SecurityContext
$ make bundle
mkdir -p /home/work/workspace/cryostat-operator/bin
test -s /home/work/workspace/cryostat-operator/bin/controller-gen && /home/work/workspace/cryostat-operator/bin/controller-gen --version | grep -q 0.11.1 || \
GOBIN=/home/work/workspace/cryostat-operator/bin go install sigs.k8s.io/controller-tools/cmd/[email protected]
/home/work/workspace/cryostat-operator/bin/controller-gen rbac:roleName=role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
envsubst < hack/image_tag_patch.yaml.in > config/default/image_tag_patch.yaml
envsubst < hack/image_pull_patch.yaml.in > config/default/image_pull_patch.yaml
test -s /home/work/workspace/cryostat-operator/bin/kustomize || { curl -Ss "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- 3.8.7 /home/work/workspace/cryostat-operator/bin; }
/home/work/bin/operator-sdk generate kustomize manifests -q
cd config/manager && /home/work/workspace/cryostat-operator/bin/kustomize edit set image controller=quay.io/cryostat/cryostat-operator:3.0.0-dev
/home/work/workspace/cryostat-operator/bin/kustomize build config/manifests | /home/work/bin/operator-sdk generate bundle -q --overwrite --version 3.0.0-dev
INFO[0004] Creating bundle.Dockerfile
INFO[0004] Creating bundle/metadata/annotations.yaml
INFO[0004] Bundle metadata generated successfully
/home/work/bin/operator-sdk bundle validate ./bundle
ERRO[0000] Error: Value operator.cryostat.io/v1beta1, Kind=ClusterCryostat: CRD "operator.cryostat.io/v1beta1, Kind=ClusterCryostat" is present in bundle "cryostat-operator.v3.0.0-dev" but not defined in CSV
make: *** [Makefile:287: bundle] Error 1 |
Name: cr.Name + "-storage", | ||
Image: imageTag, | ||
ImagePullPolicy: getPullPolicy(imageTag), | ||
SecurityContext: containerSc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the StorageConfig
also be included here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some changes need to be made in ex. NewCoreContainer
as well. The 3.0 image needs fairly different configuration compared to 2.4.0 - a lot of the old environment variables have been renamed or removed, and the 3.0 container will also need to be configured to tell it the URLs of its storage and database containers.
…#698) * test(scorecard): scorecard tests for recording management Signed-off-by: Thuan Vo <[email protected]> * 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 <[email protected]> Co-authored-by: Ming Yu Wang <[email protected]> Co-authored-by: Ming Wang <[email protected]>
…cryostatio#739) * CR config scorecard * reformat * reviews * add kubectl license
Still hitting "Application is not available" unfortunately, but I think I can make some more progress here with just service/route configuration stuff and mostly ignoring TLS. |
It looks like the request was blocked by my browser because the original request went through the Route, which has TLS edge termination enabled, but Cryostat responded with a HTTP 308 redirection response where the If I use HTTPie instead of a web browser, since this is more lenient about these issues, it follows the redirect response with no problem:
|
Got it. This was still done with Update: just checked and |
#795 linked above is a new PR I have based on top of this one wherein I'm working on cleaning things up some more - removing no longer used certificate volume mounts and TLS handling, fixing some environment variable names, things like that. It's pretty noisy since a lot of things are touched so I figured it was better to keep it as a separate changeset for ease of review. |
Is there anything else that needs to be fixed here? Otherwise I'll get the merge conflicts cleaned up. |
I think the Makefile adjustment(s) above need to be included so that this PR is at least buildable on its own. After that it can be used to deploy a non-TLS deployment, so I think it would be fine to merge into the upstream branch and continue building from there. @ebaron wdyt? |
Lots of test failures during build now after syncing the latest upstream changes. |
Sounds good to me. I'm fine with restoring the missing functionality over other PRs. |
|
It doesn't look like it is making any progress to actually installing anything in the
|
I see what seems to be the same scorecard behaviour on |
Okay, running with a different cluster has the scorecards running and passing as expected on
|
Trying this now:
|
@ebaron @mwangggg how do I get this to run with my custom scorecard image? I tried building with |
Got help instructions from Ming, looks like I have the scorecard running for this PR now. |
|
Elliott suggests the failure could be because the scorecard tests assume cert-manager is available and enabled, but the state this PR is in right now it only results in a functioning deployment when cert-manager/TLS are disabled. So we can try changing the tests to instead turn off the cert-manager integration via the CR, or else maybe we leave the tests failing for now. There should be a follow-up PR to add oauth2_proxy/openshift-oauth-proxy to the deployment, which will also be where the cert-manager integration should happen for 3.0, so maybe it makes sense to address the scorecard tests at that point. |
I'm fine with leaving the tests failing for now. It also serves as a reminder to fix them before release, so we don't forget to re-enable cert-manager there. |
Okay, just re-verified that |
Sounds good |
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit -S -m "YOUR_COMMIT_MESSAGE"
Fixes: Part 1 of #710
Description of the change:
This change deploys cryostat 3.0 bits (3.0 base image, storage, database) without auth, addressing the first part of #710