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

ROX-15941: Run multiple operators from FSS #951

Merged
merged 30 commits into from
Apr 28, 2023

Conversation

kurlov
Copy link
Member

@kurlov kurlov commented Apr 13, 2023

Description

Make FSS able to run multiple ACS Operator versions.
Each operator version has its own deployment.
The metrics service and ServiceAccount can be shared between multiple versions.
For the sake of simplicity, there are two versions installed on startup before reconciler run.

The next steps are:

  • fetch operators versions from FM
  • installed desired versions on ticker base manner (similar to centrals reconcile)
  • cleanup redundant operator versions

Checklist (Definition of Done)

  • Unit and integration tests added
  • Added test description under Test manual
  • Documentation added if necessary (i.e. changes to dev setup, test execution, ...)
  • CI and all relevant tests are passing
  • Add the ticket number to the PR title if available, i.e. ROX-12345: ...
  • Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.

Test manual

First of all, the OLM based ACS Operator should be deleted without removing an existing CRDs

  1. List and delete OLM subscription for the ACS Operator
kubectl get subscription -n stackrox-operator
kubectl delete subscription <subscription> -n stackrox-operator
  1. Delete the Operator’s ClusterServiceVersion
kubectl get clusterserviceversion -n stackrox-operator
kubectl delete clusterserviceversion rhacs-operator.<version> -n stackrox-operator
  1. Check that there is no running ACS Operator
kubectl get pods -n stackrox-operator
NAME                                                              READY   STATUS      RESTARTS      AGE

Then it's time to run and verify
4. Build and deploy

make deploy/dev
  1. Check that a two ACS Operator versions are running
kubectl get pods -n stackrox-operator
NAME                                                              READY   STATUS      RESTARTS       AGE
c8dae07dab84cfc9348095952222435b18a827136292688d44a0b210f6nf8dl   0/1     Completed   0              118d
rhacs-operator-controller-manager-3.74.0-5fb9cbcdbb-56nqv         2/2     Running     0              13s
rhacs-operator-controller-manager-3.74.1-5765676ffc-l9bpp         2/2     Running     0              13s
...
  1. Check deployments
kubectl get deployments -n stackrox-operator
NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
rhacs-operator-controller-manager-3.74.0   1/1     1            1           27s
rhacs-operator-controller-manager-3.74.1   1/1     1            1           27s

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 13, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kurlov kurlov requested a review from SimonBaeumer April 13, 2023 15:54
@kurlov kurlov temporarily deployed to development April 13, 2023 15:54 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 13, 2023 15:54 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 13, 2023 15:54 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 13, 2023 18:37 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 13, 2023 18:37 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 13, 2023 18:37 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 14, 2023 02:27 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 14, 2023 02:27 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 14, 2023 02:27 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 14, 2023 06:45 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 14, 2023 06:45 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 14, 2023 06:45 — with GitHub Actions Inactive
@kurlov kurlov marked this pull request as ready for review April 14, 2023 06:49
@kurlov kurlov temporarily deployed to development April 14, 2023 06:49 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 14, 2023 06:49 — with GitHub Actions Inactive
@kurlov kurlov requested review from ludydoo and johannes94 April 14, 2023 06:49
@@ -34,8 +34,6 @@ spec:
value: quay.io/rhacs-eng
- name: ROX_OPERATOR_COLLECTOR_REGISTRY
value: quay.io/rhacs-eng
- name: OPERATOR_CONDITION_NAME
Copy link
Member Author

Choose a reason for hiding this comment

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

this env was created by OLM and it is redundant for FSS

@kurlov
Copy link
Member Author

kurlov commented Apr 14, 2023

/test e2e

@kurlov kurlov temporarily deployed to development April 14, 2023 07:46 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 07:49 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 07:49 — with GitHub Actions Inactive
@kurlov kurlov requested a review from ludydoo April 28, 2023 07:49
@kurlov kurlov temporarily deployed to development April 28, 2023 07:49 — with GitHub Actions Inactive
@kurlov kurlov requested a review from porridge April 28, 2023 07:49
# TODO: Split image into registry and image name + tag
image: quay.io/rhacs-eng/stackrox-operator:3.74.0
# TODO: and values for resource limits and requests for both proxy and manager container
deploymentPrefix: rhacs-operator-controller-manager
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we make this smaller? This way we could have many more characters available for the repository/version suffix

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 dropped -controller part

Copy link
Collaborator

@porridge porridge left a comment

Choose a reason for hiding this comment

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

LGTM overall, some nitpicks inline and +1 to those from @ludydoo

fleetshard/pkg/central/operator/upgrade.go Outdated Show resolved Hide resolved
fleetshard/pkg/central/operator/upgrade.go Show resolved Hide resolved
@openshift-ci openshift-ci bot added the lgtm label Apr 28, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johannes94, kurlov, porridge, SimonBaeumer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [SimonBaeumer,johannes94,kurlov,porridge]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot removed the lgtm label Apr 28, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 28, 2023

New changes are detected. LGTM label has been removed.

@kurlov kurlov temporarily deployed to development April 28, 2023 14:10 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 14:10 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 14:10 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 14:21 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 14:21 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 14:21 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 14:32 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 14:32 — with GitHub Actions Inactive
@kurlov kurlov temporarily deployed to development April 28, 2023 14:32 — with GitHub Actions Inactive
@kurlov kurlov requested a review from ludydoo April 28, 2023 14:33
@kurlov
Copy link
Member Author

kurlov commented Apr 28, 2023

/test e2e

@kurlov kurlov merged commit 091e9a2 into main Apr 28, 2023
@kurlov kurlov deleted the akurlov/ROX-15941_run_multiple_operators_from_fss branch April 28, 2023 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants