diff --git a/Dockerfile b/Dockerfile index 67b659c..a4d3767 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/Makefile b/Makefile index 1a566e9..1d16af4 100644 --- a/Makefile +++ b/Makefile @@ -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. diff --git a/PROJECT b/PROJECT index a58983c..9dfa9d2 100644 --- a/PROJECT +++ b/PROJECT @@ -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 @@ -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 diff --git a/api/v1/record_webhook.go b/api/v1/record_webhook.go index bdbca31..f52cd3a 100644 --- a/api/v1/record_webhook.go +++ b/api/v1/record_webhook.go @@ -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 { diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 3fac186..a571b98 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 SAP SE. diff --git a/controllers/ingress_shim_controller.go b/controllers/ingress_shim_controller.go index 7652636..4b89d85 100644 --- a/controllers/ingress_shim_controller.go +++ b/controllers/ingress_shim_controller.go @@ -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 diff --git a/controllers/record_controller.go b/controllers/record_controller.go index bf395ac..bcffe3f 100644 --- a/controllers/record_controller.go +++ b/controllers/record_controller.go @@ -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 ( diff --git a/controllers/service_shim_controller.go b/controllers/service_shim_controller.go index e67328a..8b272e4 100644 --- a/controllers/service_shim_controller.go +++ b/controllers/service_shim_controller.go @@ -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 diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 618dfd9..2ef4f25 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -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 ) diff --git a/deploy/kustomize/config/crd/bases/disco.stable.sap.cc_records.yaml b/deploy/kustomize/config/crd/bases/disco.stable.sap.cc_records.yaml index 6fb75dd..82e3d7b 100644 --- a/deploy/kustomize/config/crd/bases/disco.stable.sap.cc_records.yaml +++ b/deploy/kustomize/config/crd/bases/disco.stable.sap.cc_records.yaml @@ -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 @@ -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 @@ -124,9 +128,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/deploy/kustomize/config/rbac/role.yaml b/deploy/kustomize/config/rbac/role.yaml index 06b2372..4ba15e9 100644 --- a/deploy/kustomize/config/rbac/role.yaml +++ b/deploy/kustomize/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: diff --git a/deploy/kustomize/config/webhook/manifests.yaml b/deploy/kustomize/config/webhook/manifests.yaml index f1a3ba3..1a7db7e 100644 --- a/deploy/kustomize/config/webhook/manifests.yaml +++ b/deploy/kustomize/config/webhook/manifests.yaml @@ -2,7 +2,6 @@ apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: - creationTimestamp: null name: mutating-webhook-configuration webhooks: - admissionReviewVersions: diff --git a/go.mod b/go.mod index b6649ed..3768fc4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/sapcc/kubernetes-operators/disco +module github.com/sapcc/disco go 1.23 diff --git a/go.sum b/go.sum index eeeb2e3..47a6960 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/main.go b/main.go index e23cf17..712a350 100644 --- a/main.go +++ b/main.go @@ -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 ) diff --git a/pkg/disco/designate.go b/pkg/disco/designate.go index 5649b36..dfde37e 100644 --- a/pkg/disco/designate.go +++ b/pkg/disco/designate.go @@ -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.