Skip to content

Commit

Permalink
finalize multigroup migration
Browse files Browse the repository at this point in the history
  • Loading branch information
clamoriniere committed Mar 21, 2024
1 parent 7de5f33 commit f36db2e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN go mod download

# Copy the go source
COPY main.go main.go
COPY api/ api/
COPY apis/ apis/
COPY controllers/ controllers/
COPY pkg/ pkg/
COPY third_party/ third_party/
Expand Down
24 changes: 18 additions & 6 deletions PROJECT
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
domain: datadoghq.com
layout: go.kubebuilder.io/v2
layout:
- go.kubebuilder.io/v3
multigroup: true
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
projectName: watermarkpodautoscaler
repo: github.com/DataDog/watermarkpodautoscaler
resources:
-
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
- api:
crdVersion: v1
namespaced: true
controller: true
domain: datadoghq.com
group: datadoghq
kind: WatermarkPodAutoscaler
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/DataDog/watermarkpodautoscaler/apis/datadoghq/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: datadoghq.com
group: datadoghq
kind: RecommendWatermarkPodAutoscaler
path: github.com/DataDog/watermarkpodautoscaler/apis/datadoghq/v1alpha1
version: v1alpha1
version: "3"
plugins:
go.sdk.operatorframework.io/v2-alpha: {}
2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.23.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ metadata:
]
capabilities: Basic Install
operators.operatorframework.io/builder: operator-sdk-v1.23.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
name: watermarkpodautoscaler.v0.5.2
namespace: placeholder
spec:
Expand Down
2 changes: 1 addition & 1 deletion bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ annotations:
operators.operatorframework.io.bundle.channel.default.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.23.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3

# Annotations for testing.
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ metadata:
]
capabilities: Basic Install
operators.operatorframework.io/builder: operator-sdk-v1.23.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v2
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
name: watermarkpodautoscaler.v0.6.0-rc.1
namespace: placeholder
spec:
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import (
ctrlzap "sigs.k8s.io/controller-runtime/pkg/log/zap"

monitorv1alpha1 "github.com/DataDog/datadog-operator/apis/datadoghq/v1alpha1"

datadoghqv1alpha1 "github.com/DataDog/watermarkpodautoscaler/apis/datadoghq/v1alpha1"
controllers "github.com/DataDog/watermarkpodautoscaler/controllers/datadoghq"
datadoghqcontrollers "github.com/DataDog/watermarkpodautoscaler/controllers/datadoghq"
"github.com/DataDog/watermarkpodautoscaler/pkg/config"
"github.com/DataDog/watermarkpodautoscaler/pkg/version"
// +kubebuilder:scaffold:imports
Expand Down Expand Up @@ -123,7 +124,7 @@ func main() {
managerLogger := ctrl.Log.WithName("controllers").WithName("WatermarkPodAutoscaler")
klog.SetLogger(managerLogger) // Redirect klog to the controller logger (zap)

if err = (&controllers.WatermarkPodAutoscalerReconciler{
if err = (&datadoghqcontrollers.WatermarkPodAutoscalerReconciler{
Client: mgr.GetClient(),
Log: managerLogger,
Scheme: mgr.GetScheme(),
Expand Down

0 comments on commit f36db2e

Please sign in to comment.