Skip to content

Commit

Permalink
fix: del some scrap code
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <smallqi1@163.com>
zzzhangqi committed Sep 25, 2024
1 parent 9421506 commit 4d531a6
Showing 9 changed files with 110 additions and 604 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
@@ -7,7 +7,6 @@
#
#############################################

{{- if .Values.operator }}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -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
@@ -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.

50 changes: 5 additions & 45 deletions templates/rainbondcluster_helm.yaml
Original file line number Diff line number Diff line change
@@ -15,48 +15,15 @@ items:
name: rainbondcluster
namespace: {{ .Release.Namespace }}
spec:
enableHA: {{ .Values.Cluster.enableHA }}
configCompleted: true
{{- if .Values.Cluster.gatewayIngressIPs }}
gatewayIngressIPs:
gatewayIngressIPs:
- {{ .Values.Cluster.gatewayIngressIPs }}
{{- else }}
{{ end }}
{{- 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 }}
@@ -73,20 +40,13 @@ 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 }}
suffixHTTPHost: ""

kind: List
metadata:
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
367 changes: 14 additions & 353 deletions templates/rbdcomponent_helm.yaml

Large diffs are not rendered by default.

23 changes: 0 additions & 23 deletions templates/service_account.yaml

This file was deleted.

96 changes: 11 additions & 85 deletions values.yaml
Original file line number Diff line number Diff line change
@@ -12,14 +12,8 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

## Install Default RBAC roles and bindings
rbac:
create: true
apiVersion: v1

## Service account name and whether to create it
## Specify service account name
serviceAccount:
create: true
name: rainbond-operator

# Use K3s Containerd
@@ -28,29 +22,11 @@ useK3sContainerd: false
# rainbondOperator
operator:
name: rainbond-operator
# operator environment variable, ref: https://www.rainbond.com/docs/ops-guide/management/change-ports
# env:
# - name: API_PORT
# value: "7443"
# - name: API_WS_PORT
# value: "6066"
image:
name: rainbond/rainbond-operator
tag: v6.0.0-release
pullPolicy: IfNotPresent
logLevel: 4

#############################################
# Rainbondcluster install Configuration
#############################################
Cluster:

# Enable the HA installation
enableHA: false

# Enable cluster environment detectio
enableEnvCheck: true

# Use an external image repository
imageHub:
enable: false
@@ -59,19 +35,6 @@ Cluster:
password: admin
username: admin

# External storage, fill storageClassName, ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config#%E9%85%8D%E7%BD%AE%E5%A4%96%E9%83%A8%E5%AD%98%E5%82%A8
RWX:
enable: false
type: none
config:
storageClassName: glusterfs-simple
server:

# External storage, fill storageClassName, ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config#%E9%85%8D%E7%BD%AE%E5%A4%96%E9%83%A8%E5%AD%98%E5%82%A8
RWO:
enable: false
storageClassName: glusterfs-simple

# Rainbond region database, ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config/#%E9%85%8D%E7%BD%AE-rainbond-%E9%9B%86%E7%BE%A4%E7%AB%AF%E6%95%B0%E6%8D%AE%E5%BA%93
regionDatabase:
enable: false
@@ -91,33 +54,33 @@ Cluster:
username: admin

# External gateway IP address
# gatewayIngressIPs: 192.168.0.1
gatewayIngressIPs: #192.168.0.2

# rbd-chaos configuration,ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config/#%E9%85%8D%E7%BD%AE%E6%9E%84%E5%BB%BA%E8%8A%82%E7%82%B9
# nodesForChaos:
nodesForChaos:
# - name: node1
# - name: node2

# rbd-gateway configuration, ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config/#%E9%85%8D%E7%BD%AE%E7%BD%91%E5%85%B3%E8%8A%82%E7%82%B9
# nodesForGateway:
nodesForGateway:
# - externalIP: 192.168.0.1
# internalIP: 192.168.0.1
# name: node1
# - externalIP: 192.168.0.2
# internalIP: 192.168.0.2
# name: node2

# Component unified image repository and namespace, ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config/#%E9%85%8D%E7%BD%AE%E9%9B%86%E7%BE%A4%E7%AB%AF%E9%95%9C%E5%83%8F%E8%8E%B7%E5%8F%96%E5%9C%B0%E5%9D%80
# Component unified image repository and namespace
rainbondImageRepository: rainbond

# Component image version, ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config/#%E9%85%8D%E7%BD%AE%E5%AE%89%E8%A3%85%E7%89%88%E6%9C%AC
# Component image version
installVersion: v6.0.0-release

# Component image pull policy, ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config/#%E9%85%8D%E7%BD%AE%E9%9B%86%E7%BE%A4%E7%AB%AF%E9%95%9C%E5%83%8F%E6%8B%89%E5%8F%96%E7%AD%96%E7%95%A5
# Component image pull policy
imagePullPolicy: IfNotPresent

# Number of component copies, ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config/#%E9%85%8D%E7%BD%AE%E9%9B%86%E7%BE%A4%E5%89%AF%E6%9C%AC
replicas: 2
# Number of component copies
replicas: 1



@@ -127,60 +90,23 @@ Cluster:
Component:

# rbd-api component configuration
# ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config#%E9%85%8D%E7%BD%AE-rbd-api-%E5%8F%82%E6%95%B0
# ref: ref: https://www.rainbond.com/docs/ops-guide/management/change-ports
rbd_api:
args:
# - --api-addr-ssl 0.0.0.0:8443
# - --ws-addr 0.0.0.0:6060

# rbd-gateway component configuration
# ref: https://www.rainbond.com/docs/installation/install-with-helm/vaules-config#%E9%85%8D%E7%BD%AE-rbd-gateway-%E5%8F%82%E6%95%B0
# ref: ref: https://www.rainbond.com/docs/ops-guide/management/change-ports
rbd_gateway:
args:
# - --service-http-port 80
# - --service-https-port 443


# rbd-hub component configuration
rbd_hub:
args:

# rbd-mq component configuration
rbd_mq:
args:

# rbd-resource-proxy component configuration
rbd_resource_proxy:
args:

# rbd-monitor component configuration
rbd_monitor:
args:

# rbd-db component configuration
rbd_db:
args:

# rbd-chaos component configuration
rbd_chaos:
args:

# rbd-worker component configuration
rbd_worker:
args:

# rbd-eventlog component configuration
rbd_eventlog:
args:

# rbd-app-ui component configuration
rbd_app_ui:
enable: true
args:

local_path_provisioner:
image:

minio:
image:
enable: true

0 comments on commit 4d531a6

Please sign in to comment.