Skip to content

Commit

Permalink
fix: name in CSV + serviceaccountt + role/binding name
Browse files Browse the repository at this point in the history
Signed-off-by: Wen Zhou <[email protected]>
  • Loading branch information
zdtsw committed Nov 1, 2024
1 parent f3f0ce4 commit daefa0c
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 50 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ endef

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=controller-manager-role crd:ignoreUnexportedFields=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=rhods-operator-role crd:ignoreUnexportedFields=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(call fetch-external-crds,github.com/openshift/api,route/v1)
$(call fetch-external-crds,github.com/openshift/api,user/v1)

Expand Down Expand Up @@ -287,8 +287,7 @@ bundle: prepare operator-sdk ## Generate bundle manifests and metadata, then val
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
$(OPERATOR_SDK) bundle validate ./$(BUNDLE_DIR)
mv bundle.Dockerfile Dockerfiles/
rm -f bundle/manifests/redhat-ods-operator-webhook-service_v1_service.yaml

rm -f bundle/manifests/webhook-service_v1_service.yaml bundle/manifests/controller-manager-metrics-service_v1_service.yaml
.PHONY: bundle-build
bundle-build: bundle
$(IMAGE_BUILDER) build --no-cache -f Dockerfiles/bundle.Dockerfile -t $(BUNDLE_IMG) .
Expand Down

This file was deleted.

25 changes: 15 additions & 10 deletions bundle/manifests/rhods-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ metadata:
categories: AI/Machine Learning, Big Data
certified: "False"
containerImage: REPLACE_IMAGE:latest
createdAt: "2024-10-28T09:05:34Z"
createdAt: "2024-11-01T16:20:53Z"
description: Operator for deployment and management of Red Hat OpenShift AI
features.operators.openshift.io/disconnected: "true"
features.operators.openshift.io/fips-compliant: "false"
Expand Down Expand Up @@ -1137,20 +1137,20 @@ spec:
serviceAccountName: redhat-ods-operator-controller-manager
deployments:
- label:
control-plane: controller-manager
name: redhat-ods-operator-controller-manager
name: rhods-operator
name: rhods-operator
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
name: rhods-operator
strategy: {}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
kubectl.kubernetes.io/default-container: rhods-operator
labels:
control-plane: controller-manager
name: rhods-operator
spec:
containers:
- args:
Expand All @@ -1162,25 +1162,30 @@ spec:
env:
- name: DISABLE_DSC_CONFIG
value: "false"
- name: OPERATOR_NAME
value: rhods-operator
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: DEFAULT_MANIFESTS_PATH
value: /opt/manifests
image: quay.io/wenzhou/rhods-operator:2.16.0
image: REPLACE_IMAGE:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: manager
name: rhods-operator
ports:
- containerPort: 9443
name: webhook-server
protocol: TCP
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
Expand Down Expand Up @@ -1263,7 +1268,7 @@ spec:
- admissionReviewVersions:
- v1
containerPort: 443
deploymentName: redhat-ods-operator-controller-manager
deploymentName: rhods-operator
failurePolicy: Fail
generateName: mutate.operator.opendatahub.io
rules:
Expand All @@ -1283,7 +1288,7 @@ spec:
- admissionReviewVersions:
- v1
containerPort: 443
deploymentName: redhat-ods-operator-controller-manager
deploymentName: rhods-operator
failurePolicy: Fail
generateName: operator.opendatahub.io
rules:
Expand Down
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace: redhat-ods-operator
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: redhat-ods-operator-
#namePrefix: redhat-ods-operator-

# Labels to add to all resources and selectors.
#labels:
Expand Down
4 changes: 2 additions & 2 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: rhods-operator
namespace: system
spec:
template:
spec:
containers:
- name: manager
- name: rhods-operator
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=0.0.0.0:8080"
Expand Down
7 changes: 5 additions & 2 deletions config/default/manager_webhook_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: rhods-operator
namespace: system
spec:
template:
spec:
containers:
- name: manager
- name: rhods-operator
ports:
- containerPort: 9443
name: webhook-server
protocol: TCP
- containerPort: 8080
name: http
protocol: TCP
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
Expand Down
18 changes: 10 additions & 8 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ metadata:
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: rhods-operator
namespace: system
labels:
control-plane: controller-manager
name: rhods-operator
spec:
selector:
matchLabels:
control-plane: controller-manager
name: rhods-operator
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
kubectl.kubernetes.io/default-container: rhods-operator
labels:
control-plane: controller-manager
name: rhods-operator
spec:
securityContext:
runAsNonRoot: true
Expand All @@ -34,11 +34,14 @@ spec:
# seccompProfile:
# type: RuntimeDefault
containers:
- command:
- name: rhods-operator
command:
- /manager
env:
- name: DISABLE_DSC_CONFIG
value: 'false'
- name: OPERATOR_NAME
value: rhods-operator
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:
Expand All @@ -49,7 +52,6 @@ spec:
# value: SelfManagedRHOAI
image: controller:latest
imagePullPolicy: Always
name: manager
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand All @@ -76,5 +78,5 @@ spec:
requests:
cpu: 500m
memory: 256Mi
serviceAccountName: controller-manager
serviceAccountName: redhat-ods-operator-controller-manager
terminationGracePeriodSeconds: 10
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: redhat-ods-operator-metrics-reader
rules:
- nonResourceURLs:
- "/metrics"
Expand Down
2 changes: 1 addition & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: controller-manager-role
name: rhods-operator-role
rules:
- apiGroups:
- '*'
Expand Down
8 changes: 5 additions & 3 deletions config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: controller-manager-rolebinding
# name: controller-manager-rolebinding
name: rhods-operator-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: controller-manager-role
# name: controller-manager-role
name: rhods-operator-role
subjects:
- kind: ServiceAccount
name: controller-manager
name: redhat-ods-operator-controller-manager
namespace: system
2 changes: 1 addition & 1 deletion config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: controller-manager
name: redhat-ods-operator-controller-manager
namespace: system
2 changes: 1 addition & 1 deletion config/webhook/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ spec:
protocol: TCP
targetPort: 9443
selector:
control-plane: controller-manager
name: rhods-operator

0 comments on commit daefa0c

Please sign in to comment.