Skip to content

Commit

Permalink
Change type of TerminationGracePeriodSeconds to *int64
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangpengcheng committed Sep 12, 2024
1 parent ee53ec4 commit 97a192f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/compute/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ type PodPolicy struct {

// TerminationGracePeriodSeconds is the amount of time that kubernetes will give
// for a pod before terminating it.
TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds,omitempty"`
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`

// List of volumes that can be mounted by containers belonging to the pod.
// More info: https://kubernetes.io/docs/concepts/storage/volumes
Expand Down
2 changes: 1 addition & 1 deletion controllers/spec/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ func makePodTemplate(container *corev1.Container, filebeatContainer *corev1.Cont
Spec: corev1.PodSpec{
InitContainers: initContainers,
Containers: containers,
TerminationGracePeriodSeconds: &policy.TerminationGracePeriodSeconds,
TerminationGracePeriodSeconds: policy.TerminationGracePeriodSeconds,
Volumes: volumes,
NodeSelector: policy.NodeSelector,
Affinity: policy.Affinity,
Expand Down

0 comments on commit 97a192f

Please sign in to comment.