Skip to content

Commit f6a9b8a

Browse files
Fixed bundle generation issues (#2857)
1 parent 5d69fdd commit f6a9b8a

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ bundle: prepare-dirs $(CSV_FILE) release
784784

785785
@echo "Building release bundle for version $(VERSION)..."; \
786786
$(KUSTOMIZE) build --load-restrictor LoadRestrictionsNone $(CONFIG_MANIFESTS) | \
787-
$(OPERATOR_SDK) generate bundle -q --overwrite --version "$(VERSION)" --default-channel="stable" --channels="stable";
787+
$(OPERATOR_SDK) generate bundle -q --overwrite --version "$(VERSION)" --kustomize-dir="$(CONFIG_MANIFESTS_TPL)" --default-channel="stable" --channels="stable";
788788

789789
@echo "Patching CSV with replaces: $(CURRENT_VERSION)"; \
790790
$(AWK) '!/replaces:/' $(CSV_FILE) > $(CSV_FILE).tmp && mv $(CSV_FILE).tmp $(CSV_FILE); \

config/rbac/clusterwide/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ resources:
44
- ../service_account.yaml
55
- ../leader_election_role.yaml
66
- ../leader_election_role_binding.yaml
7+
- ../metrics_service.yaml
8+
- ../metrics_reader_role.yaml
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
name: metrics-reader
5+
rules:
6+
- nonResourceURLs:
7+
- /metrics
8+
verbs:
9+
- get

config/rbac/metrics_service.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
control-plane: controller-manager
6+
name: controller-manager-metrics-service
7+
namespace: system
8+
spec:
9+
ports:
10+
- name: https
11+
port: 8443
12+
protocol: TCP
13+
targetPort: https
14+
selector:
15+
control-plane: controller-manager

config/rbac/namespaced/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ resources:
44
- ../service_account.yaml
55
- ../leader_election_role.yaml
66
- ../leader_election_role_binding.yaml
7+
- ../metrics_service.yaml
8+
- ../metrics_reader_role.yaml

0 commit comments

Comments
 (0)