Skip to content

Commit

Permalink
initial re-namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Dec 21, 2021
1 parent 14632ea commit c703a66
Show file tree
Hide file tree
Showing 29 changed files with 40 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Lagoon KBD Test
name: Lagoon Remote Controller Test

on:
push:
branches:
- main
- re-namespace
pull_request:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
domain: amazee.io
repo: github.com/amazeeio/lagoon-kbd
repo: github.com/uselagoon/remote-controller
resources:
- group: lagoon
kind: LagoonBuild
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ There is currently no documentation for how to do this, we may release more info
Using [Helm 3](https://helm.sh/docs/intro/install/)

```
helm repo add lagoon-builddeploy https://raw.githubusercontent.com/amazeeio/lagoon-kbd/main/charts
helm repo add lagoon-builddeploy https://raw.githubusercontent.com/uselagoon/remote-controller/main/charts
## with rabbitmq support for communicating with a lagoon messaging queue
helm upgrade --install -n lagoon-builddeploy lagoon-builddeploy lagoon-builddeploy/lagoon-builddeploy \
Expand All @@ -49,7 +49,7 @@ You will need to install any prerequisites for kubebuilder [see here](https://bo
# install any requirements
make install
# deploy the actual handler
make IMG=amazeeio/lagoon-builddeploy:latest deploy
make IMG=uselagoon/remote-controller:latest deploy
```

## LagoonBuild Spec
Expand All @@ -62,7 +62,7 @@ metadata:
spec:
build:
ci: 'false' # this is a string, not a bool
image: amazeeio/kubectl-build-deploy-dind:v1.8.1
image: uselagoon/kubectl-build-deploy-dind:v1.8.1
type: branch
gitReference: origin/main
openshift: false
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build-push.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
REPO=${2:-amazeeio}
REPO=${2:-uselagoon}
TAG=${1:-latest}
IMGNAME=${3:-lagoon-builddeploy}
IMGNAME=${3:-remote-controller}
echo "Creating image for $REPO/${IMGNAME}:$TAG and pushing to docker hub"
make IMG=$REPO/${IMGNAME}:$TAG docker-build && make IMG=$REPO/${IMGNAME}:$TAG docker-push
4 changes: 2 additions & 2 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Adds namespace to all resources.
namespace: lagoon-kbd-system
namespace: remote-controller-system

# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: lagoon-kbd-
namePrefix: remote-controller-

# Labels to add to all resources and selectors.
#commonLabels:
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: amazeeio/lagoon-builddeploy
newName: uselagoon/remote-controller
newTag: test-tag
6 changes: 3 additions & 3 deletions controller-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ KIND_VER=v1.17.5
# or get the latest tagged version of a specific k8s version of kind
#KIND_VER=$(curl -s https://hub.docker.com/v2/repositories/kindest/node/tags | jq -r '.results | .[].name' | grep 'v1.17' | sort -Vr | head -1)
KIND_NAME=chart-testing
CONTROLLER_IMAGE=amazeeio/lagoon-builddeploy:test-tag
CONTROLLER_IMAGE=uselagoon/remote-controller:test-tag


CONTROLLER_NAMESPACE=lagoon-kbd-system
CONTROLLER_NAMESPACE=remote-controller-system
CHECK_TIMEOUT=20

NS=drupal-example-install
Expand Down Expand Up @@ -238,7 +238,7 @@ echo '
\"spec\": {
\"build\": {
\"ci\": \"true\",
\"image\": \"amazeeio\/kubectl-build-deploy-dind:latest\",
\"image\": \"uselagoon\/kubectl-build-deploy-dind:latest\",
\"type\": \"branch\"
},
\"gitReference\": \"origin\/install\",
Expand Down
2 changes: 1 addition & 1 deletion controllers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"strings"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"sigs.k8s.io/controller-runtime/pkg/client"
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/lagoon_harborintegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"encoding/json"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
harborv2 "github.com/mittwald/goharbor-client/v3/apiv2"
"github.com/mittwald/goharbor-client/v3/apiv2/model"
"github.com/mittwald/goharbor-client/v3/apiv2/model/legacy"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions controllers/lagoonbuild_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/amazeeio/lagoon-kbd/handlers"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
"github.com/uselagoon/remote-controller/handlers"
// Openshift
)

Expand Down
2 changes: 1 addition & 1 deletion controllers/lagoonbuild_deletionhandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
"gopkg.in/matryer/try.v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
Expand Down
2 changes: 1 addition & 1 deletion controllers/lagoonbuild_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"

// Openshift
projectv1 "github.com/openshift/api/project/v1"
Expand Down
2 changes: 1 addition & 1 deletion controllers/lagoonbuild_qoshandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"sort"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion controllers/lagoonbuild_standardhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"encoding/json"
"fmt"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
"k8s.io/apimachinery/pkg/types"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion controllers/lagoonmonitor_buildhandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
Expand Down
4 changes: 2 additions & 2 deletions controllers/lagoonmonitor_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"fmt"
"io"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/amazeeio/lagoon-kbd/handlers"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
"github.com/uselagoon/remote-controller/handlers"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
Expand Down
2 changes: 1 addition & 1 deletion controllers/lagoonmonitor_taskhandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"fmt"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down
2 changes: 1 addition & 1 deletion controllers/lagoontask_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
// openshift
oappsv1 "github.com/openshift/api/apps/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/amazeeio/lagoon-kbd
module github.com/uselagoon/remote-controller

go 1.16

Expand Down
2 changes: 1 addition & 1 deletion handlers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion handlers/message_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/cheshir/go-mq"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
"gopkg.in/matryer/try.v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down
2 changes: 1 addition & 1 deletion handlers/misctask_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/go-logr/logr"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down
2 changes: 1 addition & 1 deletion handlers/resource_cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
)

type cleanup interface {
Expand Down
2 changes: 1 addition & 1 deletion helm-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ case $1 in
helm delete -n lagoon-builddeploy lagoon-builddeploy
;;
install)
helm repo add lagoon-builddeploy https://raw.githubusercontent.com/amazeeio/lagoon-kbd/main/charts
helm repo add lagoon-builddeploy https://raw.githubusercontent.com/uselagoon/remote-controller/main/charts
helm upgrade --install -n lagoon-builddeploy lagoon-builddeploy lagoon-builddeploy/lagoon-builddeploy
;;
install-tgz)
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (
"strings"
"time"

lagoonv1alpha1 "github.com/amazeeio/lagoon-kbd/api/v1alpha1"
"github.com/amazeeio/lagoon-kbd/controllers"
"github.com/amazeeio/lagoon-kbd/handlers"
"github.com/cheshir/go-mq"
lagoonv1alpha1 "github.com/uselagoon/remote-controller/api/v1alpha1"
"github.com/uselagoon/remote-controller/controllers"
"github.com/uselagoon/remote-controller/handlers"
str2duration "github.com/xhit/go-str2duration/v2"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
Expand Down
2 changes: 1 addition & 1 deletion test-resources/example-project1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
build:
ci: 'true' #to make sure that readwritemany is changed to readwriteonce
image: amazeeio/kubectl-build-deploy-dind:latest
image: uselagoon/kubectl-build-deploy-dind:latest
type: branch
gitReference: origin/install
project:
Expand Down
2 changes: 1 addition & 1 deletion test-resources/example-project2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
build:
ci: 'true' #to make sure that readwritemany is changed to readwriteonce
image: amazeeio/kubectl-build-deploy-dind:latest
image: uselagoon/kubectl-build-deploy-dind:latest
type: branch
gitReference: origin/install
project:
Expand Down

0 comments on commit c703a66

Please sign in to comment.