Skip to content

Wire trusted-ca-bundle via /etc/pki#187

Merged
openshift-merge-robot merged 4 commits intoopenshift:masterfrom
sttts:sttts-file-observer
Aug 29, 2019
Merged

Wire trusted-ca-bundle via /etc/pki#187
openshift-merge-robot merged 4 commits intoopenshift:masterfrom
sttts:sttts-file-observer

Conversation

@sttts
Copy link
Copy Markdown
Contributor

@sttts sttts commented Aug 29, 2019

Follow-up of #172 to make it more standard.

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 29, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 29, 2019
Comment thread manifests/07_deployment.yaml Outdated
image: quay.io/openshift/origin-cluster-authentication-operator:v4.0
imagePullPolicy: IfNotPresent
command: ["authentication-operator", "operator"]
command: ["/bin/bash", "ec"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

-ec ?

- "--config=/var/run/configmaps/config/operator-config.yaml"
- "-v=2"
- |
if [ -s /var/run/configmaps/trusted-ca-bundle/tls-ca-bundle.pem ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wish the operator does this during startup and we don't have to hack ways in bash.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it cannot. Then it is too late. And this does not belong into a binary. It is system plumbing. It is just right here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if tls-ca-bundle.pem is empty, will that brick the operator?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is non-existent if not part of the configmap.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The network operator validates it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note that appending empty PEM files and such is fine - the parser only cares about the data in the cert blocks (comments, empty lines, etc are fine).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@stlaz noticed that we must not copy empty files if I have understood him correctly.

@sttts sttts force-pushed the sttts-file-observer branch from 395f9ee to bd1d601 Compare August 29, 2019 09:52
@sttts sttts force-pushed the sttts-file-observer branch from bd1d601 to 76a1c69 Compare August 29, 2019 12:50
Copy link
Copy Markdown
Contributor

@enj enj left a comment

Choose a reason for hiding this comment

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

nit. Why is the glide bump so large?

Comment thread pkg/operator2/operator.go
trustedCABundleName = systemConfigPrefix + "trusted-ca-bundle"
trustedCABundleKey = "ca-bundle.crt"
trustedCABundleMountDir = "/etc/pki/ca-trust/extracted/pem"
trustedCABundleMountDir = systemTrustStoreDirPath
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just set to "/etc/pki/ca-trust/extracted/pem" and drop systemTrustStoreDirPath

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is a revert. Would avoid to change anything not neccesary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

... but its already set to trustedCABundleMountDir = "/etc/pki/ca-trust/extracted/pem" in master? AFAICT you did not do an actual git revert so I do not understand the comment. If I am missing something, just have someone tag as-is.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reverted the changes in that file, yes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Have removed the constant now.

@enj
Copy link
Copy Markdown
Contributor

enj commented Aug 29, 2019

After fixing the comment thing and making sure the bump size is expected, feel free to have anyone tag.

@sttts
Copy link
Copy Markdown
Contributor Author

sttts commented Aug 29, 2019

nit. Why is the glide bump so large?

because glide.

@enj
Copy link
Copy Markdown
Contributor

enj commented Aug 29, 2019

I reverted the changes in that file, yes.

Not sure I understand but do not feel strongly to block anything.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 29, 2019
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enj, sttts

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

The pull request process is described 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-merge-robot openshift-merge-robot merged commit e4ae6ed into openshift:master Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants