diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 88588d5f..dd070ef5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -94,7 +94,7 @@ jobs: id: go - name: Check out code uses: actions/checkout@v4 - - name: Run make verify-manifests + - name: Run make verify-imports run: | make verify-imports unit_test_suite: diff --git a/Makefile b/Makefile index cf7ba751..ec971692 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 0.0.1 +VERSION ?= 0.0.0 # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") @@ -118,7 +118,7 @@ lint: ## Run golangci-lint against code. .PHONY: imports imports: openshift-goimports ## Run openshift goimports against code. - $(OPENSHIFT_GOIMPORTS) -m github.com/kuadrant/kuadrant-dns-operator -i github.com/kuadrant/kuadrant-operator + $(OPENSHIFT_GOIMPORTS) -m github.com/kuadrant/kuadrant-dns-operator -i github.com/kuadrant .PHONY: test test: test-unit test-integration ## Run tests. diff --git a/bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml b/bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml index 4f9c6367..9a54bf66 100644 --- a/bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml +++ b/bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml @@ -69,10 +69,10 @@ metadata: } ] capabilities: Basic Install - createdAt: "2024-02-03T00:24:09Z" + createdAt: "2024-02-08T09:42:33Z" operators.operatorframework.io/builder: operator-sdk-v1.33.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 - name: kuadrant-dns-operator.v0.0.1 + name: kuadrant-dns-operator.v0.0.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -103,6 +103,14 @@ spec: spec: clusterPermissions: - rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch - apiGroups: - kuadrant.io resources: @@ -204,20 +212,20 @@ spec: app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: deployment app.kubernetes.io/part-of: kuadrant-dns-operator - control-plane: controller-manager + control-plane: kuadrant-dns-operator-controller-manager name: kuadrant-dns-operator-controller-manager spec: replicas: 1 selector: matchLabels: - control-plane: controller-manager + control-plane: kuadrant-dns-operator-controller-manager strategy: {} template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - control-plane: controller-manager + control-plane: kuadrant-dns-operator-controller-manager spec: containers: - args: @@ -336,4 +344,4 @@ spec: maturity: alpha provider: name: Red Hat - version: 0.0.1 + version: 0.0.0 diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 7e535328..e564e343 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager + control-plane: kuadrant-dns-operator-controller-manager app.kubernetes.io/name: namespace app.kubernetes.io/instance: system app.kubernetes.io/component: manager @@ -17,7 +17,7 @@ metadata: name: controller-manager namespace: system labels: - control-plane: controller-manager + control-plane: kuadrant-dns-operator-controller-manager app.kubernetes.io/name: deployment app.kubernetes.io/instance: controller-manager app.kubernetes.io/component: manager @@ -27,44 +27,17 @@ metadata: spec: selector: matchLabels: - control-plane: controller-manager + control-plane: kuadrant-dns-operator-controller-manager replicas: 1 template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - control-plane: controller-manager + control-plane: kuadrant-dns-operator-controller-manager spec: - # TODO(user): Uncomment the following code to configure the nodeAffinity expression - # according to the platforms which are supported by your solution. - # It is considered best practice to support multiple architectures. You can - # build your manager image using the makefile target docker-buildx. - # affinity: - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchExpressions: - # - key: kubernetes.io/arch - # operator: In - # values: - # - amd64 - # - arm64 - # - ppc64le - # - s390x - # - key: kubernetes.io/os - # operator: In - # values: - # - linux securityContext: runAsNonRoot: true - # TODO(user): For common cases that do not require escalating privileges - # it is recommended to ensure that all your Pods/Containers are restrictive. - # More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted - # Please uncomment the following code if your project does NOT have to work on old Kubernetes - # versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ). - # seccompProfile: - # type: RuntimeDefault containers: - command: - /manager @@ -89,8 +62,6 @@ spec: port: 8081 initialDelaySeconds: 5 periodSeconds: 10 - # TODO(user): Configure the resources accordingly based on the project requirements. - # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ resources: limits: cpu: 500m diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index a33b8ae2..93144d85 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -4,6 +4,14 @@ kind: ClusterRole metadata: name: manager-role rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch - apiGroups: - kuadrant.io resources: diff --git a/internal/provider/factory.go b/internal/provider/factory.go index 2ba1c672..8a309634 100644 --- a/internal/provider/factory.go +++ b/internal/provider/factory.go @@ -12,6 +12,8 @@ import ( "github.com/kuadrant/kuadrant-dns-operator/api/v1alpha1" ) +// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch + var errUnsupportedProvider = fmt.Errorf("provider type given is not supported") // ProviderConstructor constructs a provider given a Secret resource and a Context.