Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #273 from mkosiarc/entitlement-docs
Browse files Browse the repository at this point in the history
Document how to create entitlement subscription secret
  • Loading branch information
gtrivedi88 authored Jun 25, 2024
2 parents 313c56a + 9d00409 commit bdc636f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav-how-to-guides.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*** xref:how-to-guides/configuring-builds/proc_defining_component_relationships.adoc[Defining component relationships]
*** xref:how-to-guides/configuring-builds/proc_preventing_redundant_rebuilds.adoc[Preventing redundant rebuilds]
*** xref:how-to-guides/configuring-builds/proc_custom-tags.adoc[Using custom tags]
*** xref:how-to-guides/configuring-builds/proc_entitlement_subscription.adoc[Using Red Hat entitlement subscription]
** Testing your application
*** xref:how-to-guides/testing_applications/con_test-overview.adoc[Overview of {ProductName} tests]
*** xref:how-to-guides/testing_applications/surface-level_tests.adoc[Surface-level tests]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:_content-type: PROCEDURE
:troubleshooting_builds:

[id="entitlement_subscription_{context}"]
= Using Red Hat entitlement subscription

Entitlement subscription allows users to install RPMs that are not accessible without it. In order to use it in your builds, you must have access to an entitlement subscription
and possess the neccessary entitlement certificate files. To obtain them, review https://developers.redhat.com/articles/2022/01/24/create-entitled-builds-red-hat-subscriptions-openshift[Subscription benefits for secure deployments] guide.

Once you have the *<entitlement-id>.pem* and *<entitlement-id>-key.pem* files, you will need to create a secret in your Konflux namespace. You can do it in two ways:

. <<Create-entitlement-secret-through-the-UI>>
. <<Create-entitlement-secret-through-console>>


[[Create-entitlement-secret-through-the-UI]]
== Create entitlement secret through the UI

1. Access the Secrets section in the konflux UI and click on *Add secret*.
2. Set the secret name to *etc-pki-entitlement*.
3. Add the first key with the name *<entitlement-id>-key.pem* and and set the value to the contents of the key file.
4. Add a second key with the name *<entitlement-id>.pem* and set the value to the contents of the certificate file.
5. Save the secret by clicking *Add secret*

[[Create-entitlement-secret-through-console]]
== Create entitlement secret through console

Alternatively, you can create the secret through the CLI. After logging into your cluster and navigating to your namespace, run the following command:

----
oc create secret generic etc-pki-entitlement -n <your-tenant> --from-file <entitlement-id>-key.pem --from-file <entitlement-id>.pem
----

0 comments on commit bdc636f

Please sign in to comment.