GitXplorerGitXplorer
m

flux-ecr-example

public
2 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
24acd3e4c6c065b29abe39919726b5b90ab9e541

Fibonacci backoff to handle flaky AWS metadata service

mmwhittington21 committed 6 years ago
Unverified
b1b7fe8e76ab8eadae6d1b8498fcc05f5608a253

Fix for sh not being as cool as bash

mmwhittington21 committed 6 years ago
Unverified
c0070233c169c9e9113930b505a465af63aa7a47

Add support for multiple docker registry secrets at the same time as ECR

mmwhittington21 committed 6 years ago
Unverified
84e19e8fadcb61159f8eafda96ee5e55e49ce159

Clarify purpose of repo

mmwhittington21 committed 6 years ago
Unverified
b25d0b729432b47c44818ab0438f6db818cebe51

Clarify Dockerfile purpose

mmwhittington21 committed 6 years ago
Unverified
3b2bbdf620a879f5aa8fc50c4ca07e731178307a

Adds manifest and docker image files

mmwhittington21 committed 6 years ago

README

The README file for this repository.

AWS ECR creds for Flux

This container provides a way to get the ECR creds via aws-cli and then login via Docker and write the Docker .config file to disk somewhere.

Basic usage

  1. Replace "ap-southeast-2" in flux-deployment.yaml with the name of the AWS region that your registry is in
  2. Edit the "--git-url" in flux-deployment.yaml to point to your git repository
  3. Install the supporting manifests from weaveworks/flux/deploy according to the installation instructions
  4. Install the flux-deployment.yaml manifest with kubectl apply -f flux-deployment.yaml

Now your flux pod should be up and running and checking ECR images running inside your cluster!

If you see an error message about "--docker-config" then something isn't configured right. Debug by running kubectl exec -it <pod_name> -c flux /bin/sh and running cat /docker-creds/config.json and inspecting the docker config using base64 to look for reasons why.

The Dockerfile is provided for convenience but the one already used in the manifest should work fine.

Multiple docker registry support

You can also get support for ECR in combination with other docker registries. To do this, edit the flux-with-secrets-deployment.yaml file as you would for the basic usage, change the references to example-docker-pull-secret to instead point to a secret in the namespace flux is running in. The secret should be of type kubernetes.io/dockercfg. Anything created for use with a serviceAccount will work.

Apply the flux-with-secrets-deployment.yaml manifest and it will use jq to combine all of the docker auth json together into one file, which flux will then use for auth.