Skip to content

Commit

Permalink
Add variants of PodTemplate spec fields into the Runner spec (#7)
Browse files Browse the repository at this point in the history
Resolves #5
Fixes #11
Fixes #12

Changes:

* Added podtemplate spec

* Rework pod creation logic

* Added most using podspecs

* Added copy of podspec

* Fixed Github List method

* Fixed containers

* Added ability to override runner's containers

* Added ability to override runner's containers

* Added ability to override runner's containers

* Update controllers/runner_controller.go

Co-Authored-By: Moto Ishizawa <summerwind.jp@gmail.com>

* Remove optional restartpolicy

* Changed naming convention

Co-authored-by: Moto Ishizawa <summerwind.jp@gmail.com>
  • Loading branch information
alexandrst88 and summerwind authored Mar 20, 2020
1 parent 23538d4 commit d4c849e
Show file tree
Hide file tree
Showing 8 changed files with 19,423 additions and 8 deletions.
36 changes: 35 additions & 1 deletion api/v1alpha1/runner_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,44 @@ type RunnerSpec struct {
Repository string `json:"repository"`

// +optional
Image string `json:"image"`
Containers []corev1.Container `json:"containers,omitempty"`
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// +optional
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
// +optional
EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"`

// +optional
Image string `json:"image"`
// +optional
Env []corev1.EnvVar `json:"env,omitempty"`

// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`

// +optional
InitContainers []corev1.Container `json:"initContainers,omitempty"`
// +optional
SidecarContainers []corev1.Container `json:"sidecarContainers,omitempty"`
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// +optional
AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"`
// +optional
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
// +optional
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// +optional
EphemeralContainers []corev1.EphemeralContainer `json:"ephemeralContainers,omitempty"`
// +optional
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
}

// RunnerStatus defines the observed state of Runner
Expand Down
89 changes: 89 additions & 0 deletions api/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 d4c849e

Please sign in to comment.