Skip to content

Commit e21347b

Browse files
committed
Support one script operator deployment
1 parent 8869826 commit e21347b

File tree

13 files changed

+1155
-12
lines changed

13 files changed

+1155
-12
lines changed

operator/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,6 @@ generate-helm:
242242
generate-hack-helm-patch:
243243
kubebuilder edit --plugins=helm/v1-alpha --force
244244
git diff --no-index dist deploy > hack/helm.patch || true
245+
246+
generate-deploy-yaml:
247+
helm template functionstream ./deploy/chart --set pulsar.standalone.enable=true --set createNamespace=true --namespace function-stream --create-namespace > ./scripts/deploy.yaml

operator/deploy/chart/templates/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: operator-controller-manager
4+
name: function-stream
55
namespace: {{ .Release.Namespace }}
66
labels:
77
{{- include "chart.labels" . | nindent 4 }}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{{- if .Values.createNamespace }}
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: {{ .Release.Namespace }}
6+
{{- end -}}

operator/deploy/chart/templates/prometheus/monitor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ kind: ServiceMonitor
55
metadata:
66
labels:
77
{{- include "chart.labels" . | nindent 4 }}
8-
name: operator-controller-manager-metrics-monitor
8+
name: fs-operator-controller-manager-metrics-monitor
99
namespace: {{ .Release.Namespace }}
1010
spec:
1111
endpoints:

operator/deploy/chart/templates/rbac/leader_election_role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
labels:
77
{{- include "chart.labels" . | nindent 4 }}
88
namespace: {{ .Release.Namespace }}
9-
name: operator-leader-election-role
9+
name: fs-operator-leader-election-role
1010
rules:
1111
- apiGroups:
1212
- ""

operator/deploy/chart/templates/rbac/leader_election_role_binding.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
77
namespace: {{ .Release.Namespace }}
8-
name: operator-leader-election-rolebinding
8+
name: {{ .Release.Name }}-fs-operator-leader-election-rolebinding
99
roleRef:
1010
apiGroup: rbac.authorization.k8s.io
1111
kind: Role
12-
name: operator-leader-election-role
12+
name: fs-operator-leader-election-role
1313
subjects:
1414
- kind: ServiceAccount
1515
name: {{ .Values.controllerManager.serviceAccountName }}

operator/deploy/chart/templates/rbac/metrics_auth_role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: ClusterRole
44
metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
7-
name: {{ .Release.Name }}-operator-metrics-auth-role
7+
name: fs-operator-metrics-auth-role
88
rules:
99
- apiGroups:
1010
- authentication.k8s.io

operator/deploy/chart/templates/rbac/metrics_auth_role_binding.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ kind: ClusterRoleBinding
44
metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
7-
name: {{ .Release.Name }}-operator-metrics-auth-rolebinding
7+
name: {{ .Release.Name }}-fs-operator-metrics-auth-rolebinding
88
roleRef:
99
apiGroup: rbac.authorization.k8s.io
1010
kind: ClusterRole
11-
name: operator-metrics-auth-role
11+
name: fs-operator-metrics-auth-role
1212
subjects:
1313
- kind: ServiceAccount
1414
name: {{ .Values.controllerManager.serviceAccountName }}

operator/deploy/chart/templates/rbac/metrics_reader_role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: ClusterRole
44
metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
7-
name: {{ .Release.Name }}-operator-metrics-reader
7+
name: fs-operator-metrics-reader
88
rules:
99
- nonResourceURLs:
1010
- "/metrics"

operator/deploy/chart/templates/rbac/role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ kind: ClusterRole
55
metadata:
66
labels:
77
{{- include "chart.labels" . | nindent 4 }}
8-
name: functionstream-operator-manager-role
8+
name: fs-operator-manager-role
99
rules:
1010
- apiGroups:
1111
- apps

operator/deploy/chart/templates/rbac/role_binding.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ kind: ClusterRoleBinding
44
metadata:
55
labels:
66
{{- include "chart.labels" . | nindent 4 }}
7-
name: {{ .Release.Name }}-functionstream-operator-manager-rolebinding
7+
name: {{ .Release.Name }}-fs-operator-manager-rolebinding
88
roleRef:
99
apiGroup: rbac.authorization.k8s.io
1010
kind: ClusterRole
11-
name: functionstream-operator-manager-role
11+
name: fs-operator-manager-role
1212
subjects:
1313
- kind: ServiceAccount
1414
name: {{ .Values.controllerManager.serviceAccountName }}

operator/deploy/chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ controllerManager:
4141
terminationGracePeriodSeconds: 10
4242
serviceAccountName: functionstream-operator
4343

44+
createNamespace: false
45+
4446
# [RBAC]: To enable RBAC (Permissions) configurations
4547
rbac:
4648
enable: true

0 commit comments

Comments
 (0)