Skip to content

Commit b65b4e0

Browse files
ybettank8s-ci-robot
authored andcommitted
Renaming the webhook deployment from webhook-server to webhook.
* When we generate files with `controller-gen` it generates a service called `webhook-service` and it is not configurable. * When we deploy KMM with OLM, OLM deploys a service for the webhook called `<webhook-deployment-name>-service. Therefore, before this change, we were getting 2 services for the same deployment. One generated by `controller-gen` and added to the bundle manifests and the other one created "on the fly" by OLM. This change will make OLM find an already existing service called `webhook-service` in the cluster because the deployment is called `webhook`, therefore, it won't create a second service as before. Services in KMM's namespace before the changes: ``` kmm-operator-controller-metrics-service ClusterIP 10.129.169.25 <none> 8443/TCP 2d2h kmm-operator-webhook-server-service ClusterIP 10.130.107.158 <none> 443/TCP 2d2h kmm-operator-webhook-service ClusterIP 10.128.244.171 <none> 443/TCP 2d2h ``` Services in KMM's namespace after the changes: ``` kmm-operator-controller-metrics-service ClusterIP 10.99.75.82 <none> 8443/TCP 88m kmm-operator-webhook-service ClusterIP 10.105.163.241 <none> 443/TCP 88m ``` Signed-off-by: Yoni Bettan <[email protected]>
1 parent 8accf3d commit b65b4e0

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

ci/install-ci-hub/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ patches:
3232
apiVersion: apps/v1
3333
kind: Deployment
3434
metadata:
35-
name: webhook-server
35+
name: webhook
3636
namespace: system
3737
spec:
3838
template:

ci/install-ci/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ patches:
3535
apiVersion: apps/v1
3636
kind: Deployment
3737
metadata:
38-
name: webhook-server
38+
name: webhook
3939
namespace: system
4040
spec:
4141
template:

ci/prow/e2e-hub-spoke-incluster-build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ make deploy deploy-hub
5151

5252
kubectl wait --for=condition=Available -n ${OPERATOR_NAMESPACE} \
5353
deployment/kmm-operator-hub-controller \
54-
deployment/kmm-operator-hub-webhook-server \
54+
deployment/kmm-operator-hub-webhook \
5555
deployment/kmm-operator-controller \
56-
deployment/kmm-operator-webhook-server \
56+
deployment/kmm-operator-webhook \
5757

5858
# Make the ManagedCluster selected by the ManagedClusterModule
5959
kubectl label managedcluster minikube name=minikube

ci/prow/e2e-incluster-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ kubectl apply -f ci/kmm-kmod-dockerfile.yaml
3333
echo "Add Secrets containing the signing key and certificate..."
3434
kubectl apply -f ci/secret_kmm-kmod-signing.yaml
3535

36-
kubectl wait --for=condition=Available deployment/kmm-operator-controller deployment/kmm-operator-webhook-server -n kmm-operator-system
36+
kubectl wait --for=condition=Available deployment/kmm-operator-controller deployment/kmm-operator-webhook -n kmm-operator-system
3737

3838
echo "Add an kmm-ci Module that contains a valid mapping..."
3939
kubectl apply -f ci/module-kmm-ci-build-sign.yaml

ci/prow/operator-upgrade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ make bundle bundle-build bundle-push \
4747
--timeout 5m0s
4848
kubectl wait --for=condition=Available -n operators --timeout=1m \
4949
deployment/kmm-operator-controller \
50-
deployment/kmm-operator-webhook-server
50+
deployment/kmm-operator-webhook
5151

config/deploy-hub/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resources:
1515
patches:
1616
- target:
1717
kind: Deployment
18-
name: webhook-server
18+
name: webhook
1919
patch: |-
2020
- op: add
2121
path: /spec/template/spec/containers/0/args/-

config/deploy/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resources:
1515
patches:
1616
- target:
1717
kind: Deployment
18-
name: webhook-server
18+
name: webhook
1919
patch: |-
2020
- op: add
2121
path: /spec/template/spec/containers/0/args/-

config/webhook-cert/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ patches:
1212
apiVersion: apps/v1
1313
kind: Deployment
1414
metadata:
15-
name: webhook-server
15+
name: webhook
1616
namespace: system
1717
spec:
1818
template:

config/webhook-server/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
5-
name: webhook-server
5+
name: webhook
66
namespace: system
77
labels:
88
control-plane: webhook-server

docs/mkdocs/documentation/troubleshooting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ In the commands below, the value of `$namespace` depends on your [installation m
1515

1616
| Component | Command |
1717
|-----------|-----------------------------------------------------------------------------|
18-
| KMM | `kubectl logs -fn "$namespace" deployments/kmm-operator-webhook-server` |
19-
| KMM-Hub | `kubectl logs -fn "$namespace" deployments/kmm-operator-hub-webhook-server` |
18+
| KMM | `kubectl logs -fn "$namespace" deployments/kmm-operator-webhook` |
19+
| KMM-Hub | `kubectl logs -fn "$namespace" deployments/kmm-operator-hub-webhook` |
2020

2121
## Observing events
2222

0 commit comments

Comments
 (0)