janus-idp / operator

Deprecated - Operator for Backstage, based on the Operator SDK framework - see https://github.com/redhat-developer/rhdh-operator
https://github.com/redhat-developer/rhdh-operator
Apache License 2.0
15 stars 15 forks source link

Deployment configuration and v1alpha2 version #388

Closed gazarenkov closed 4 months ago

gazarenkov commented 5 months ago

Description

This PR includes new way to configure Backstage deployment, now (in contrary to raw config) it is possible to add the changes as a and valid "fragment" of appsv1.deployment object inside Backstage CR and those fields will be merged with default (+raw) configuration, like:

apiVersion: rhdh.redhat.com/v1alpha2
kind: Backstage
metadata:
  name: my-backstage
spec:
  deployment:
    patch:
      spec:
        template:
          metadata:
             labels:
                label1: value1
          spec:
            containers:
              - name: backstage-backend
                 resources:
                    requests:
                        cpu: 250m
                        memory: 256Mi
             - name: my-sidecar
                image: my-sidecar
            volumes:
              - ephemeral:
                  volumeClaimTemplate:
                    spec:
                      storageClassName: "my-special-class"
                name: dynamic-plugins-root

Also, since this addition causes changes in the API, new API version v1alpha2 was added. So, as for Operator versions 0.3.x and 0.4.x (if we consider 3 months release cadency and 6 months API maintain) it will support as minimum both v1alpha1 and v1alpha2 (which become a storage version). After upgrading Operator to 0.3.x the following behaviour expected:

NOTE: v1alpha2 is backward compatible with v1alpha1 w/o data conversion

Openshift NOTE: deployment.patch field won't show up in the "Form view" when creating a CR from the OCP Web. To be able to edit it with ODC use "YAML view".

Which issue(s) does this PR fix or relate to

https://github.com/janus-idp/operator/issues/352

PR acceptance criteria

How to test changes / Special notes to the reviewer

openshift-ci[bot] commented 5 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from gazarenkov. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/janus-idp/operator/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
github-actions[bot] commented 5 months ago

⚠️ Files changed in bundle generation!

Those changes to the operator bundle manifests should have been pushed automatically to your PR branch.
You might also need to manually update the .rhdh/bundle/manifests/rhdh-operator.csv.yaml CSV file accordingly.

github-actions[bot] commented 5 months ago

PR images are available:

  1. https://quay.io/janus-idp/operator:0.3.0-pr-388-e307937
  2. https://quay.io/janus-idp/operator-bundle:0.3.0-pr-388-e307937
  3. https://quay.io/janus-idp/operator-catalog:0.3.0-pr-388-e307937

github-actions[bot] commented 4 months ago

⚠️ Files changed in bundle generation!

Those changes to the operator bundle manifests should have been pushed automatically to your PR branch.
You might also need to manually update the .rhdh/bundle/manifests/rhdh-operator.csv.yaml CSV file accordingly.

github-actions[bot] commented 4 months ago

PR images are available:

  1. https://quay.io/janus-idp/operator:0.3.0-pr-388-14c1b91
  2. https://quay.io/janus-idp/operator-bundle:0.3.0-pr-388-14c1b91
  3. https://quay.io/janus-idp/operator-catalog:0.3.0-pr-388-14c1b91

github-actions[bot] commented 4 months ago

PR images are available:

  1. https://quay.io/janus-idp/operator:0.3.0-pr-388-a0b14b1
  2. https://quay.io/janus-idp/operator-bundle:0.3.0-pr-388-a0b14b1
  3. https://quay.io/janus-idp/operator-catalog:0.3.0-pr-388-a0b14b1

github-actions[bot] commented 4 months ago

PR images are available:

  1. https://quay.io/janus-idp/operator:0.3.0-pr-388-2aa8525
  2. https://quay.io/janus-idp/operator-bundle:0.3.0-pr-388-2aa8525
  3. https://quay.io/janus-idp/operator-catalog:0.3.0-pr-388-2aa8525