Skip to content

Commit

Permalink
Merge pull request #9 from Kuadrant/unified_kuadrant
Browse files Browse the repository at this point in the history
fix: few small issues rbac, version etc..
  • Loading branch information
mikenairn authored Feb 8, 2024
2 parents a1a67b4 + 2a3c776 commit bdba5d7
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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.
Expand Down
20 changes: 14 additions & 6 deletions bundle/manifests/kuadrant-dns-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down Expand Up @@ -103,6 +103,14 @@ spec:
spec:
clusterPermissions:
- rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- kuadrant.io
resources:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -336,4 +344,4 @@ spec:
maturity: alpha
provider:
name: Red Hat
version: 0.0.1
version: 0.0.0
37 changes: 4 additions & 33 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- kuadrant.io
resources:
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bdba5d7

Please sign in to comment.