Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uniquely identifying labels selector for the operator deployment #119

Merged
merged 2 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ namespace: openshift-operators
namePrefix: codeflare-operator-

# Labels to add to all resources and selectors.
# commonLabels:
# someName: someValue
commonLabels:
app.kubernetes.io/name: codeflare-operator
app.kubernetes.io/part-of: codeflare

bases:
- ../crd
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: manager
namespace: system
spec:
template:
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_config_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: manager
namespace: system
spec:
template:
Expand Down
12 changes: 5 additions & 7 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: system
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: manager
namespace: system
labels:
control-plane: controller-manager
spec:
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/name: codeflare-operator
app.kubernetes.io/part-of: codeflare
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
app.kubernetes.io/name: codeflare-operator
app.kubernetes.io/part-of: codeflare
spec:
securityContext:
runAsNonRoot: true
Expand Down
7 changes: 3 additions & 4 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
name: controller-manager-metrics-monitor
name: manager-metrics
namespace: system
spec:
endpoints:
Expand All @@ -16,4 +14,5 @@ spec:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/name: codeflare-operator
app.kubernetes.io/part-of: codeflare
7 changes: 3 additions & 4 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
name: controller-manager-metrics-service
name: manager-metrics
namespace: system
spec:
ports:
Expand All @@ -12,4 +10,5 @@ spec:
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
app.kubernetes.io/name: codeflare-operator
app.kubernetes.io/part-of: codeflare