Skip to content

Commit bdcbffb

Browse files
committed
[Feature] Support command and args
Signed-off-by: yandongxiao <[email protected]>
1 parent 2829c25 commit bdcbffb

22 files changed

+638
-21
lines changed

config/crd/bases/starrocks.com_starrocksclusters.yaml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,19 @@ spec:
841841
description: annotation for pods. user can config monitor annotation
842842
for collect to monitor system.
843843
type: object
844+
args:
845+
description: |-
846+
Arguments to the entrypoint.
847+
If this is not provided, it will use $(FE_SERVICE_NAME) for all components.
848+
Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
849+
cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
850+
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
851+
produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
852+
of whether the variable exists or not. Cannot be updated.
853+
More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
854+
items:
855+
type: string
856+
type: array
844857
beEnvVars:
845858
description: beEnvVars is a slice of environment variables that
846859
are added to the pods, the default is empty.
@@ -1001,6 +1014,16 @@ spec:
10011014
x-kubernetes-list-map-keys:
10021015
- name
10031016
x-kubernetes-list-type: map
1017+
command:
1018+
description: "Entrypoint array. Not executed within a shell.\nIf
1019+
this is not provided, it will use default entrypoint for different
1020+
components:\n\t1. For FE, it will use /opt/starrocks/fe_entrypoint.sh
1021+
as the entrypoint.\n 2. For BE, it will use /opt/starrocks/be_entrypoint.sh
1022+
as the entrypoint.\n 3. For CN, it will use /opt/starrocks/cn_entrypoint.sh
1023+
as the entrypoint.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"
1024+
items:
1025+
type: string
1026+
type: array
10041027
configMapInfo:
10051028
description: the reference for configMap which store the config
10061029
info to start starrocks. e.g. be.conf, fe.conf, cn.conf.
@@ -1016,6 +1039,15 @@ spec:
10161039
description: the reference for configMap which allow users to
10171040
mount any files to container.
10181041
items:
1042+
description: |-
1043+
MountInfo
1044+
The reason why we do not support defaultMode is that we use hash.HashObject to
1045+
calculate the actual volume name. This volume name is used in pod template of statefulset,
1046+
and if this MountInfo type has been changed, the volume name will be changed too, and
1047+
that will make pods restart.
1048+
The default mode is 0644, and in order to support to set permission information for a configMap
1049+
or secret, we add should specify the subPath and specify a command or args in the container.
1050+
And It will be set 0755.
10191051
properties:
10201052
mountPath:
10211053
description: |-
@@ -2630,6 +2662,15 @@ spec:
26302662
secrets:
26312663
description: the reference for secrets.
26322664
items:
2665+
description: |-
2666+
MountInfo
2667+
The reason why we do not support defaultMode is that we use hash.HashObject to
2668+
calculate the actual volume name. This volume name is used in pod template of statefulset,
2669+
and if this MountInfo type has been changed, the volume name will be changed too, and
2670+
that will make pods restart.
2671+
The default mode is 0644, and in order to support to set permission information for a configMap
2672+
or secret, we add should specify the subPath and specify a command or args in the container.
2673+
And It will be set 0755.
26332674
properties:
26342675
mountPath:
26352676
description: |-
@@ -4910,6 +4951,19 @@ spec:
49104951
description: annotation for pods. user can config monitor annotation
49114952
for collect to monitor system.
49124953
type: object
4954+
args:
4955+
description: |-
4956+
Arguments to the entrypoint.
4957+
If this is not provided, it will use $(FE_SERVICE_NAME) for all components.
4958+
Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
4959+
cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
4960+
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
4961+
produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
4962+
of whether the variable exists or not. Cannot be updated.
4963+
More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
4964+
items:
4965+
type: string
4966+
type: array
49134967
autoScalingPolicy:
49144968
description: AutoScalingPolicy auto scaling strategy
49154969
properties:
@@ -5691,6 +5745,16 @@ spec:
56915745
- name
56925746
type: object
56935747
type: array
5748+
command:
5749+
description: "Entrypoint array. Not executed within a shell.\nIf
5750+
this is not provided, it will use default entrypoint for different
5751+
components:\n\t1. For FE, it will use /opt/starrocks/fe_entrypoint.sh
5752+
as the entrypoint.\n 2. For BE, it will use /opt/starrocks/be_entrypoint.sh
5753+
as the entrypoint.\n 3. For CN, it will use /opt/starrocks/cn_entrypoint.sh
5754+
as the entrypoint.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"
5755+
items:
5756+
type: string
5757+
type: array
56945758
configMapInfo:
56955759
description: the reference for configMap which store the config
56965760
info to start starrocks. e.g. be.conf, fe.conf, cn.conf.
@@ -5706,6 +5770,15 @@ spec:
57065770
description: the reference for configMap which allow users to
57075771
mount any files to container.
57085772
items:
5773+
description: |-
5774+
MountInfo
5775+
The reason why we do not support defaultMode is that we use hash.HashObject to
5776+
calculate the actual volume name. This volume name is used in pod template of statefulset,
5777+
and if this MountInfo type has been changed, the volume name will be changed too, and
5778+
that will make pods restart.
5779+
The default mode is 0644, and in order to support to set permission information for a configMap
5780+
or secret, we add should specify the subPath and specify a command or args in the container.
5781+
And It will be set 0755.
57095782
properties:
57105783
mountPath:
57115784
description: |-
@@ -7320,6 +7393,15 @@ spec:
73207393
secrets:
73217394
description: the reference for secrets.
73227395
items:
7396+
description: |-
7397+
MountInfo
7398+
The reason why we do not support defaultMode is that we use hash.HashObject to
7399+
calculate the actual volume name. This volume name is used in pod template of statefulset,
7400+
and if this MountInfo type has been changed, the volume name will be changed too, and
7401+
that will make pods restart.
7402+
The default mode is 0644, and in order to support to set permission information for a configMap
7403+
or secret, we add should specify the subPath and specify a command or args in the container.
7404+
And It will be set 0755.
73237405
properties:
73247406
mountPath:
73257407
description: |-
@@ -10901,6 +10983,19 @@ spec:
1090110983
description: annotation for pods. user can config monitor annotation
1090210984
for collect to monitor system.
1090310985
type: object
10986+
args:
10987+
description: |-
10988+
Arguments to the entrypoint.
10989+
If this is not provided, it will use $(FE_SERVICE_NAME) for all components.
10990+
Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
10991+
cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
10992+
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
10993+
produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
10994+
of whether the variable exists or not. Cannot be updated.
10995+
More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
10996+
items:
10997+
type: string
10998+
type: array
1090410999
capabilities:
1090511000
description: |-
1090611001
refer to https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container
@@ -10946,6 +11041,16 @@ spec:
1094611041
x-kubernetes-list-map-keys:
1094711042
- name
1094811043
x-kubernetes-list-type: map
11044+
command:
11045+
description: "Entrypoint array. Not executed within a shell.\nIf
11046+
this is not provided, it will use default entrypoint for different
11047+
components:\n\t1. For FE, it will use /opt/starrocks/fe_entrypoint.sh
11048+
as the entrypoint.\n 2. For BE, it will use /opt/starrocks/be_entrypoint.sh
11049+
as the entrypoint.\n 3. For CN, it will use /opt/starrocks/cn_entrypoint.sh
11050+
as the entrypoint.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"
11051+
items:
11052+
type: string
11053+
type: array
1094911054
configMapInfo:
1095011055
description: the reference for configMap which store the config
1095111056
info to start starrocks. e.g. be.conf, fe.conf, cn.conf.
@@ -10961,6 +11066,15 @@ spec:
1096111066
description: the reference for configMap which allow users to
1096211067
mount any files to container.
1096311068
items:
11069+
description: |-
11070+
MountInfo
11071+
The reason why we do not support defaultMode is that we use hash.HashObject to
11072+
calculate the actual volume name. This volume name is used in pod template of statefulset,
11073+
and if this MountInfo type has been changed, the volume name will be changed too, and
11074+
that will make pods restart.
11075+
The default mode is 0644, and in order to support to set permission information for a configMap
11076+
or secret, we add should specify the subPath and specify a command or args in the container.
11077+
And It will be set 0755.
1096411078
properties:
1096511079
mountPath:
1096611080
description: |-
@@ -12690,6 +12804,15 @@ spec:
1269012804
secrets:
1269112805
description: the reference for secrets.
1269212806
items:
12807+
description: |-
12808+
MountInfo
12809+
The reason why we do not support defaultMode is that we use hash.HashObject to
12810+
calculate the actual volume name. This volume name is used in pod template of statefulset,
12811+
and if this MountInfo type has been changed, the volume name will be changed too, and
12812+
that will make pods restart.
12813+
The default mode is 0644, and in order to support to set permission information for a configMap
12814+
or secret, we add should specify the subPath and specify a command or args in the container.
12815+
And It will be set 0755.
1269312816
properties:
1269412817
mountPath:
1269512818
description: |-

config/crd/bases/starrocks.com_starrockswarehouses.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,19 @@ spec:
831831
description: annotation for pods. user can config monitor annotation
832832
for collect to monitor system.
833833
type: object
834+
args:
835+
description: |-
836+
Arguments to the entrypoint.
837+
If this is not provided, it will use $(FE_SERVICE_NAME) for all components.
838+
Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
839+
cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
840+
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
841+
produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
842+
of whether the variable exists or not. Cannot be updated.
843+
More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
844+
items:
845+
type: string
846+
type: array
834847
autoScalingPolicy:
835848
description: AutoScalingPolicy defines auto scaling policy
836849
properties:
@@ -1497,6 +1510,16 @@ spec:
14971510
x-kubernetes-list-map-keys:
14981511
- name
14991512
x-kubernetes-list-type: map
1513+
command:
1514+
description: "Entrypoint array. Not executed within a shell.\nIf
1515+
this is not provided, it will use default entrypoint for different
1516+
components:\n\t1. For FE, it will use /opt/starrocks/fe_entrypoint.sh
1517+
as the entrypoint.\n 2. For BE, it will use /opt/starrocks/be_entrypoint.sh
1518+
as the entrypoint.\n 3. For CN, it will use /opt/starrocks/cn_entrypoint.sh
1519+
as the entrypoint.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"
1520+
items:
1521+
type: string
1522+
type: array
15001523
configMapInfo:
15011524
description: the reference for configMap which store the config
15021525
info to start starrocks. e.g. be.conf, fe.conf, cn.conf.
@@ -1512,6 +1535,15 @@ spec:
15121535
description: the reference for configMap which allow users to
15131536
mount any files to container.
15141537
items:
1538+
description: |-
1539+
MountInfo
1540+
The reason why we do not support defaultMode is that we use hash.HashObject to
1541+
calculate the actual volume name. This volume name is used in pod template of statefulset,
1542+
and if this MountInfo type has been changed, the volume name will be changed too, and
1543+
that will make pods restart.
1544+
The default mode is 0644, and in order to support to set permission information for a configMap
1545+
or secret, we add should specify the subPath and specify a command or args in the container.
1546+
And It will be set 0755.
15151547
properties:
15161548
mountPath:
15171549
description: |-
@@ -3241,6 +3273,15 @@ spec:
32413273
secrets:
32423274
description: the reference for secrets.
32433275
items:
3276+
description: |-
3277+
MountInfo
3278+
The reason why we do not support defaultMode is that we use hash.HashObject to
3279+
calculate the actual volume name. This volume name is used in pod template of statefulset,
3280+
and if this MountInfo type has been changed, the volume name will be changed too, and
3281+
that will make pods restart.
3282+
The default mode is 0644, and in order to support to set permission information for a configMap
3283+
or secret, we add should specify the subPath and specify a command or args in the container.
3284+
And It will be set 0755.
32443285
properties:
32453286
mountPath:
32463287
description: |-

0 commit comments

Comments
 (0)