Skip to content

Commit

Permalink
feat: enable affinity for Sensor (#1176)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Wang <[email protected]>
  • Loading branch information
whynowy committed Apr 12, 2021
1 parent f752bc0 commit 8fd9ae7
Show file tree
Hide file tree
Showing 9 changed files with 343 additions and 238 deletions.
4 changes: 4 additions & 0 deletions api/openapi-spec/swagger.json

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

14 changes: 14 additions & 0 deletions api/sensor.html

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

13 changes: 13 additions & 0 deletions api/sensor.md

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

1 change: 1 addition & 0 deletions controllers/sensor/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ func buildDeploymentSpec(args *AdaptorArgs) (*appv1.DeploymentSpec, error) {
spec.Template.Spec.SecurityContext = args.Sensor.Spec.Template.SecurityContext
spec.Template.Spec.NodeSelector = args.Sensor.Spec.Template.NodeSelector
spec.Template.Spec.Tolerations = args.Sensor.Spec.Template.Tolerations
spec.Template.Spec.Affinity = args.Sensor.Spec.Template.Affinity
spec.Template.Spec.ImagePullSecrets = args.Sensor.Spec.Template.ImagePullSecrets
spec.Template.Spec.PriorityClassName = args.Sensor.Spec.Template.PriorityClassName
spec.Template.Spec.Priority = args.Sensor.Spec.Template.Priority
Expand Down
529 changes: 292 additions & 237 deletions pkg/apis/sensor/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pkg/apis/sensor/v1alpha1/generated.proto

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

8 changes: 7 additions & 1 deletion pkg/apis/sensor/v1alpha1/openapi_generated.go

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

3 changes: 3 additions & 0 deletions pkg/apis/sensor/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ type Template struct {
// More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
// +optional
Priority *int32 `json:"priority,omitempty" protobuf:"bytes,10,opt,name=priority"`
// If specified, the pod's scheduling constraints
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty" protobuf:"bytes,11,opt,name=affinity"`
}

// EventDependency describes a dependency
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit 8fd9ae7

Please sign in to comment.