Skip to content

Commit 4f0bc0e

Browse files
feature: adapted yamls, added avp to scheme
1 parent 3f0987e commit 4f0bc0e

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

cmd/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"flag"
2222
"os"
2323

24+
avp "github.com/pdok/azure-volume-populator/api/v1alpha1"
2425
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
2526
// to ensure that exec-entrypoint and run can make use of them.
2627
_ "k8s.io/client-go/plugin/pkg/client/auth"
@@ -175,9 +176,16 @@ func main() {
175176
os.Exit(1)
176177
}
177178

179+
scheme := mgr.GetScheme()
180+
181+
if err := avp.AddToScheme(scheme); err != nil {
182+
setupLog.Error(err, "unable to add AzureVolumePopulator scheme")
183+
os.Exit(1)
184+
}
185+
178186
if err := (&controller.VolumeReconciler{
179187
Client: mgr.GetClient(),
180-
Scheme: mgr.GetScheme(),
188+
Scheme: scheme,
181189
}).SetupWithManager(mgr); err != nil {
182190
setupLog.Error(err, "unable to create controller", "controller", "Volume")
183191
os.Exit(1)

config/default/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ namePrefix: volume-operator-
1515
# someName: someValue
1616

1717
resources:
18-
- ../crd
1918
- ../rbac
2019
- ../manager
2120
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in

config/manager/kustomization.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
resources:
22
- manager.yaml
3+
apiVersion: kustomize.config.k8s.io/v1beta1
4+
kind: Kustomization
5+
images:
6+
- name: controller
7+
newName: pdok/volume-operator
8+
newTag: latest

config/manager/manager.yaml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,7 @@ spec:
3030
control-plane: controller-manager
3131
app.kubernetes.io/name: volume-operator
3232
spec:
33-
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
34-
# according to the platforms which are supported by your solution.
35-
# It is considered best practice to support multiple architectures. You can
36-
# build your manager image using the makefile target docker-buildx.
37-
# affinity:
38-
# nodeAffinity:
39-
# requiredDuringSchedulingIgnoredDuringExecution:
40-
# nodeSelectorTerms:
41-
# - matchExpressions:
42-
# - key: kubernetes.io/arch
43-
# operator: In
44-
# values:
45-
# - amd64
46-
# - arm64
47-
# - ppc64le
48-
# - s390x
49-
# - key: kubernetes.io/os
50-
# operator: In
51-
# values:
52-
# - linux
5333
securityContext:
54-
# Projects are configured by default to adhere to the "restricted" Pod Security Standards.
55-
# This ensures that deployments meet the highest security requirements for Kubernetes.
56-
# For more details, see: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
5734
runAsNonRoot: true
5835
seccompProfile:
5936
type: RuntimeDefault

0 commit comments

Comments
 (0)