Skip to content

Commit

Permalink
refactor: add security context (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 authored Nov 11, 2024
1 parent b2f3d0c commit b391b6e
Show file tree
Hide file tree
Showing 7 changed files with 2,670 additions and 24 deletions.
8 changes: 8 additions & 0 deletions apis/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ type SlimPodSpec struct {
// List of volumes that can be mounted by containers belonging to the pod.
// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`

// SecurityContext holds pod-level security attributes and common container settings.
// +optional
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
}

// MainContainerSpec describes the specification of the main container of a pod.
Expand Down Expand Up @@ -272,6 +276,10 @@ type MainContainerSpec struct {
// Cannot be updated.
// +optional
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`

// SecurityContext holds container-level security attributes and common settings.
// +optional
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"`
}

func (in *MainContainerSpec) GetImage() string {
Expand Down
10 changes: 10 additions & 0 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b391b6e

Please sign in to comment.