Skip to content

Commit

Permalink
Minor cleanup from pre-repo-transition. (#2)
Browse files Browse the repository at this point in the history
Added CI workflow for docker image publishing.
  • Loading branch information
peter-mcclonski authored Nov 23, 2024
1 parent c78ce07 commit 693200d
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 18 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Publish CI

on:
push:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: build-and-push
env:
GH_TOKEN = ${{ secrets.GITHUB_TOKEN }}
run: make docker-buildx
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit.
OPERATOR_SDK_VERSION ?= v1.37.0
# Image URL to use all building/pushing image targets
IMG ?= pmcclonski/lakekeeper-operator
IMG ?= ghcr.io/lakekeeper/lakekeeper-operator
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.29.0

Expand Down Expand Up @@ -157,13 +157,15 @@ docker-push: ## Push docker image with the manager.
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
.PHONY: docker-buildx
docker-buildx: ## Build and push docker image for the manager for cross-platform support
docker login ghcr.io/lakekeeper ${GH_TOKEN}
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- $(CONTAINER_TOOL) buildx create --name project-v3-builder
$(CONTAINER_TOOL) buildx use project-v3-builder
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
- $(CONTAINER_TOOL) buildx rm project-v3-builder
rm Dockerfile.cross
docker logout

.PHONY: build-installer
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
Expand Down
8 changes: 4 additions & 4 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
projectName: lakekeeper-operator
repo: github.com/peter-mcclonski/lakekeeper-operator
repo: github.com/lakekeeper/lakekeeper-operator
resources:
- api:
crdVersion: v1
Expand All @@ -18,7 +18,7 @@ resources:
domain: lakekeeper.io
group: cache
kind: Warehouse
path: github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1
path: github.com/lakekeeper/lakekeeper-operator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
Expand All @@ -27,7 +27,7 @@ resources:
domain: lakekeeper.io
group: cache
kind: Project
path: github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1
path: github.com/lakekeeper/lakekeeper-operator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
Expand All @@ -36,6 +36,6 @@ resources:
domain: lakekeeper.io
group: cache
kind: Lakekeeper
path: github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1
path: github.com/lakekeeper/lakekeeper-operator/api/v1alpha1
version: v1alpha1
version: "3"
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import (
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

cachev1alpha1 "github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1"
"github.com/peter-mcclonski/lakekeeper-operator/internal/controller"
cachev1alpha1 "github.com/lakekeeper/lakekeeper-operator/api/v1alpha1"
"github.com/lakekeeper/lakekeeper-operator/internal/controller"
//+kubebuilder:scaffold:imports
)

Expand Down
2 changes: 1 addition & 1 deletion config/helm-charts/lakekeeper-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ controllerManager:
drop:
- ALL
image:
repository: pmcclonski/lakekeeper-operator
repository: lakekeeper/lakekeeper-operator
tag: latest
resources:
limits:
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,4 +4,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: pmcclonski/lakekeeper-operator
newName: lakekeeper/lakekeeper-operator
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/peter-mcclonski/lakekeeper-operator
module github.com/lakekeeper/lakekeeper-operator

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion internal/controller/lakekeeper_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
"strconv"

cachev1alpha1 "github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1"
cachev1alpha1 "github.com/lakekeeper/lakekeeper-operator/api/v1alpha1"
)

// LakekeeperReconciler reconciles a Lakekeeper object
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/lakekeeper_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

cachev1alpha1 "github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1"
cachev1alpha1 "github.com/lakekeeper/lakekeeper-operator/api/v1alpha1"
)

var _ = Describe("Lakekeeper Controller", func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/project_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"

cachev1alpha1 "github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1"
cachev1alpha1 "github.com/lakekeeper/lakekeeper-operator/api/v1alpha1"
)

// ProjectReconciler reconciles a Project object
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/project_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

cachev1alpha1 "github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1"
cachev1alpha1 "github.com/lakekeeper/lakekeeper-operator/api/v1alpha1"
)

var _ = Describe("Project Controller", func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

cachev1alpha1 "github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1"
cachev1alpha1 "github.com/lakekeeper/lakekeeper-operator/api/v1alpha1"
//+kubebuilder:scaffold:imports
)

Expand Down
2 changes: 1 addition & 1 deletion internal/controller/warehouse_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"

cachev1alpha1 "github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1"
cachev1alpha1 "github.com/lakekeeper/lakekeeper-operator/api/v1alpha1"
)

// WarehouseReconciler reconciles a Warehouse object
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/warehouse_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

cachev1alpha1 "github.com/peter-mcclonski/lakekeeper-operator/api/v1alpha1"
cachev1alpha1 "github.com/lakekeeper/lakekeeper-operator/api/v1alpha1"
)

var _ = Describe("Warehouse Controller", func() {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/peter-mcclonski/lakekeeper-operator/test/utils"
"github.com/lakekeeper/lakekeeper-operator/test/utils"
)

const namespace = "lakekeeper-operator-system"
Expand Down

0 comments on commit 693200d

Please sign in to comment.