Skip to content

Commit

Permalink
[BugFix] Fix bugs when test main branch (#442)
Browse files Browse the repository at this point in the history
Signed-off-by: yandongxiao <[email protected]>
  • Loading branch information
yandongxiao authored Feb 4, 2024
1 parent 090ee3c commit fafdcc8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ artifacts
migrate-chart-value
gen-crd-api-reference-docs-master/
*.tgz

temp/
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ metadata:
spec:
template:
spec:
{{- if .Values.starrocksFESpec.imagePullSecrets }}
{{- if or .Values.starrocksFESpec.imagePullSecrets .Values.starrocksCluster.componentValues.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.starrocksFESpec.imagePullSecrets | nindent 6 }}
{{- include "starrockscluster.fe.imagePullSecrets" . | nindent 6 }}
{{- end }}
{{- if .Values.starrocksFESpec.affinity }}
{{- if or .Values.starrocksFESpec.affinity .Values.starrocksCluster.componentValues.affinity }}
affinity:
{{- toYaml .Values.starrocksFESpec.affinity | nindent 8 }}
{{- include "starrockscluster.fe.affinity" . | nindent 8 }}
{{- end }}
containers:
- name: {{ template "starrockscluster.name" . }}-initpwd
image: {{ .Values.starrocksFESpec.image.repository }}:{{ .Values.starrocksFESpec.image.tag }}
image: {{ .Values.starrocksFESpec.image.repository }}:{{ include "starrockscluster.fe.image.tag" . }}
imagePullPolicy: IfNotPresent
command:
- /bin/bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
{{- end }}
{{- if or .Values.starrocksFESpec.podLabels .Values.starrocksCluster.componentValues.podLabels .Values.datadog.profiling.fe }}
podLabels:
{{- if or .Values.starrocksFESpec.podLabels .Values.starrocksCluster.componentValues.podLabel }}
{{- if or .Values.starrocksFESpec.podLabels .Values.starrocksCluster.componentValues.podLabels }}
{{- include "starrockscluster.fe.podLabels" . | nindent 6 }}
{{- end }}
{{- if .Values.datadog.profiling.fe }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ starrocksCnSpec:
# The userId will be set to 1000, and the groupID will be set to 1000.
runAsNonRoot: false
# add/drop capabilities for CN container.
capabilities: { }
capabilities: {}
# add:
# - PERFMON
# - SYS_PTRACE
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/charts/kube-starrocks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ starrocks:
# The userId will be set to 1000, and the groupID will be set to 1000.
runAsNonRoot: false
# add/drop capabilities for CN container.
capabilities: { }
capabilities: {}
# add:
# - PERFMON
# - SYS_PTRACE
Expand Down
3 changes: 1 addition & 2 deletions pkg/subcontrollers/be/be_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ func (be *BeController) SyncCluster(ctx context.Context, src *srapi.StarRocksClu

var err error
defer func() {
// we do not record an event if the error is nil, because this will cause too many events to be recorded.
if err != nil {
be.Recorder.Event(src, corev1.EventTypeWarning, "SyncBeFailed", err.Error())
} else {
be.Recorder.Event(src, corev1.EventTypeNormal, "DeployBeSuccess", "deploy be success")
}
}()

Expand Down
3 changes: 1 addition & 2 deletions pkg/subcontrollers/cn/cn_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,9 @@ func (cc *CnController) SyncCluster(ctx context.Context, src *srapi.StarRocksClu

err := cc.SyncCnSpec(ctx, object.NewFromCluster(src), src.Spec.StarRocksCnSpec)
defer func() {
// we do not record an event if the error is nil, because this will cause too many events to be recorded.
if err != nil {
cc.Recorder.Event(src, corev1.EventTypeWarning, "SyncCnFailed", err.Error())
} else {
cc.Recorder.Event(src, corev1.EventTypeNormal, "DeployCnSuccess", "deploy cn success")
}
}()
return err
Expand Down
3 changes: 1 addition & 2 deletions pkg/subcontrollers/fe/fe_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ func (fc *FeController) SyncCluster(ctx context.Context, src *srapi.StarRocksClu

var err error
defer func() {
// we do not record an event if the error is nil, because this will cause too many events to be recorded.
if err != nil {
fc.Recorder.Event(src, corev1.EventTypeWarning, "SyncFeFailed", err.Error())
} else {
fc.Recorder.Event(src, corev1.EventTypeNormal, "DeployFeSuccess", "deploy fe success")
}
}()

Expand Down

0 comments on commit fafdcc8

Please sign in to comment.