image-clone-controller

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

README

image-clone-controller

Kubernetes controller to replicate and consume images via backup registry.

image-clone-controller clones images from all external(public) images into a backup registry. And then overrides pods to use images from backup registry instead of the external registry.

Currently, this controller supports the following resources:

  • DaemonSet
  • Deployment

NOTE: This controller will ignore system namespaces i.e. namespaces prefixed with kube-

Credentials

To provide credentials to access registry, user must create a secret image-clone-controller-config in the namespace where the operator is deployed.

apiVersion: v1
kind: Secret
metadata:
  name: image-clone-controller-config
  namespace: image-clone-controller-system
data:
  # Example: docker.io
  registry-url: <redacted>
  # Example: admin
  username: <redacted>
  # Example: fakepass
  password: <redacted>

Credential secret is a pre-requisite for installing via manifests and for local development. Secret name can be modified using CONFIG_SECRET_NAME environment variable.

Installation

Manifests are maintained at manifests and are updated automatically through the pipeline. You can deploy via either:

To install the latest release:

  1. Modify the secret and provide valid credentials.
  2. Run any of these based on preference:
kubectl apply -f deploy/resources.yaml

OR

kubectl apply -f deploy/vanilla/

This will create all the required resources which include:

  • Namespace
  • Secret
  • RBAC
  • Deployment
  • Service

Credentials for registry are a hard requirement for the controller to work. So make sure you have created the secret for registry by following this documentation.

Local Development

Requirements
Execution
  • Ensure that a valid kubeconfig is loaded
  • Create a namespace image-clone-controller-system
  • Create a secret image-clone-controller-config
  • Run make run from the root directory to build and execute the binary

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL