Platform Engineer Activity: Update the Component Template

While the developer can add the necessary annotations to their Component, it’s best to update the Template so future developers can benefit from the Argo CD integration without having to manually add the annotation.

Login as Platform Engineer

Please make sure to log in as a Platform Engineer with pe1 / {common_password}. Expand to the below note to familiarise yourself with the process.
Click to learn how to login as a Platform Engineer

Login as Platform Engineer

You will perform this activity as a Platform Engineer. Please follow the below steps to logout from Red Hat Developer Hub and GitLab, and login back as a Platform Engineer (pe1 / {common_password})

  • Logout from Red Hat Developer Hub

    • Sign out of Red Hat Developer Hub from the Profile dropdown as shown in the screenshot below.

      Signing out of Red Hat Developer Hub
  • Logout from GitLab

    • Click on the Profile icon, and Sign out from the dropdown as shown in the screenshot below.

      Signing out of GitLab
  • Login back as a Platform Engineer to Red Hat Developer Hub and GitLab using the credentials pe1 / {common_password}

Update the Quarkus Service template in GitLab

  1. Visit the rhdh/template-quarkus-simple/skeleton/catalog-info.yaml file in GitLab.

  2. Select Edit > Edit single file.

  3. Uncomment the following in the annotations section of the file:

    argocd/app-selector: rht-gitops.com/${{ values.gitops_namespace }}=${{ values.owner }}-${{values.component_id}}

    Edit the Template in Argo CD

  4. Scroll down and enter a commit message feat: Enable argocd/app-selector annotation.

  5. Use the Commit changes button to commit the new annotation.

The annotation value will be automatically generated, similar to the Argo CD label, using the values provided by developers when they use the Template.

Refresh the Quarkus Service Template on Red Hat Developer Hub

Return to your Red Hat Developer Hub instance to view the quarkus-web-template after committing the change. Use the Schedule entity refresh button to pull this change from Git to Red Hat Developer Hub for your Quarkus application.

Manually refreshing is an optional step, since Red Hat Developer Hub will check for upstream Entity changes every few minutes.

Refresh Template Button

From this point forward any new Component created using the Template will display the CD tab automatically.

Conclusion

Congratulations! You’ve learned how to:

  • Create and Import Software Templates

  • Create new Components using a Software Template

  • Use annotations to provide information to plugins

  • Force refresh Entities in the Software Catalog