diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 8496cd3..726991c 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -30,3 +30,15 @@ rules: - get - patch - update +- apiGroups: + - "" + resources: + - pods + - services + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + verbs: + - '*' diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index c362495..9662aa7 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -13,3 +13,6 @@ subjects: - kind: ServiceAccount name: controller-manager namespace: system +- kind: ServiceAccount + name: default + namespace: default diff --git a/config/samples/deploy.yaml b/config/samples/deploy.yaml new file mode 100644 index 0000000..853fab6 --- /dev/null +++ b/config/samples/deploy.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: locust-operator +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + name: locust-operator + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + creationTimestamp: null + labels: + name: locust-operator + operator: locust-operator + spec: + containers: + - image: d.lilpenguins.com/locust-operator:f9acea7f57cf9a1d9324f8d81e0ae947274e0695 + imagePullPolicy: IfNotPresent + name: locust-operator + resources: + requests: + memory: "512Mi" + cpu: "500m" + limits: + memory: "1Gi" + cpu: "500m" + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File diff --git a/internal/controller/build.go b/internal/controller/build.go index b158c04..a721ec3 100644 --- a/internal/controller/build.go +++ b/internal/controller/build.go @@ -8,10 +8,12 @@ import ( ) func (r *LocustClusterReconciler) CreateLeaderJob(log logr.Logger, locustCluster *locustCluster.LocustCluster, ctx context.Context) error { + log.Info("Creating leader") return nil } func (r *LocustClusterReconciler) CreateLeaderService(log logr.Logger, locustCluster *locustCluster.LocustCluster, ctx context.Context) error { + log.Info("Creating service for leader") return nil }