Cloud Experts Documentation

ECR Secret Operator

Amazon Elastic Container Registry Private Registry Authenticationexternal link (opens in new tab) provides a temporary authorization token valid only for 12 hours. This operator refreshes automatically the Amazon ECR authorization token before it expires, reducing the overhead in managing the authentication flow.

This operator contains two Custom Resources which direct the operator to generate/refresh Amazon ECR authorization token in a timely manner:

How to use this operator

Prerequisites

Install the operator

Installed Operator

Create the ECR Secret CRD

A docker registry secret is created by the operator momentally and the token is patched every 10 hours

A sample build process with generated secret

Link the secret to builder

Configure build config to point to your ECR Container repository

Build should succeed and push the image to the the private ECR Container repository

Success Build

Create the ECR Secret Argo CD Helm Repo CRD

The ArgoCD application should sync with ECR helm chart successfully

Create IAM user and Policy

Notes: These are sample commands. Please fill in your own resource parameters E.g. ARN Create the policy Create a user and access key and attach the policy Notes: Save access key id and key for later usage Set up a specific ECR repository access Create kubernetes Secret with iam user

Create STS Assume Role

About AWS STS and Assume Roleexternal link (opens in new tab) Notes: These are sample commands. Please fill in your own resource parameters E.g. ARN Prequisites An STS Openshift Cluster Setup Environment Variables Create the policy Create the role and attach the policy Create the repository policy Create STS kubernetes Secret

Interested in contributing to these docs?

Collaboration drives progress. Help improve our documentation The Red Hat Way.

Red Hat logo LinkedIn YouTube Facebook Twitter

Products

Tools

Try, buy & sell

Communicate

About Red Hat

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Subscribe to our newsletter, Red Hat Shares

Sign up now
© 2023 Red Hat, Inc.