Skip to content

Commit

Permalink
Merge pull request #3 from zdtsw-forking/feat/labels1
Browse files Browse the repository at this point in the history
Rename prefix and set clear label on resource
  • Loading branch information
zdtsw authored Jul 29, 2023
2 parents 33d6bc4 + a60ab80 commit 7931847
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: Service
metadata:
creationTimestamp: null
labels:
control-plane: controller-manager
name: redhat-ods-operator-controller-manager-metrics-service
app.kubernetes.io/part-of: rhods-operator
name: redhat-ods-operator-metrics-service
spec:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
app.kubernetes.io/part-of: rhods-operator
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ data:
# leaderElectionReleaseOnCancel: true
kind: ConfigMap
metadata:
name: redhat-ods-operator-manager-config
name: redhat-ods-operator
18 changes: 11 additions & 7 deletions bundle/manifests/rhods-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,23 +392,27 @@ spec:
- subjectaccessreviews
verbs:
- create
serviceAccountName: redhat-ods-operator-controller-manager
serviceAccountName: redhat-ods-controller-manager
deployments:
- label:
control-plane: controller-manager
name: redhat-ods-operator-controller-manager
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: rhods-operator
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/name: deployment
app.kubernetes.io/part-of: rhods-operator
name: redhat-ods-rhods-operator
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/part-of: rhods-operator
strategy: {}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
app.kubernetes.io/part-of: rhods-operator
spec:
containers:
- args:
Expand Down Expand Up @@ -446,7 +450,7 @@ spec:
- ALL
securityContext:
runAsNonRoot: true
serviceAccountName: redhat-ods-operator-controller-manager
serviceAccountName: redhat-ods-controller-manager
terminationGracePeriodSeconds: 10
permissions:
- rules:
Expand Down Expand Up @@ -481,7 +485,7 @@ spec:
verbs:
- create
- patch
serviceAccountName: redhat-ods-operator-controller-manager
serviceAccountName: redhat-ods-controller-manager
strategy: deployment
installModes:
- supported: false
Expand Down
4 changes: 2 additions & 2 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace: redhat-ods-operator
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: redhat-ods-operator-
# field above. e.g redhat-ods-rhods-operator is the deployment's name
namePrefix: redhat-ods-

# Labels to add to all resources and selectors.
#labels:
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: rhods-operator
namespace: system
spec:
template:
Expand Down
4 changes: 2 additions & 2 deletions 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: rhods-operator #this is for v1 upgrade reason to keep same name
namespace: system
spec:
template:
Expand All @@ -17,4 +17,4 @@ spec:
volumes:
- name: manager-config
configMap:
name: manager-config
name: redhat-ods-operator
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ generatorOptions:
configMapGenerator:
- files:
- controller_manager_config.yaml
name: manager-config
name: operator
14 changes: 9 additions & 5 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,31 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
control-plane: rhods-operator
name: system
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: rhods-operator #this is for v1 upgrade reason to keep same name
namespace: system
labels:
control-plane: controller-manager
app.kubernetes.io/name: deployment
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: rhods-operator
app.kubernetes.io/part-of: rhods-operator
spec:
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/part-of: rhods-operator
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
app.kubernetes.io/part-of: rhods-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
app.kubernetes.io/part-of: rhods-operator
name: controller-manager-metrics-monitor
namespace: system
spec:
Expand All @@ -17,4 +17,4 @@ spec:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/part-of: rhods-operator
2 changes: 1 addition & 1 deletion config/rbac/auth_proxy_client_clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: metrics-reader
name: operator-metrics-reader
rules:
- nonResourceURLs:
- "/metrics"
Expand Down
6 changes: 3 additions & 3 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
name: controller-manager-metrics-service
app.kubernetes.io/part-of: rhods-operator
name: operator-metrics-service
namespace: system
spec:
ports:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
targetPort: https
selector:
control-plane: controller-manager
app.kubernetes.io/part-of: rhods-operator
2 changes: 1 addition & 1 deletion docs/Dev-Preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
sourceType: grpc
image: quay.io/opendatahub/opendatahub-operator-catalog:$RELEASE_TAG
displayName: Open Data Hub Operator (Preview)
publisher: ODH
publisher: RHODS
EOF
```

Expand Down

0 comments on commit 7931847

Please sign in to comment.