Skip to content

chore: sync only custom certificate instead of whole bundle#1977

Closed
tolusha wants to merge 1 commit into7.98.xfrom
CRW-8316-7-98
Closed

chore: sync only custom certificate instead of whole bundle#1977
tolusha wants to merge 1 commit into7.98.xfrom
CRW-8316-7-98

Conversation

@tolusha
Copy link
Contributor

@tolusha tolusha commented Mar 11, 2025

What does this PR do?

chore: sync only custom certificate instead of whole bundle

Screenshot/screencast of this PR

N/A

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-8316

How to test this PR?

  1. Prepare a patch file if needed:
cat > /tmp/cr-patch.yaml <<EOF
apiVersion: org.eclipse.che/v2
kind: CheCluster
spec: {}
EOF
  1. Deploy the operator:

OpenShift

./build/scripts/olm/test-catalog-from-sources.sh --cr-patch-yaml /tmp/cr-patch.yaml

on Minikube

./build/scripts/minikube-tests/test-operator-from-sources.sh --cr-patch-yaml /tmp/cr-patch.yaml
  1. Patch subscription (switching to old behavior)
    oc patch subs eclipse-che --patch '{"spec": {"config": {"env": [{"name": "CHE_OPERATOR_CERTIFICATES_SYNC_CUSTOM_OPENSHIFT_CERTIFICATE_ONLY", "value": "false"}]}}}' --type=merge -n eclipse-che

  2. Login Eclipse Che (open dashboard)

  3. Check size of the ca-certs-merged CM in a user namespace

$ oc get configmaps -n <..> ca-certs-merged -o json | jq '.data."tls-ca-bundle.pem" | length'
238783
  1. Add custom certificate to the OpenShift
    https://docs.openshift.com/container-platform/4.17/security/certificates/updating-ca-bundle.html#ca-bundle-replacing_updating-ca-bundle

  2. Start sync only custom certificate
    oc patch subs eclipse-che --patch '{"spec": {"config": {"env": [{"name": "CHE_OPERATOR_CERTIFICATES_SYNC_CUSTOM_OPENSHIFT_CERTIFICATE_ONLY", "value": "true"}]}}}' --type=merge -n eclipse-che

  3. Check size of the ca-certs-merged CM in a user namespace

$ oc get configmaps -n <..> ca-certs-merged -o json | jq '.data."tls-ca-bundle.pem" | length'
12297
  1. The size of the CM should be reduced

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Mar 11, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tolusha

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

Details Needs approval from an approver in each of these files:

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

@openshift-ci
Copy link

openshift-ci bot commented Mar 11, 2025

@tolusha: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v14-che-operator-update 291de19 link true /test v14-che-operator-update

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@tolusha tolusha closed this Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant