Platform Engineer Activity: Update the Component Template

While the developer can add the necessary annotation 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

By now you’re probably familiar with how you can login as a Platform Engineer using the pe1 user and the password {common_password}. If you are unsure, please expand the section below.

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

    • Navigate to the Settings side menu of Red Hat Developer Hub and click on the kebab menu in the Profile card

      Settings of Red Hat Developer Hub
    • Sign out of Red Hat Developer Hub from the Settings section 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 Red Hat Developer Hub
  • 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. 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

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