-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add support for injecting the CA bundle into secrets #205
Conversation
This patch adds support for annotating secrets, so it becomes possible to have CA bundles inside them. Some operators only allow looking up CAs inside secrets (cert-manager being the most notable case), so adding this support allows us to reference OCP's internal CA easily. Tested as follows: $ oc create secret generic test --from-literal=key1=bar secret/test created $ oc annotate secret test service.beta.openshift.io/inject-cabundle="true" $ oc extract secret/test --keys=service-ca.crt --to=- # service-ca.crt -----BEGIN CERTIFICATE----- MIIDUTCCAjmgAwIBAgIIZ6CJ/clzacAwDQYJKoZIhvcNAQELBQAwNjE0MDIGA1UE Awwrb3BlbnNoaWZ0LXNlcnZpY2Utc2VydmluZy1zaWduZXJAMTY3MDMyNzk1MTAe Fw0yMjEyMDYxMjAxMjJaFw0yNTAyMDMxMjAxMjNaMDYxNDAyBgNVBAMMK29wZW5z aGlmdC1zZXJ2aWNlLXNlcnZpbmctc2lnbmVyQDE2NzAzMjc5NTEwggEiMA0GCSqG SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCnybNjpCLmnqcecoUoMLtj6r+6F5lF8J2l 2WF/CnYWHAKkgBZel+Wz6LfDAxVphlPdL6EM1+T1Z5RzqogJJmTSOiGzsTuHdPMo KDcvILjXzEZOpKWzlBE+ybrioXFRmm3jc2fx1UWB78pIOPp7rhUvlkAap9HRbMGo QL6HYSONVPtsrIzWt3ETf6PXyZIlvaqlLkzvdoGo8XMEtdbdB/cpr2LbjzqBzO8/ eVXhMBrRqYs8QvHYlNimkR1zjKMiWxkn6paLTIlTE7hj5URTgtz6NVzXm2qTNetx nmeMzwa+2vMJqNxLHuLCYbIA3NLTepTWgMbX71h7Q+wEl+ZHZeXXAgMBAAGjYzBh MA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/M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cO+QiTVvq5rw2JRB0HbhqandIzmO6RZUH6qQwzDI+VTvwVAgMBAAGjYzBh MA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR3WYX6 kxQH/BxKqAAeMaxjzT+p5jAfBgNVHSMEGDAWgBRQR9uFAPYIGEceUSI4I+xJgyro IzANBgkqhkiG9w0BAQsFAAOCAQEADt1m+za3zAjPVc90WN27d9RYx7X+R1boA6+8 gYoHUOvPHF/EJpeDQvlZ4rp23n7RgMyOEbLLIX1uYo1hLEvnX7vmgoixyL6UJ4OW ElpEQBAF3UjwxLR74TTHyXmnAs/FoSDPQsMWUKn1fBpYZrHkhbSfYbJ0Vu2MwN2z v2BtZtS7aewwLbYlLXVNCfxRCxY4AHvkBeXa4i7K0tLw02H4HH/jptbWBHfNd9su mnk2ITSq2OVpwb8wbRw1jh0qg2mj8LmEv0hiyu1Fzgqol+hgnI8i6jUA9XlQFElq 5eskNOMyKnLZ0JpAfqXeLpqokMo+q1o4DyiDgXRd+6BvEcEzOg== -----END CERTIFICATE-----
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mbaldessari 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 |
/retest-required |
@mbaldessari: all tests passed! Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/close |
@stlaz: Closed this PR. In response to this:
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/test-infra repository. |
This patch adds support for annotating secrets, so it becomes possible
to have CA bundles inside them. Some operators only allow looking up CAs
inside secrets (cert-manager being the most notable case), so adding
this support allows us to reference OCP's internal CA easily.
Tested as follows: