Skip to content

Commit

Permalink
add privileged option for tikv pod template (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwen0 authored Jun 3, 2019
1 parent fe13e55 commit 758c988
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/apis/pingcap.com/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ type TiDBSlowLogTailerSpec struct {
// TiKVSpec contains details of PD member
type TiKVSpec struct {
ContainerSpec
Privileged bool `json:"privileged,omitempty"`
Replicas int32 `json:"replicas"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Expand Down
3 changes: 3 additions & 0 deletions pkg/manager/member/tikv_member_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ func (tkmm *tikvMemberManager) getNewSetForTidbCluster(tc *v1alpha1.TidbCluster)
Image: tc.Spec.TiKV.Image,
Command: []string{"/bin/sh", "/usr/local/bin/tikv_start_script.sh"},
ImagePullPolicy: tc.Spec.TiKV.ImagePullPolicy,
SecurityContext: &corev1.SecurityContext{
Privileged: &tc.Spec.TiKV.Privileged,
},
Ports: []corev1.ContainerPort{
{
Name: "server",
Expand Down

0 comments on commit 758c988

Please sign in to comment.