From 29abca5207109c60312c8950e389d6d8d8168301 Mon Sep 17 00:00:00 2001 From: Radovan Synek Date: Tue, 12 Apr 2022 13:41:58 +0200 Subject: [PATCH] fix: make webpage sample work OOTB --- sample-operators/webpage/README.md | 3 +++ sample-operators/webpage/k8s/webpage.yaml | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sample-operators/webpage/README.md b/sample-operators/webpage/README.md index 8cc20a40f8..c591e712c3 100644 --- a/sample-operators/webpage/README.md +++ b/sample-operators/webpage/README.md @@ -46,6 +46,9 @@ page. Otherwise you can change the service to a LoadBalancer (e.g on a public cl You can also try to change the HTML code in `k8s/webpage.yaml` and do another `kubectl apply -f k8s/webpage.yaml`. This should update the actual NGINX deployment with the new configuration. +Note that there are multiple reconciler implementations that watch `WebPage` resources differentiated by a label. +When you create a new `WebPage` resource, make sure its label matches the active reconciler's label selector. + If you want the Operator to be running as a deployment in your cluster, follow the below steps. ### Build diff --git a/sample-operators/webpage/k8s/webpage.yaml b/sample-operators/webpage/k8s/webpage.yaml index e425b4750f..1aa41ff67a 100644 --- a/sample-operators/webpage/k8s/webpage.yaml +++ b/sample-operators/webpage/k8s/webpage.yaml @@ -1,8 +1,9 @@ apiVersion: "sample.javaoperatorsdk/v1" kind: WebPage metadata: - labels: - low-level: "true" +# Use labels to match the resource with different reconciler implementations: +# labels: +# low-level: "true" name: hellows spec: exposed: false