Skip to content

Commit c804ad6

Browse files
generate v1alpha4 manifests
1 parent 3986723 commit c804ad6

File tree

9 files changed

+10181
-7
lines changed

9 files changed

+10181
-7
lines changed

main.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,18 @@ func main() {
260260

261261
// +kubebuilder:scaffold:builder
262262

263-
if err := mgr.AddReadyzCheck("webhook", mgr.GetWebhookServer().StartedChecker()); err != nil {
264-
setupLog.Error(err, "unable to create ready check")
265-
os.Exit(1)
266-
}
263+
// skip checks when role=reconciler(no webhook port provided)
264+
// these checks are required only when role=webhook (webhook port > 0)
265+
if webhookPort > 0 {
266+
if err := mgr.AddReadyzCheck("webhook", mgr.GetWebhookServer().StartedChecker()); err != nil {
267+
setupLog.Error(err, "unable to create ready check")
268+
os.Exit(1)
269+
}
267270

268-
if err := mgr.AddHealthzCheck("webhook", mgr.GetWebhookServer().StartedChecker()); err != nil {
269-
setupLog.Error(err, "unable to create health check")
270-
os.Exit(1)
271+
if err := mgr.AddHealthzCheck("webhook", mgr.GetWebhookServer().StartedChecker()); err != nil {
272+
setupLog.Error(err, "unable to create health check")
273+
os.Exit(1)
274+
}
271275
}
272276

273277
setupLog.Info("starting manager", "version", version.Get().String())

spectro/base/kustomization.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
namePrefix: capa-
2+
namespace: capa-system
3+
4+
commonLabels:
5+
cluster.x-k8s.io/provider: "infrastructure-aws"
6+
7+
resources:
8+
- ../../config/default/credentials.yaml
9+
10+
bases:
11+
- ../../config/rbac
12+
- ../../config/manager
13+
14+
patchesStrategicMerge:
15+
- ../../config/default/manager_credentials_patch.yaml
16+
- ../../config/default/manager_service_account_patch.yaml
17+
- ../../config/default/manager_iam_patch.yaml
18+
- ../../config/default/manager_pull_policy.yaml
19+
- ../../config/default/manager_image_patch.yaml
20+
21+
configurations:
22+
- ../../config/default/kustomizeconfig.yaml
23+
24+
patchesJson6902:
25+
- target:
26+
group: apps
27+
kind: Deployment
28+
name: controller-manager
29+
namespace: system
30+
version: v1
31+
path: patch_service_account.yaml
32+
- target:
33+
group: apps
34+
kind: Deployment
35+
name: controller-manager
36+
namespace: system
37+
version: v1
38+
path: patch_healthcheck.yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- op: remove
2+
path: "/spec/template/spec/containers/0/ports"
3+
- op: remove
4+
path: "/spec/template/spec/containers/0/livenessProbe"
5+
- op: remove
6+
path: "/spec/template/spec/containers/0/readinessProbe"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- op: remove
2+
path: "/spec/template/spec/serviceAccountName"

0 commit comments

Comments
 (0)