Skip to content

Commit

Permalink
[Feature] Support command and args (#516)
Browse files Browse the repository at this point in the history
* [Feature] Support command and args

Signed-off-by: yandongxiao <[email protected]>
  • Loading branch information
yandongxiao authored Apr 23, 2024
1 parent 2829c25 commit 83bab97
Show file tree
Hide file tree
Showing 22 changed files with 636 additions and 21 deletions.
123 changes: 123 additions & 0 deletions config/crd/bases/starrocks.com_starrocksclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,19 @@ spec:
description: annotation for pods. user can config monitor annotation
for collect to monitor system.
type: object
args:
description: |-
Arguments to the entrypoint.
If this is not provided, it will use $(FE_SERVICE_NAME) for all components.
Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
of whether the variable exists or not. Cannot be updated.
More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
items:
type: string
type: array
beEnvVars:
description: beEnvVars is a slice of environment variables that
are added to the pods, the default is empty.
Expand Down Expand Up @@ -1001,6 +1014,16 @@ spec:
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
command:
description: "Entrypoint array. Not executed within a shell.\nIf
this is not provided, it will use default entrypoint for different
components:\n\t1. For FE, it will use /opt/starrocks/fe_entrypoint.sh
as the entrypoint.\n 2. For BE, it will use /opt/starrocks/be_entrypoint.sh
as the entrypoint.\n 3. For CN, it will use /opt/starrocks/cn_entrypoint.sh
as the entrypoint.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"
items:
type: string
type: array
configMapInfo:
description: the reference for configMap which store the config
info to start starrocks. e.g. be.conf, fe.conf, cn.conf.
Expand All @@ -1016,6 +1039,15 @@ spec:
description: the reference for configMap which allow users to
mount any files to container.
items:
description: |-
MountInfo
The reason why we do not support defaultMode is that we use hash.HashObject to
calculate the actual volume name. This volume name is used in pod template of statefulset,
and if this MountInfo type has been changed, the volume name will be changed too, and
that will make pods restart.
The default mode is 0644, and in order to support to set permission information for a configMap
or secret, we add should specify the subPath and specify a command or args in the container.
And It will be set 0755.
properties:
mountPath:
description: |-
Expand Down Expand Up @@ -2630,6 +2662,15 @@ spec:
secrets:
description: the reference for secrets.
items:
description: |-
MountInfo
The reason why we do not support defaultMode is that we use hash.HashObject to
calculate the actual volume name. This volume name is used in pod template of statefulset,
and if this MountInfo type has been changed, the volume name will be changed too, and
that will make pods restart.
The default mode is 0644, and in order to support to set permission information for a configMap
or secret, we add should specify the subPath and specify a command or args in the container.
And It will be set 0755.
properties:
mountPath:
description: |-
Expand Down Expand Up @@ -4910,6 +4951,19 @@ spec:
description: annotation for pods. user can config monitor annotation
for collect to monitor system.
type: object
args:
description: |-
Arguments to the entrypoint.
If this is not provided, it will use $(FE_SERVICE_NAME) for all components.
Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
of whether the variable exists or not. Cannot be updated.
More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
items:
type: string
type: array
autoScalingPolicy:
description: AutoScalingPolicy auto scaling strategy
properties:
Expand Down Expand Up @@ -5691,6 +5745,16 @@ spec:
- name
type: object
type: array
command:
description: "Entrypoint array. Not executed within a shell.\nIf
this is not provided, it will use default entrypoint for different
components:\n\t1. For FE, it will use /opt/starrocks/fe_entrypoint.sh
as the entrypoint.\n 2. For BE, it will use /opt/starrocks/be_entrypoint.sh
as the entrypoint.\n 3. For CN, it will use /opt/starrocks/cn_entrypoint.sh
as the entrypoint.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"
items:
type: string
type: array
configMapInfo:
description: the reference for configMap which store the config
info to start starrocks. e.g. be.conf, fe.conf, cn.conf.
Expand All @@ -5706,6 +5770,15 @@ spec:
description: the reference for configMap which allow users to
mount any files to container.
items:
description: |-
MountInfo
The reason why we do not support defaultMode is that we use hash.HashObject to
calculate the actual volume name. This volume name is used in pod template of statefulset,
and if this MountInfo type has been changed, the volume name will be changed too, and
that will make pods restart.
The default mode is 0644, and in order to support to set permission information for a configMap
or secret, we add should specify the subPath and specify a command or args in the container.
And It will be set 0755.
properties:
mountPath:
description: |-
Expand Down Expand Up @@ -7320,6 +7393,15 @@ spec:
secrets:
description: the reference for secrets.
items:
description: |-
MountInfo
The reason why we do not support defaultMode is that we use hash.HashObject to
calculate the actual volume name. This volume name is used in pod template of statefulset,
and if this MountInfo type has been changed, the volume name will be changed too, and
that will make pods restart.
The default mode is 0644, and in order to support to set permission information for a configMap
or secret, we add should specify the subPath and specify a command or args in the container.
And It will be set 0755.
properties:
mountPath:
description: |-
Expand Down Expand Up @@ -10901,6 +10983,19 @@ spec:
description: annotation for pods. user can config monitor annotation
for collect to monitor system.
type: object
args:
description: |-
Arguments to the entrypoint.
If this is not provided, it will use $(FE_SERVICE_NAME) for all components.
Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
of whether the variable exists or not. Cannot be updated.
More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
items:
type: string
type: array
capabilities:
description: |-
refer to https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-capabilities-for-a-container
Expand Down Expand Up @@ -10946,6 +11041,16 @@ spec:
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
command:
description: "Entrypoint array. Not executed within a shell.\nIf
this is not provided, it will use default entrypoint for different
components:\n\t1. For FE, it will use /opt/starrocks/fe_entrypoint.sh
as the entrypoint.\n 2. For BE, it will use /opt/starrocks/be_entrypoint.sh
as the entrypoint.\n 3. For CN, it will use /opt/starrocks/cn_entrypoint.sh
as the entrypoint.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"
items:
type: string
type: array
configMapInfo:
description: the reference for configMap which store the config
info to start starrocks. e.g. be.conf, fe.conf, cn.conf.
Expand All @@ -10961,6 +11066,15 @@ spec:
description: the reference for configMap which allow users to
mount any files to container.
items:
description: |-
MountInfo
The reason why we do not support defaultMode is that we use hash.HashObject to
calculate the actual volume name. This volume name is used in pod template of statefulset,
and if this MountInfo type has been changed, the volume name will be changed too, and
that will make pods restart.
The default mode is 0644, and in order to support to set permission information for a configMap
or secret, we add should specify the subPath and specify a command or args in the container.
And It will be set 0755.
properties:
mountPath:
description: |-
Expand Down Expand Up @@ -12690,6 +12804,15 @@ spec:
secrets:
description: the reference for secrets.
items:
description: |-
MountInfo
The reason why we do not support defaultMode is that we use hash.HashObject to
calculate the actual volume name. This volume name is used in pod template of statefulset,
and if this MountInfo type has been changed, the volume name will be changed too, and
that will make pods restart.
The default mode is 0644, and in order to support to set permission information for a configMap
or secret, we add should specify the subPath and specify a command or args in the container.
And It will be set 0755.
properties:
mountPath:
description: |-
Expand Down
41 changes: 41 additions & 0 deletions config/crd/bases/starrocks.com_starrockswarehouses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,19 @@ spec:
description: annotation for pods. user can config monitor annotation
for collect to monitor system.
type: object
args:
description: |-
Arguments to the entrypoint.
If this is not provided, it will use $(FE_SERVICE_NAME) for all components.
Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced
to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will
produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless
of whether the variable exists or not. Cannot be updated.
More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
items:
type: string
type: array
autoScalingPolicy:
description: AutoScalingPolicy defines auto scaling policy
properties:
Expand Down Expand Up @@ -1497,6 +1510,16 @@ spec:
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
command:
description: "Entrypoint array. Not executed within a shell.\nIf
this is not provided, it will use default entrypoint for different
components:\n\t1. For FE, it will use /opt/starrocks/fe_entrypoint.sh
as the entrypoint.\n 2. For BE, it will use /opt/starrocks/be_entrypoint.sh
as the entrypoint.\n 3. For CN, it will use /opt/starrocks/cn_entrypoint.sh
as the entrypoint.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell"
items:
type: string
type: array
configMapInfo:
description: the reference for configMap which store the config
info to start starrocks. e.g. be.conf, fe.conf, cn.conf.
Expand All @@ -1512,6 +1535,15 @@ spec:
description: the reference for configMap which allow users to
mount any files to container.
items:
description: |-
MountInfo
The reason why we do not support defaultMode is that we use hash.HashObject to
calculate the actual volume name. This volume name is used in pod template of statefulset,
and if this MountInfo type has been changed, the volume name will be changed too, and
that will make pods restart.
The default mode is 0644, and in order to support to set permission information for a configMap
or secret, we add should specify the subPath and specify a command or args in the container.
And It will be set 0755.
properties:
mountPath:
description: |-
Expand Down Expand Up @@ -3241,6 +3273,15 @@ spec:
secrets:
description: the reference for secrets.
items:
description: |-
MountInfo
The reason why we do not support defaultMode is that we use hash.HashObject to
calculate the actual volume name. This volume name is used in pod template of statefulset,
and if this MountInfo type has been changed, the volume name will be changed too, and
that will make pods restart.
The default mode is 0644, and in order to support to set permission information for a configMap
or secret, we add should specify the subPath and specify a command or args in the container.
And It will be set 0755.
properties:
mountPath:
description: |-
Expand Down
Loading

0 comments on commit 83bab97

Please sign in to comment.