Skip to content

Commit

Permalink
Fix #366 - Add custom label to manifests to avoid clashing with insta…
Browse files Browse the repository at this point in the history
…lled operators in a cluster (#373)

Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini authored Feb 2, 2024
1 parent 47c73db commit d7c8c0b
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Deploy operator
run: |
make deploy IMG=${{ env.OPERATOR_IMAGE_NAME }}
kubectl wait pod -A -l control-plane=controller-manager --for condition=Ready
kubectl wait pod -A -l control-plane=sonataflow-operator --for condition=Ready
- name: Run tests
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
creationTimestamp: null
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: logic-operator-rhel8-controller-manager-metrics-service
spec:
ports:
Expand All @@ -12,6 +12,6 @@ spec:
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
control-plane: sonataflow-operator
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
Expand Up @@ -510,20 +510,20 @@ spec:
serviceAccountName: logic-operator-rhel8-controller-manager
deployments:
- label:
control-plane: controller-manager
control-plane: sonataflow-operator
name: logic-operator-rhel8-controller-manager
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
control-plane: sonataflow-operator
strategy: {}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
spec:
containers:
- args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
creationTimestamp: null
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: sonataflow-operator-controller-manager-metrics-service
spec:
ports:
Expand All @@ -12,6 +12,6 @@ spec:
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
control-plane: sonataflow-operator
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
Expand Up @@ -651,20 +651,20 @@ spec:
serviceAccountName: sonataflow-operator-controller-manager
deployments:
- label:
control-plane: controller-manager
control-plane: sonataflow-operator
name: sonataflow-operator-controller-manager
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
control-plane: sonataflow-operator
strategy: {}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
spec:
containers:
- args:
Expand Down
8 changes: 4 additions & 4 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: system
---
apiVersion: apps/v1
Expand All @@ -11,18 +11,18 @@ metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
spec:
selector:
matchLabels:
control-plane: controller-manager
control-plane: sonataflow-operator
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
spec:
securityContext:
runAsNonRoot: true
Expand Down
8 changes: 4 additions & 4 deletions config/manager/osl/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: system
---
apiVersion: apps/v1
Expand All @@ -11,18 +11,18 @@ metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
spec:
selector:
matchLabels:
control-plane: controller-manager
control-plane: sonataflow-operator
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
spec:
securityContext:
runAsNonRoot: true
Expand Down
4 changes: 2 additions & 2 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: controller-manager-metrics-monitor
namespace: system
spec:
Expand All @@ -17,4 +17,4 @@ spec:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: controller-manager
control-plane: sonataflow-operator
4 changes: 2 additions & 2 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: controller-manager-metrics-service
namespace: system
spec:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
control-plane: sonataflow-operator
12 changes: 6 additions & 6 deletions operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: sonataflow-operator-system
---
apiVersion: apiextensions.k8s.io/v1
Expand Down Expand Up @@ -26735,7 +26735,7 @@ apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: sonataflow-operator-controller-manager-metrics-service
namespace: sonataflow-operator-system
spec:
Expand All @@ -26745,26 +26745,26 @@ spec:
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
control-plane: sonataflow-operator
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
name: sonataflow-operator-controller-manager
namespace: sonataflow-operator-system
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
control-plane: sonataflow-operator
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
control-plane: sonataflow-operator
spec:
containers:
- args:
Expand Down
2 changes: 1 addition & 1 deletion testbdd/steps/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (data *Data) sonataFlowOperatorIsDeployed() (err error) {
}

//func (data *Data) sonataFlowOperatorHasPodsRunning(numberOfPods int, name, phase string) error {
// return framework.WaitForPodsWithLabel(data.Namespace, "control-plane", "controller-manager", numberOfPods, 1)
// return framework.WaitForPodsWithLabel(data.Namespace, "control-plane", "sonataflow-operator", numberOfPods, 1)
//}
//
//func (data *Data) kogitoOperatorShouldBeInstalled() error {
Expand Down

0 comments on commit d7c8c0b

Please sign in to comment.