Skip to content

Commit

Permalink
feat: del scrap code
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <[email protected]>
  • Loading branch information
zzzhangqi committed Sep 25, 2024
1 parent 9421506 commit d0e456c
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 600 deletions.
28 changes: 0 additions & 28 deletions templates/cluster-role-binding.yaml

This file was deleted.

16 changes: 3 additions & 13 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#
#############################################

{{- if .Values.operator }}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -49,22 +48,14 @@ spec:
- /manager
args:
- --leader-elect
- --zap-log-level={{ .Values.operator.logLevel }}
- --zap-log-level=4
env:
- name: SERVICE_ACCOUNT_NAME
value: {{ .Values.serviceAccount.name }}
- name: RBD_NAMESPACE
value: {{ .Release.Namespace }}
{{- range .Values.operator.env }}
- name: {{ .name }}
value: "{{ .value }}"
{{- end }}
{{- if .Values.Cluster.enableEnvCheck }}
- name: CHECK_PORT_OCCUPIED
value: "{{ .Values.Cluster.enableEnvCheck }}"
{{- end }}
image: {{ .Values.operator.image.name }}:{{ .Values.operator.image.tag }}
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
image: {{ .Values.Cluster.rainbondImageRepository }}/rainbond-operator:{{ .Values.Cluster.installVersion }}
imagePullPolicy: {{ .Values.Cluster.imagePullPolicy }}
name: {{ .Values.operator.name }}
securityContext:
allowPrivilegeEscalation: false
Expand Down Expand Up @@ -95,4 +86,3 @@ spec:
name: rundir
{{- end }}
terminationGracePeriodSeconds: 10
{{- end }}
36 changes: 0 additions & 36 deletions templates/leader_election_role.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions templates/leader_election_role_binding.yaml

This file was deleted.

49 changes: 4 additions & 45 deletions templates/rainbondcluster_helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,15 @@ items:
name: rainbondcluster
namespace: {{ .Release.Namespace }}
spec:
enableHA: {{ .Values.Cluster.enableHA }}
configCompleted: true
{{- if .Values.Cluster.gatewayIngressIPs }}
gatewayIngressIPs:
- {{ .Values.Cluster.gatewayIngressIPs }}
{{- else }}
{{ end }}
{{ toYaml .Values.Cluster.gatewayIngressIPs | indent 4 }}
{{- if .Values.Cluster.imageHub.enable }}
imageHub:
domain: {{ .Values.Cluster.imageHub.domain | quote }}
password: {{ .Values.Cluster.imageHub.password | quote }}
username: {{ .Values.Cluster.imageHub.username | quote }}
namespace: {{ .Values.Cluster.imageHub.namespace | quote }}
{{- end }}
{{- if .Values.Cluster.RWO.enable }}
rainbondVolumeSpecRWO:
storageClassName: {{ .Values.Cluster.RWO.storageClassName | quote }}
imageRepository: {{ .Values.Cluster.rainbondImageRepository }}
{{- end }}
{{- if .Values.Cluster.RWX.enable }}
rainbondVolumeSpecRWX:
{{- if eq .Values.Cluster.RWX.type "aliyun" }}
storageClassParameters:
mountOptions:
- "nolock,tcp,noresvport"
- "vers=4"
- "minorversion=0"
- "rsize=1048576"
- "wsize=1048576"
- "timeo=600"
- "retrans=2"
- "hard"
parameters:
volumeAs: subpath
archiveOnDelete: "true"
server: {{ .Values.Cluster.RWX.config.server }}
provisioner: nasplugin.csi.alibabacloud.com
{{- else }}
storageClassName: {{ .Values.Cluster.RWX.config.storageClassName | quote }}
{{- end }}
imageRepository: {{ .Values.Cluster.rainbondImageRepository }}
{{- end }}
{{- if .Values.Cluster.regionDatabase.enable }}
regionDatabase:
host: {{ required ".Values.Cluster.regionDatabase.host cannot be empty!" .Values.Cluster.regionDatabase.host }}
Expand All @@ -73,20 +40,12 @@ items:
port: {{ .Values.Cluster.uiDatabase.port }}
username: {{ .Values.Cluster.uiDatabase.username | quote }}
{{- end }}
suffixHTTPHost: ""
installMode: WithoutPackage
installVersion: {{ .Values.Cluster.installVersion }}
{{- if .Values.Cluster.nodesForChaos }}
nodesForChaos:
{{ .Values.Cluster.nodesForChaos | toYaml | indent 4 }}
{{- else }}
{{ end }}
{{- if .Values.Cluster.nodesForGateway }}
{{ toYaml .Values.Cluster.nodesForChaos | indent 4 }}
nodesForGateway:
{{ .Values.Cluster.nodesForGateway | toYaml | indent 4 }}
{{- else }}
{{ end }}
{{ toYaml .Values.Cluster.nodesForGateway | indent 4 }}
rainbondImageRepository: {{ .Values.Cluster.rainbondImageRepository }}
installVersion: {{ .Values.Cluster.installVersion }}

kind: List
metadata:
Expand Down
77 changes: 77 additions & 0 deletions templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#############################################
#
# Copyright 2023 Goodrain Co., Ltd.
#
# This version of the GNU Lesser General Public License incorporates
# the terms and conditions of version 3 of the GNU General Public License.
#
#############################################

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
name: {{ .Values.serviceAccount.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Values.serviceAccount.name }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
name: {{ .Values.serviceAccount.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: leader-election-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: leader-election-role
subjects:
- kind: ServiceAccount
name: default
namespace: system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: leader-election-role
rules:
- apiGroups:
- ""
- coordination.k8s.io
resources:
- configmaps
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
Loading

0 comments on commit d0e456c

Please sign in to comment.