Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to enable and disable enableServiceLinks. #628

Merged
merged 1 commit into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/v1alpha1/runner_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ type RunnerPodSpec struct {
// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`

// +optional
EnableServiceLinks *bool `json:"enableServiceLinks,omitempty"`

// +optional
InitContainers []corev1.Container `json:"initContainers,omitempty"`

Expand Down
5 changes: 5 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.

Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ spec:
type: object
dockerdWithinRunnerContainer:
type: boolean
enableServiceLinks:
type: boolean
enterprise:
pattern: ^[^/]+$
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ spec:
type: object
dockerdWithinRunnerContainer:
type: boolean
enableServiceLinks:
type: boolean
enterprise:
pattern: ^[^/]+$
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@ spec:
type: object
dockerdWithinRunnerContainer:
type: boolean
enableServiceLinks:
type: boolean
enterprise:
pattern: ^[^/]+$
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ spec:
type: object
dockerdWithinRunnerContainer:
type: boolean
enableServiceLinks:
type: boolean
enterprise:
pattern: ^[^/]+$
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ spec:
type: object
dockerdWithinRunnerContainer:
type: boolean
enableServiceLinks:
type: boolean
enterprise:
pattern: ^[^/]+$
type: string
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/actions.summerwind.dev_runners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@ spec:
type: object
dockerdWithinRunnerContainer:
type: boolean
enableServiceLinks:
type: boolean
enterprise:
pattern: ^[^/]+$
type: string
Expand Down
1 change: 1 addition & 0 deletions controllers/runner_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
}

template.Spec.SecurityContext = runner.Spec.SecurityContext
template.Spec.EnableServiceLinks = runner.Spec.EnableServiceLinks

registrationOnly := metav1.HasAnnotation(runner.ObjectMeta, annotationKeyRegistrationOnly)

Expand Down