-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add recommended app.kubernetes.io/name label to everything With these changes we prevent services selecting pods by other operators, because they all have the control-plane: controller-manager label by default. Because deployment updates with modified labels fail, also rename the deployment by modifying the namePrefix (causes bundle file renames as well). - Add test that validate retrieval of operator controller pod by the label.
- Loading branch information
Shai Levi
committed
Jan 15, 2025
1 parent
52d10cf
commit 3a3fa91
Showing
8 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
bundle/manifests/node-maintenance-controller-manager-metrics-service_v1_service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/name: node-maintenance-operator | ||
control-plane: controller-manager | ||
node-maintenance-operator: "" | ||
name: node-maintenance-controller-manager-metrics-service | ||
spec: | ||
ports: | ||
- name: https | ||
port: 8443 | ||
protocol: TCP | ||
targetPort: https | ||
selector: | ||
app.kubernetes.io/name: node-maintenance-operator | ||
control-plane: controller-manager | ||
node-maintenance-operator: "" | ||
status: | ||
loadBalancer: {} |
13 changes: 13 additions & 0 deletions
13
...e/manifests/node-maintenance-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/name: node-maintenance-operator | ||
node-maintenance-operator: "" | ||
name: node-maintenance-metrics-reader | ||
rules: | ||
- nonResourceURLs: | ||
- /metrics | ||
verbs: | ||
- get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
bundle/manifests/node-maintenance-webhook-service_v1_service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/name: node-maintenance-operator | ||
node-maintenance-operator: "" | ||
name: node-maintenance-webhook-service | ||
spec: | ||
ports: | ||
- port: 443 | ||
protocol: TCP | ||
targetPort: 9443 | ||
selector: | ||
app.kubernetes.io/name: node-maintenance-operator | ||
control-plane: controller-manager | ||
node-maintenance-operator: "" | ||
status: | ||
loadBalancer: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters