Change package name and fixup imports and paths

This commit is contained in:
Michael Bridgen 2020-08-10 18:09:57 +01:00
parent 48aac78343
commit ab4a963d50
12 changed files with 26 additions and 26 deletions

View File

@ -1,6 +1,6 @@
# Image URL to use all building/pushing image targets
IMG ?= squaremo/image-automation-controller
IMG ?= fluxcd/image-automation-controller
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"
@ -32,7 +32,7 @@ ${TEST_CRDS}/gitrepositories.yaml:
${TEST_CRDS}/imagepolicies.yaml:
mkdir -p ${TEST_CRDS}
curl -s https://raw.githubusercontent.com/squaremo/image-reflector-controller/main/config/crd/bases/image.toolkit.fluxcd.io_imagepolicies.yaml \
curl -s https://raw.githubusercontent.com/fluxcd/image-reflector-controller/main/config/crd/bases/image.toolkit.fluxcd.io_imagepolicies.yaml \
-o ${TEST_CRDS}/imagepolicies.yaml
# Run tests

View File

@ -1,5 +1,5 @@
domain: toolkit.fluxcd.io
repo: github.com/squaremo/image-automation-controller
repo: github.com/fluxcd/image-automation-controller
resources:
- group: image
kind: ImageUpdateAutomation

View File

@ -3,10 +3,10 @@
This is part of the image update automation, as outlined in
- [this post](https://squaremo.dev/posts/gitops-controllers/); and refined in
- [this design](https://github.com/squaremo/image-reflector-controller/pull/5)
- [this design](https://github.com/fluxcd/image-reflector-controller/pull/5)
Its sibling repository
[image-reflector-controller](https://github.com/squaremo/image-reflector-controller)
[image-reflector-controller](https://github.com/fluxcd/image-reflector-controller)
implements the image metadata reflection controller (scans container
image repositories and reflects the metadata in Kubernetes resources);
this repository implements the image update automation controller.
@ -40,13 +40,13 @@ This controller relies on the image reflector controller. A working
configuration for the latter can be applied straight from the GitHub
repository (NB `-k`):
kubectl apply -k github.com/squaremo/image-reflector-controller/config/default
kubectl apply -k github.com/fluxcd/image-reflector-controller/config/default
### Installing the automation controller
You can apply a working configuration directly from GitHub:
kubectl apply -k github.com/squaremo/image-automation-controller/config/default
kubectl apply -k github.com/fluxcd/image-automation-controller/config/default
or, in a clone of this repository,
@ -221,7 +221,7 @@ given by the image policy. Here's an example, [from my own
repository][squaremo-auto-commit].
[source-controller]: https://github.com/fluxcd/source-controller
[image-reflector]: https://github.com/squaremo/image-reflector-controller
[image-reflector]: https://github.com/fluxcd/image-reflector-controller
[gotk]: https://toolkit.fluxcd.io
[cuttlefacts-app-repo]: https://github.com/cuttlefacts/cuttlefacts-app
[github-fingerprints]: https://docs.github.com/en/github/authenticating-to-github/githubs-ssh-key-fingerprints

View File

@ -4,4 +4,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: squaremo/image-automation-controller
newName: fluxcd/image-automation-controller

View File

@ -19,7 +19,7 @@ spec:
- /manager
args:
- --enable-leader-election
image: squaremo/image-automation-controller
image: fluxcd/image-automation-controller
name: manager
resources:
limits:

View File

@ -42,11 +42,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/source"
imagev1alpha1 "github.com/fluxcd/image-automation-controller/api/v1alpha1"
"github.com/fluxcd/image-automation-controller/pkg/update"
imagev1alpha1_reflect "github.com/fluxcd/image-reflector-controller/api/v1alpha1"
sourcev1alpha1 "github.com/fluxcd/source-controller/api/v1alpha1"
"github.com/fluxcd/source-controller/pkg/git"
imagev1alpha1 "github.com/squaremo/image-automation-controller/api/v1alpha1"
"github.com/squaremo/image-automation-controller/pkg/update"
imagev1alpha1_reflect "github.com/squaremo/image-reflector-controller/api/v1alpha1"
)
const defaultInterval = 2 * time.Minute

View File

@ -31,9 +31,9 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
imagev1alpha1 "github.com/fluxcd/image-automation-controller/api/v1alpha1"
imagev1alpha1_reflect "github.com/fluxcd/image-reflector-controller/api/v1alpha1"
sourcev1alpha1 "github.com/fluxcd/source-controller/api/v1alpha1"
imagev1alpha1 "github.com/squaremo/image-automation-controller/api/v1alpha1"
imagev1alpha1_reflect "github.com/squaremo/image-reflector-controller/api/v1alpha1"
// +kubebuilder:scaffold:imports
)

View File

@ -37,10 +37,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
imagev1alpha1 "github.com/fluxcd/image-automation-controller/api/v1alpha1"
"github.com/fluxcd/image-automation-controller/pkg/test"
imagev1alpha1_reflect "github.com/fluxcd/image-reflector-controller/api/v1alpha1"
sourcev1alpha1 "github.com/fluxcd/source-controller/api/v1alpha1"
imagev1alpha1 "github.com/squaremo/image-automation-controller/api/v1alpha1"
"github.com/squaremo/image-automation-controller/pkg/test"
imagev1alpha1_reflect "github.com/squaremo/image-reflector-controller/api/v1alpha1"
)
const timeout = 10 * time.Second

4
go.mod
View File

@ -1,8 +1,9 @@
module github.com/squaremo/image-automation-controller
module github.com/fluxcd/image-automation-controller
go 1.14
require (
github.com/fluxcd/image-reflector-controller v0.0.0-20200810165546-c2265d9b49b9
// If you bump this, change TOOLKIT_VERSION in the Makefile to match
github.com/fluxcd/source-controller v0.0.7
github.com/go-git/go-billy/v5 v5.0.0
@ -11,7 +12,6 @@ require (
github.com/google/go-containerregistry v0.1.1
github.com/onsi/ginkgo v1.12.1
github.com/onsi/gomega v1.10.1
github.com/squaremo/image-reflector-controller v0.0.0-20200806084621-949f5815f1b0
k8s.io/api v0.18.6
k8s.io/apimachinery v0.18.6
k8s.io/client-go v0.18.6

4
go.sum
View File

@ -293,6 +293,8 @@ github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwo
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fluxcd/image-reflector-controller v0.0.0-20200810165546-c2265d9b49b9 h1:puMXg9dmh/i3rpAuzVq5R5L84pZMA/KUNZbPxi0JdWw=
github.com/fluxcd/image-reflector-controller v0.0.0-20200810165546-c2265d9b49b9/go.mod h1:v2cJ+q7zRlj1VhYjtE1i3cGAFkSTz21/tKidWIIGUtU=
github.com/fluxcd/pkg v0.0.3 h1:yhjtpGtD9LxFo8JtwTuUxJyFcX2wSSb0TPptIEpGSmA=
github.com/fluxcd/pkg v0.0.3/go.mod h1:rtlppQU+9DNikyDZptLdOeTf+wBvQQiQQ/J113FPoeU=
github.com/fluxcd/source-controller v0.0.7 h1:D17Le7bc+53deRA3EMJc9eB/uU2HqvkMCwILE5HRhPk=
@ -913,8 +915,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/squaremo/image-reflector-controller v0.0.0-20200806084621-949f5815f1b0 h1:kTCPWxu6N63aG44NFTj0hdLAdUUAZ3NqUbvwqs6/Bms=
github.com/squaremo/image-reflector-controller v0.0.0-20200806084621-949f5815f1b0/go.mod h1:mSk+RSF2BxrxHCq58gVnPbPYo+paz6O8GaeclrUoTzs=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=

View File

@ -26,10 +26,10 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
imagev1alpha1_auto "github.com/fluxcd/image-automation-controller/api/v1alpha1"
"github.com/fluxcd/image-automation-controller/controllers"
imagev1alpha1_reflect "github.com/fluxcd/image-reflector-controller/api/v1alpha1"
sourcev1alpha1 "github.com/fluxcd/source-controller/api/v1alpha1"
imagev1alpha1_auto "github.com/squaremo/image-automation-controller/api/v1alpha1"
"github.com/squaremo/image-automation-controller/controllers"
imagev1alpha1_reflect "github.com/squaremo/image-reflector-controller/api/v1alpha1"
// +kubebuilder:scaffold:imports
)

View File

@ -8,7 +8,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/squaremo/image-automation-controller/pkg/test"
"github.com/fluxcd/image-automation-controller/pkg/test"
)
func TestUpdate(t *testing.T) {