Skip to content

Commit

Permalink
Move controllers back to controllers/ due to gitops-operator
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan West <jonwest@redhat.com>
  • Loading branch information
jgwest committed Aug 7, 2024
1 parent 9098cb2 commit 912c6c0
Show file tree
Hide file tree
Showing 23 changed files with 67 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.19 as builder
FROM golang:1.21 AS builder
ARG TARGETOS
ARG TARGETARCH

Expand All @@ -14,7 +14,7 @@ RUN go mod download
# Copy the go source
COPY cmd/main.go cmd/main.go
COPY api/ api/
COPY internal/controller/ internal/controller/
COPY controllers/ controllers/

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
Expand Down
59 changes: 59 additions & 0 deletions bundle/manifests/argoproj.io_rolloutmanagers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,61 @@ spec:
description: Labels to add to the resources during its creation.
type: object
type: object
controllerResources:
description: Resources requests/limits for Argo Rollout controller
properties:
claims:
description: |-
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.
This is an alpha field and requires enabling the
DynamicResourceAllocation feature gate.
This field is immutable. It can only be set for containers.
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: |-
Name must match the name of one entry in pod.spec.resourceClaims of
the Pod where this field is used. It makes that resource available
inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Requests describes the minimum amount of compute resources required.
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. Requests cannot exceed Limits.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
type: object
env:
description: Env lets you specify environment for Rollouts pods
items:
Expand Down Expand Up @@ -231,6 +286,10 @@ spec:
type: object
type: array
type: object
skipNotificationSecretDeployment:
description: SkipNotificationSecretDeployment lets you specify if
the argo notification secret should be deployed
type: boolean
version:
description: Version defines Argo Rollouts controller tag (optional)
type: string
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (

rolloutsmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"
controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"
monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1"
crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
//+kubebuilder:scaffold:imports
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion hack/upgrade-rollouts-script/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
argoprojlabsRepoOrg = "argoproj-labs"
argoRolloutsManagerRepoName = "argo-rollouts-manager"

controllersDefaultGo = "internal/controller/default.go"
controllersDefaultGo = "controllers/default.go"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cluster-scoped/cluster_scoped_rollouts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"
controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"
controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/rollout_tests_all.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

rolloutsmanagerv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"
controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

rmv1alpha1 "github.com/argoproj-labs/argo-rollouts-manager/api/v1alpha1"

controllers "github.com/argoproj-labs/argo-rollouts-manager/internal/controller"
controllers "github.com/argoproj-labs/argo-rollouts-manager/controllers"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down

0 comments on commit 912c6c0

Please sign in to comment.