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

The git certificate needs to be labeled as mounted to workspace. #1375

Merged
merged 1 commit into from
May 6, 2022

Conversation

metlos
Copy link
Contributor

@metlos metlos commented May 5, 2022

What does this PR do?

This makes sure that the git certificate is also mounted to the workspace so that the generated gitconfig points to a file that exists.

What issues does this PR fix or reference?

eclipse-che/che#21327
https://issues.redhat.com/browse/CRW-2882

How to test this PR?

  1. Deploy Che and use quay.io/lkrejci/che-operator:issue-21327 as the operator image
  2. Update Che installation with some git certificate
    $ kubectl create configmap che-git-self-signed-cert --from-file=<SOME_CA.CRT_FILE> --from-literal=githost=https://over.the.rainbow -n eclipse-che
    $ kubectl label configmap che-git-self-signed-cert app.kubernetes.io/part-of=che.eclipse.org -n eclipse-che
    $ kubectl patch checluster devspaces --type=json -p '[{"op": "replace", "path": "/spec/server/gitSelfSignedCert", "value": true}]' -n eclipse-che
    
    
  3. Start a workspace
  4. Open a terminal in the workspace
  5. Check that /etc/config/che-git-self-signed-cert/certificate and /etc/config/che-git-self-signed-cert/host files exist and have the contents corresponding to the first kubectl command in the second repro step.

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.

@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #1375 (b8f6d01) into main (a269da2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1375   +/-   ##
=======================================
  Coverage   61.89%   61.89%           
=======================================
  Files          76       76           
  Lines        6248     6249    +1     
=======================================
+ Hits         3867     3868    +1     
  Misses       1998     1998           
  Partials      383      383           
Impacted Files Coverage Δ
controllers/usernamespace/controller.go 64.43% <100.00%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a269da2...b8f6d01. Read the comment docs.

Copy link
Contributor

@nickboldt nickboldt left a comment

Choose a reason for hiding this comment

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

tests pass and this seems like a simple enough fix, so I'm happy to merge this... but will wait for more expert eyes to review.

Note that we need this backported to 7.46.x if we're going to include this in 3.0... so you can prepare that PR too, while you wait.

@openshift-ci
Copy link

openshift-ci bot commented May 6, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: metlos, nickboldt, tolusha

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

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

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.

4 participants