Change chart directory structure

This commit is contained in:
wbsong111
2026-01-19 11:11:33 +09:00
parent 113bcfdf5b
commit 1c0c62291f
5947 changed files with 4134 additions and 1 deletions
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
@@ -0,0 +1,74 @@
# StarRocks Operator 버전 갱신 가이드
StarRocks Operator Helm Chart의 버전의 갱신할 경우 작업의 시작은 항상 main에서 이루어져야 한다.
## 1. git 작업 환경 구성
- 서비스 카탈로그 git 다운로드
```
$ git clone https://github.com/paasup/dip-catalog.git
```
- 작업 브랜치로 체크아웃
```
$ git checkout -b update-starrocks-operator/1.11.3
```
## 2. 차트 갱신
- BUILD-README.md, CUSTOM-README.md, custom-values.yaml을 제외한 파일 삭제
``` sh
# chart 디렉토리로 이동
cd ~/dip-catalog/charts/starrocks-operator
# 파일 삭제 전 삭제할 파일 목록 확인
find . -mindepth 1 \( -name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" \) -prune -o -print
# 파일 삭제
find . -mindepth 1 \( -name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" \) -prune -o -exec rm -rf {} +
```
- starrocks-operator 차트 다운로드
``` sh
# charts 디렉토리로 이동
cd ~/dip-catalog/charts
# helm repo 추가
helm repo add starrocks ttps://starrocks.github.io/starrocks-kubernetes-operator
helm repo update
# helm 차트 조회
helm search repo starrocks/operator
# helm 차트 다운로드
helm pull starrocks/operator --version=1.11.3
# 차트 압축 해제 및 이름 변경
tar xzvf operator-*.tgz
mv -r operator/* starrocks-operator
# 필요 없는 파일 삭제
rm -rf operator
rm operator-*.tgz
```
## 3. github에 tag 추가
- 갱신작업 진행후 commit
```
$ git add .
$ git commit -m "update-starrocks-operator/1.11.3"
```
- main 브랜치에 체크아웃 후 merge
```
$ git checkout main
$ git merge update-starrocks-operator/1.11.3
```
- git에 push 후 작업 브랜치 삭제
```
$ git push -u origin main
$ git branch -d update-starrocks-operator/1.11.3
```
- git tag 추가 후 push
```
$ git tag starrocks-operator/1.11.3
$ git push origin starrocks-operator/1.11.3
@@ -0,0 +1,74 @@
# StarRocks Operator 배포
## 1. 배포 방법
### 1) 배포시 주의 사항
- StarRocks Operator는 StarRocks 클러스터를 관리하는 Kubernetes Operator입니다
- 배포 전 적절한 RBAC 권한이 설정되어 있어야 합니다
- Kubernetes 1.18.0 이상 버전이 필요합니다
### 2) 배포 방법
``` sh
git clone https://github.com/paasup/dip-catalog.git
cd charts/starrocks-operator
helm upgrade starrocks-operator ./ -f custom-values.yaml --install -n starrocks-operator --create-namespace
```
## 2. custom-values.yaml 설명
- custom-values.yaml에 정의된 값에 대한 설명이다.
### 1) 기본 설정
| Name | 설명 | 기본값 |
| ---------------------- | ------------------------------------------------------------ | ------ |
| `timeZone` | 시간대 설정 | `"Asia/Seoul"` |
| `image.repository` | 오프라인 설치 시에 설정. 내부 저장소 타겟으로 변경 | `"starrocks/operator"` |
| `image.tag` | 이미지 태그 설정 | `"v1.11.0"` |
| `image.pullPolicy` | 이미지 Pull 정책 | `"IfNotPresent"` |
### 2) Resource 설정
``` yaml
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 500m
memory: 400Mi
```
### 3) Node Selector 설정
``` yaml
nodeSelector:
kubernetes.io/os: linux
tolerations: []
affinity: {}
```
### 4) Webhook 설정
``` yaml
webhook:
enabled: true
port: 9443
certManager:
enabled: false
```
### 5) Monitoring 설정
``` yaml
metrics:
enabled: true
port: 8080
serviceMonitor:
enabled: false
```
@@ -0,0 +1,23 @@
apiVersion: v2
appVersion: 1.11.3
description: A Helm chart for StarRocks operator
home: https://github.com/StarRocks/starrocks-kubernetes-operator
icon: https://avatars.githubusercontent.com/u/88238841
keywords:
- operator
- starrocks
- database
- olap
kubeVersion: '>=1.23.0-0'
maintainers:
- email: caixiaohua@starrocks.com
name: Kevin Cai
- email: shensida@starrocks.com
name: SidaShen
- email: yandongxiao@starrocks.com
name: Dongxiao Yan
name: operator
sources:
- https://github.com/StarRocks/starrocks
type: application
version: 1.11.3
@@ -0,0 +1,50 @@
# Deploy Operator by operator Chart
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Release Charts](https://img.shields.io/badge/Release-helmcharts-green.svg)](https://github.com/StarRocks/starrocks-kubernetes-operator/releases)
[Helm](https://helm.sh/) is a package manager for Kubernetes. A [Helm Chart](https://helm.sh/docs/topics/charts/) is a Helm package and contains all of the resource definitions necessary to run an application on a Kubernetes cluster. This topic describes how to use Helm to automatically deploy a StarRocks operator on a Kubernetes cluster.
## Before you begin
- [Create a Kubernetes cluster](https://kubernetes.io/).
- [Install Helm](https://helm.sh/docs/intro/quickstart/).
## Install operator Chart
1. Add the Helm Chart Repo for StarRocks. The Helm Chart contains the definitions of the StarRocks Operator and the custom resource StarRocksCluster.
1. Add the Helm Chart Repo.
```Bash
helm repo add starrocks https://starrocks.github.io/starrocks-kubernetes-operator
```
2. Update the Helm Chart Repo to the latest version.
```Bash
helm repo update starrocks
```
3. View the Helm Chart Repo that you added.
```Bash
$ helm search repo starrocks
NAME CHART VERSION APP VERSION DESCRIPTION
starrocks/kube-starrocks 1.8.0 3.1-latest kube-starrocks includes two subcharts, starrock...
starrocks/operator 1.8.0 1.8.0 A Helm chart for StarRocks operator
starrocks/starrocks 1.8.0 3.1-latest A Helm chart for StarRocks cluster
```
2. Install the operator Chart.
```Bash
helm install starrocks-operator starrocks/operator
```
Please see [values.yaml](./values.yaml) for more details.
## Uninstall operator Chart
```Bash
helm uninstall starrocks-operator
```
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,42 @@
# StarRocks Operator Custom Values
timeZone: Asia/Seoul
# Operator image configuration
image:
repository: starrocks/operator
tag: "v1.11.0"
pullPolicy: IfNotPresent
# Resource limits and requests
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 500m
memory: 400Mi
# Node selector
nodeSelector:
kubernetes.io/os: linux
# Tolerations
tolerations: []
# Affinity
affinity: {}
# Webhook configuration
webhook:
enabled: true
port: 9443
certManager:
enabled: false
# Metrics configuration
metrics:
enabled: true
port: 8080
serviceMonitor:
enabled: false
@@ -0,0 +1,3 @@
Thank you for installing {{ .Chart.Name }}-{{ .Chart.Version }} operator chart.
Please see the values.yaml for more operation information: https://github.com/StarRocks/starrocks-kubernetes-operator/blob/main/helm-charts/charts/kube-starrocks/charts/operator/values.yaml
@@ -0,0 +1,14 @@
{{/*
The default service account name to use for the operator.
*/}}
{{- define "operator.serviceAccountName" -}}
{{- default "starrocks" .Values.global.rbac.serviceAccount.name }}
{{- end }}
{{- define "operator.namespace" -}}
{{- default .Release.Namespace .Values.starrocksOperator.namespaceOverride }}
{{- end }}
{{- define "operator.name" -}}
{{- default .Chart.Name .Values.nameOverride -}}
{{- end }}
@@ -0,0 +1,73 @@
{{- if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
{{- if .Values.starrocksOperator.watchNamespace | not }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "operator.name" . }}-operator
labels:
app: {{ template "operator.name" . }}-operator
rules:
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- '*'
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- '*'
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- serviceaccounts
- services
verbs:
- '*'
- apiGroups:
- ""
resources:
- endpoints
- pods
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- starrocks.com
resources:
- starrocksclusters
- starrockswarehouses
verbs:
- '*'
# when deploying to OpenShift, the following permission is also necessary
- apiGroups:
- starrocks.com
resources:
- starrocksclusters/finalizers
- starrockswarehouses/finalizers
verbs:
- update
- apiGroups:
- starrocks.com
resources:
- starrocksclusters/status
- starrockswarehouses/status
verbs:
- get
- patch
- update
{{- end }}
{{- end }}
@@ -0,0 +1,16 @@
{{ if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
{{- if .Values.starrocksOperator.watchNamespace | not }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "operator.name" . }}-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "operator.name" . }}-operator
subjects:
- kind: ServiceAccount
name: {{ template "operator.serviceAccountName" . }}
namespace: {{ template "operator.namespace" . }}
{{- end }}
{{- end }}
@@ -0,0 +1,89 @@
{{- if .Values.starrocksOperator.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "operator.name" . }}-operator
namespace: {{ template "operator.namespace" . }}
labels:
app: {{ template "operator.name" . }}-operator
{{- if .Values.starrocksOperator.annotations }}
annotations:
{{- toYaml .Values.starrocksOperator.annotations | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app: {{ template "operator.name" . }}-operator
replicas: {{ .Values.starrocksOperator.replicaCount }}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
{{- if .Values.starrocksOperator.annotations }}
{{- toYaml .Values.starrocksOperator.annotations | nindent 8 }}
{{- end }}
labels:
app: {{ template "operator.name" . }}-operator
version: {{ $.Chart.Version }}
spec:
automountServiceAccountToken: true
{{- if .Values.starrocksOperator.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.starrocksOperator.imagePullSecrets | nindent 6 }}
{{- end }}
containers:
- command:
- /sroperator
args:
- --leader-elect
{{- toYaml .Values.starrocksOperator.log | nindent 8 }}
{{- if .Values.starrocksOperator.watchNamespace }}
- --namespace={{ .Values.starrocksOperator.watchNamespace }}
{{- end }}
{{- if .Values.starrocksOperator.dnsDomainSuffix }}
- --dns-domain-suffix={{ .Values.starrocksOperator.dnsDomainSuffix }}
{{- end }}
- --volume-name-with-hash={{ .Values.starrocksOperator.volumeNameWithHash }}
env:
- name: TZ
value: {{ .Values.timeZone }}
{{- if .Values.starrocksOperator.env }}
{{- toYaml .Values.starrocksOperator.env | nindent 8 }}
{{- end }}
image: "{{ .Values.starrocksOperator.image.repository }}:{{ .Values.starrocksOperator.image.tag }}"
imagePullPolicy: {{ .Values.starrocksOperator.imagePullPolicy }}
name: manager
{{- if .Values.starrocksOperator.securityContext }}
securityContext:
{{- toYaml .Values.starrocksOperator.securityContext | nindent 10 }}
{{- end }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
{{- toYaml .Values.starrocksOperator.resources | nindent 10 }}
serviceAccountName: {{ template "operator.serviceAccountName" . }}
terminationGracePeriodSeconds: 10
{{- if .Values.starrocksOperator.nodeSelector }}
nodeSelector:
{{- toYaml .Values.starrocksOperator.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.starrocksOperator.affinity }}
affinity:
{{- toYaml .Values.starrocksOperator.affinity | nindent 8 }}
{{- end }}
{{- if .Values.starrocksOperator.tolerations }}
tolerations:
{{- toYaml .Values.starrocksOperator.tolerations | nindent 8 }}
{{- end }}
{{- end }}
@@ -0,0 +1,15 @@
{{ if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cn-leader-election-rolebinding
namespace: {{ template "operator.namespace" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cn-leader-election-role
subjects:
- kind: ServiceAccount
name: {{ template "operator.serviceAccountName" . }}
namespace: {{ template "operator.namespace" . }}
{{- end }}
@@ -0,0 +1,40 @@
{{ if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cn-leader-election-role
namespace: {{ template "operator.namespace" . }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
{{- end }}
@@ -0,0 +1,74 @@
{{- if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
{{- if .Values.starrocksOperator.watchNamespace }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "operator.name" . }}-operator
namespace: {{ template "operator.namespace" . }}
labels:
app: {{ template "operator.name" . }}-operator
rules:
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- '*'
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- '*'
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- '*'
- apiGroups:
- ""
resources:
- configmaps
- serviceaccounts
- services
verbs:
- '*'
- apiGroups:
- ""
resources:
- endpoints
- pods
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- starrocks.com
resources:
- starrocksclusters
- starrockswarehouses
verbs:
- '*'
# when deploying to OpenShift, the following permission is also necessary
- apiGroups:
- starrocks.com
resources:
- starrocksclusters/finalizers
- starrockswarehouses/finalizers
verbs:
- update
- apiGroups:
- starrocks.com
resources:
- starrocksclusters/status
- starrockswarehouses/status
verbs:
- get
- patch
- update
{{- end }}
{{- end }}
@@ -0,0 +1,17 @@
{{- if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
{{- if .Values.starrocksOperator.watchNamespace }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "operator.name" . }}-operator
namespace: {{ template "operator.namespace" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "operator.name" . }}-operator
subjects:
- kind: ServiceAccount
name: {{ template "operator.serviceAccountName" . }}
namespace: {{ template "operator.namespace" . }}
{{- end }}
{{- end }}
@@ -0,0 +1,15 @@
{{- if and .Values.starrocksOperator.enabled .Values.global.rbac.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "operator.serviceAccountName" . }}
namespace: {{ template "operator.namespace" . }}
{{- with .Values.global.rbac.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.global.rbac.serviceAccount.labels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,107 @@
# Default values for operator.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
rbac:
# If set true, the clusterrole, clusterrolebinding, serviceaccount resources will be created for
# the operator. If changed to false later, these resources will be deleted.
# Note: By default the operator will watch all namespaces, so it needs clusterrole, clusterrolebinding to access resources.
# If .Values.starrocksOperator.watchNamespace is set, the role and rolebinding will be created for the specified namespace.
create: true
serviceAccount:
name: "starrocks"
# Optional annotations to add to the serviceaccount manifest
annotations: {}
# Optional labels to add to the serviceaccount manifest
labels: {}
# TimeZone is used to set the environment variable TZ for pod, with Asia/Shanghai as the default.
timeZone: Asia/Shanghai
# Set the nameOverride values for creating the same resources with the parent chart.
# In version v1.7.1 or before, there is only one chart called kube-starrocks, and the chart name is the prefix
# of some resources created by the chart.
# In version v1.8.0, the kube-starrocks chart is split into two charts, and to keep backward compatibility, the
# nameOverride is used to set the prefix of the resources created by the operator chart.
nameOverride: "kube-starrocks"
starrocksOperator:
# If enabled, the operator-related resources will be created, including the operator deployment, service account,
# clusterrole, clusterrolebinding, and service account.
enabled: true
# annotations for starrocks operator.
annotations: {}
namespaceOverride: ""
image:
# image sliced by "repository:tag"
repository: starrocks/operator
tag: v1.11.3
imagePullPolicy: Always
replicaCount: 1
resources:
limits:
cpu: 500m
memory: 800Mi
requests:
cpu: 500m
memory: 400Mi
# By default, the operator will only set runAsNonRoot to true, allowPrivilegeEscalation to false, readOnlyRootFilesystem to true.
# You can customize the securityContext for operator pod, e.g., drop capabilities, seccompProfile, etc.
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
#capabilities:
# drop:
# - ALL
#seccompProfile:
# type: "RuntimeDefault"
# imagePullSecrets allows you to use secrets to pull images for pods.
imagePullSecrets: []
# - name: "image-pull-secret"
# If specified, the pod's nodeSelectordisplayName="Map of nodeSelectors to match when scheduling pods on nodes"
# Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
nodeSelector: {}
# affinity for operator pod scheduling.
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchFields:
# - key: metadata.name
# operator: In
# values:
# - target-host-name
tolerations: []
# - key: "key"
# operator: "Equal|Exists"
# value: "value"
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
# If specified, it will restrict operator to watch resources in the specified namespace. And
# 1. You must deploy your StarRocks cluster to the specified namespace.
# 2. You cannot assign multiple namespaces to watchNamespace field.
# Note: In most cases, you should not set this value. If your kubernetes cluster manages too many nodes, and
# the operator watching all namespaces uses too many memory resources, you can set this value.
# Defaults to all namespaces.
watchNamespace: ""
# Additional operator container environment variables
# You specify this manually like you would a raw deployment manifest.
# Ref: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
# operator supports the following environment variables:
# KUBE_STARROCKS_UNSUPPORTED_ENVS: "XXX,YYY" # The environment variables that will not be passed to starrocks container.
env: []
# setting log related parameter
log:
- --zap-time-encoding=iso8601
- --zap-encoder=console
# if you want open debug log, open this option
# - --zap-log-level 4
# Operator needs to specify the FQDN in nginx.conf when it set up fe-proxy service.
# By default, Operator will use cluster.local as the dnsDomainSuffix.
# If you set up a kubernetes cluster with a different dnsDomainSuffix, you need to set this value.
dnsDomainSuffix: ""
# By default, the volume name of secret and configmap created by operator for the FE/BE/CN pods has a hash suffix.
# If users plan to use a sidecar or init container to mount the same volume, it will be challenging to get the volume name.
# In this situation, you can set this value to false.
volumeNameWithHash: true