Skip to content

Commit

Permalink
finish migration
Browse files Browse the repository at this point in the history
  • Loading branch information
auhlig committed Dec 11, 2024
1 parent 2550adc commit 07a118c
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 43 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
LABEL source_repository="https://github.com/sapcc/kubernetes-operators/disco"
LABEL source_repository="https://github.com/sapcc/disco"
WORKDIR /
COPY --from=builder /workspace/bin/linux/disco .
USER 65532:65532
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ build: GIT_STATE = $(shell if git diff --quiet; then echo clean; else echo dir
build: BUILD_DATE = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
build: generate fmt vet ## Build disco binary.
@mkdir -p bin/$(OS)
go build -mod=readonly -ldflags "-s -w -X github.com/sapcc/kubernetes-operators/disco/pkg/version.GitBranch=$(GIT_BRANCH) -X github.com/sapcc/kubernetes-operators/disco/pkg/version.GitCommit=$(GIT_COMMIT) -X github.com/sapcc/kubernetes-operators/disco/pkg/version.GitState=$(GIT_STATE) -X github.com/sapcc/kubernetes-operators/disco/pkg/version.BuildDate=$(BUILD_DATE)" -o bin/$(OS)/disco main.go
go build -mod=readonly -ldflags "-s -w -X github.com/sapcc/disco/pkg/version.GitBranch=$(GIT_BRANCH) -X github.com/sapcc/disco/pkg/version.GitCommit=$(GIT_COMMIT) -X github.com/sapcc/disco/pkg/version.GitState=$(GIT_STATE) -X github.com/sapcc/disco/pkg/version.BuildDate=$(BUILD_DATE)" -o bin/$(OS)/disco main.go

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
Expand Down
4 changes: 2 additions & 2 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ domain: stable.sap.cc
layout:
- go.kubebuilder.io/v3
projectName: disco
repo: github.com/sapcc/kubernetes-operators/disco
repo: github.com/sapcc/disco
resources:
- api:
crdVersion: v1
Expand All @@ -11,7 +11,7 @@ resources:
domain: stable.sap.cc
group: disco
kind: Record
path: github.com/sapcc/kubernetes-operators/disco/api/v1
path: github.com/sapcc/disco/api/v1
version: v1
webhooks:
defaulting: true
Expand Down
4 changes: 2 additions & 2 deletions api/v1/record_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/webhook"

"github.com/sapcc/kubernetes-operators/disco/pkg/disco"
util "github.com/sapcc/kubernetes-operators/disco/pkg/util"
"github.com/sapcc/disco/pkg/disco"
util "github.com/sapcc/disco/pkg/util"
)

func (r *Record) SetupWebhookWithManager(mgr ctrl.Manager) error {
Expand Down
1 change: 0 additions & 1 deletion api/v1/zz_generated.deepcopy.go

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

8 changes: 4 additions & 4 deletions controllers/ingress_shim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

discov1 "github.com/sapcc/kubernetes-operators/disco/api/v1"
"github.com/sapcc/kubernetes-operators/disco/pkg/clientutil"
"github.com/sapcc/kubernetes-operators/disco/pkg/disco"
util "github.com/sapcc/kubernetes-operators/disco/pkg/util"
discov1 "github.com/sapcc/disco/api/v1"
"github.com/sapcc/disco/pkg/clientutil"
"github.com/sapcc/disco/pkg/disco"
util "github.com/sapcc/disco/pkg/util"
)

// IngressShimReconciler reconciles an ingress object
Expand Down
8 changes: 4 additions & 4 deletions controllers/record_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

discov1 "github.com/sapcc/kubernetes-operators/disco/api/v1"
"github.com/sapcc/kubernetes-operators/disco/pkg/clientutil"
"github.com/sapcc/kubernetes-operators/disco/pkg/disco"
util "github.com/sapcc/kubernetes-operators/disco/pkg/util"
discov1 "github.com/sapcc/disco/api/v1"
"github.com/sapcc/disco/pkg/clientutil"
"github.com/sapcc/disco/pkg/disco"
util "github.com/sapcc/disco/pkg/util"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions controllers/service_shim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

discov1 "github.com/sapcc/kubernetes-operators/disco/api/v1"
"github.com/sapcc/kubernetes-operators/disco/pkg/clientutil"
"github.com/sapcc/kubernetes-operators/disco/pkg/disco"
discov1 "github.com/sapcc/disco/api/v1"
"github.com/sapcc/disco/pkg/clientutil"
"github.com/sapcc/disco/pkg/disco"
)

// ServiceShimReconciler reconciles a service object
Expand Down
2 changes: 1 addition & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

discov1 "github.com/sapcc/kubernetes-operators/disco/api/v1"
discov1 "github.com/sapcc/disco/api/v1"
//+kubebuilder:scaffold:imports
)

Expand Down
26 changes: 12 additions & 14 deletions deploy/kustomize/config/crd/bases/disco.stable.sap.cc_records.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.14.0
name: records.disco.stable.sap.cc
spec:
group: disco.stable.sap.cc
Expand Down Expand Up @@ -40,14 +39,19 @@ spec:
description: Record is the Schema for the records API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -124,9 +128,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
1 change: 0 additions & 1 deletion deploy/kustomize/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down
1 change: 0 additions & 1 deletion deploy/kustomize/config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
creationTimestamp: null
name: mutating-webhook-configuration
webhooks:
- admissionReviewVersions:
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/sapcc/kubernetes-operators/disco
module github.com/sapcc/disco

go 1.23

Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

discov1 "github.com/sapcc/kubernetes-operators/disco/api/v1"
"github.com/sapcc/kubernetes-operators/disco/controllers"
"github.com/sapcc/kubernetes-operators/disco/pkg/disco"
"github.com/sapcc/kubernetes-operators/disco/pkg/version"
discov1 "github.com/sapcc/disco/api/v1"
"github.com/sapcc/disco/controllers"
"github.com/sapcc/disco/pkg/disco"
"github.com/sapcc/disco/pkg/version"
//+kubebuilder:scaffold:imports
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/disco/designate.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"sigs.k8s.io/controller-runtime/pkg/log"

util "github.com/sapcc/kubernetes-operators/disco/pkg/util"
util "github.com/sapcc/disco/pkg/util"
)

// headersForAllDesignateRequests are headers set on all designate requests.
Expand Down

0 comments on commit 07a118c

Please sign in to comment.