Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rm3l committed Jan 7, 2025
1 parent 14d687e commit a92a26c
Show file tree
Hide file tree
Showing 35 changed files with 63 additions and 198 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
$(KUSTOMIZE) build config/manifests/$(PROFILE) | $(OPERATOR_SDK) generate bundle --kustomize-dir config/manifests/$(PROFILE) $(BUNDLE_GEN_FLAGS)
$(OPERATOR_SDK) bundle validate ./bundle/$(PROFILE)
@mv -f bundle.Dockerfile ./bundle/$(PROFILE)/bundle.Dockerfile
@sed -i 's/-controller-manager/-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml
@sed -i 's/: controller-manager/: $(PROFILE_SHORT)-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml
@sed -i 's/backstage-operator/$(PROFILE_SHORT)-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml
@sed -i 's/backstage-operator/$(BUNDLE_METADATA_PACKAGE_NAME)/g' ./bundle/$(PROFILE)/metadata/annotations.yaml
# @sed -i 's/-controller-manager/-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml
# @sed -i 's/: controller-manager/: $(PROFILE_SHORT)-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml
# @sed -i 's/backstage-operator/$(PROFILE_SHORT)-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml
# @sed -i 's/backstage-operator/$(BUNDLE_METADATA_PACKAGE_NAME)/g' ./bundle/$(PROFILE)/metadata/annotations.yaml
@sed -i 's/backstage-operator/$(BUNDLE_METADATA_PACKAGE_NAME)/g' ./bundle/$(PROFILE)/bundle.Dockerfile

## to update the CSV with a new tagged version of the operator:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ kind: Service
metadata:
creationTimestamp: null
labels:
app: backstage-operator
app: operator
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: backstage-operator
app.kubernetes.io/instance: backstage-operator-metrics-service
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: service
app.kubernetes.io/part-of: backstage-operator
Expand All @@ -18,6 +18,6 @@ spec:
protocol: TCP
targetPort: metrics
selector:
app: backstage-operator
app: operator
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ metadata:
}
}
]
createdAt: "2025-01-07T11:35:26Z"
createdAt: "2025-01-07T13:28:03Z"
description: Backstage Operator
operators.operatorframework.io/builder: operator-sdk-v1.37.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
Expand Down Expand Up @@ -168,21 +168,21 @@ spec:
serviceAccountName: backstage-operator
deployments:
- label:
app: backstage-operator
app: operator
name: backstage-operator
spec:
replicas: 1
selector:
matchLabels:
app: backstage-operator
app: operator
strategy:
type: RollingUpdate
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
app: backstage-operator
app: operator
spec:
affinity:
nodeAffinity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ metadata:
categories: Developer Tools
certified: "true"
containerImage: registry.redhat.io/rhdh/rhdh-rhel9-operator:1.5
createdAt: "2025-01-07T11:35:29Z"
createdAt: "2025-01-07T13:28:05Z"
description: Red Hat Developer Hub is a Red Hat supported version of Backstage.
It comes with pre-built plug-ins and configuration settings, supports use of
an external database, and can help streamline the process of setting up a self-managed
Expand All @@ -66,7 +66,7 @@ metadata:
support: Red Hat
labels:
operatorframework.io/arch.amd64: supported
name: rhdh-operator.v1.5.0
name: backstage-operator.v1.5.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -226,6 +226,8 @@ spec:
kubectl.kubernetes.io/default-container: manager
labels:
app: rhdh-operator
app.kubernetes.io/component: rhdh-operator
app.kubernetes.io/managed-by: olm
spec:
affinity:
nodeAffinity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: rhdh-operator
app.kubernetes.io/created-by: backstage-operator
app.kubernetes.io/instance: backstage-editor-role
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: rhdh-operator
app.kubernetes.io/part-of: backstage-operator
name: rhdh-backstage-editor-role
rules:
- apiGroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: rhdh-operator
app.kubernetes.io/created-by: backstage-operator
app.kubernetes.io/instance: backstage-viewer-role
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: rhdh-operator
app.kubernetes.io/part-of: backstage-operator
name: rhdh-backstage-viewer-role
rules:
- apiGroups:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
creationTimestamp: null
labels:
app.kubernetes.io/component: metrics-rbac
app.kubernetes.io/created-by: rhdh-operator
app.kubernetes.io/created-by: backstage-operator
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: rhdh-operator
app.kubernetes.io/part-of: backstage-operator
name: rhdh-metrics-reader
rules:
- nonResourceURLs:
Expand Down
2 changes: 1 addition & 1 deletion bundle/rhdh/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ annotations:
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: rhdh
operators.operatorframework.io.bundle.package.v1: backstage-operator
operators.operatorframework.io.bundle.channels.v1: fast,fast-${CI_X_VERSION}.${CI_Y_VERSION}
operators.operatorframework.io.bundle.channel.default.v1: fast
operators.operatorframework.io.metrics.builder: operator-sdk-v1.37.0
Expand Down
10 changes: 5 additions & 5 deletions config/manager/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: operator
labels:
app: backstage-controller-manager
app: operator
spec:
replicas: 1
selector:
matchLabels:
app: backstage-controller-manager
app: operator
strategy:
type: RollingUpdate
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
app: backstage-controller-manager
app: operator
spec:
# Required because the operator does not work without a Service Account Token
automountServiceAccountToken: true # NOSONAR
Expand Down Expand Up @@ -92,7 +92,7 @@ spec:
volumeMounts:
- mountPath: /default-config
name: default-config
serviceAccountName: controller-manager
serviceAccountName: operator
terminationGracePeriodSeconds: 10
volumes:
- name: default-config
Expand Down
2 changes: 1 addition & 1 deletion config/profile/backstage.io/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namePrefix: backstage-

resources:
- ../../crd
- ../../rbac/backstage.io
- ../../rbac
- ../../manager
- namespace.yaml

Expand Down
8 changes: 1 addition & 7 deletions config/profile/backstage.io/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,5 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: namespace
app.kubernetes.io/instance: system
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: backstage-operator
app.kubernetes.io/part-of: backstage-operator
app.kubernetes.io/managed-by: kustomize
app: operator
name: system
2 changes: 1 addition & 1 deletion config/profile/external/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namePrefix: backstage-

resources:
- ../../crd
- ../../rbac/external
- ../../rbac
- ../../manager

images:
Expand Down
7 changes: 3 additions & 4 deletions config/profile/rhdh/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namePrefix: rhdh-

resources:
- ../../crd
- ../../rbac/rhdh
- ../../rbac
- ../../manager
- namespace.yaml

Expand All @@ -23,11 +23,10 @@ images:
newTag: "1.5"

patches:
- path: patches/env-patch.yaml
- path: patches/deployment-patch.yaml
target:
kind: Deployment
name: controller-manager

name: operator

generatorOptions:
disableNameSuffixHash: true
Expand Down
8 changes: 1 addition & 7 deletions config/profile/rhdh/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,5 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: namespace
app.kubernetes.io/instance: system
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: backstage-operator
app.kubernetes.io/part-of: backstage-operator
app.kubernetes.io/managed-by: kustomize
app: operator
name: operator
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: controller-manager
name: operator
labels:
app: rhdh-operator
spec:
selector:
matchLabels:
app: rhdh-operator
template:
metadata:
labels:
app: rhdh-operator
app.kubernetes.io/component: rhdh-operator
app.kubernetes.io/managed-by: olm
spec:
containers:
- name: manager
Expand Down
8 changes: 3 additions & 5 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: backstage-operator
app.kubernetes.io/managed-by: kustomize
name: controller-manager-metrics-monitor
app: controller
name: operator-metrics-monitor
namespace: system
spec:
endpoints:
Expand All @@ -18,4 +16,4 @@ spec:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: controller-manager
app: operator
81 changes: 0 additions & 81 deletions config/rbac/_common/role.yaml

This file was deleted.

Loading

0 comments on commit a92a26c

Please sign in to comment.