Skip to content

Commit

Permalink
fix: Added/fixed tolerations for CRDs (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
whynowy committed Jul 30, 2020
1 parent 527a45f commit adee1b5
Show file tree
Hide file tree
Showing 18 changed files with 567 additions and 296 deletions.
14 changes: 14 additions & 0 deletions api/event-bus.html

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

24 changes: 24 additions & 0 deletions api/event-bus.md

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

14 changes: 14 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.

24 changes: 24 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/eventbus/installer/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ func (i *natsInstaller) buildStatefulSetSpec(serviceName, configmapName, authSec
},
Spec: corev1.PodSpec{
NodeSelector: i.eventBus.Spec.NATS.Native.NodeSelector,
Tolerations: i.eventBus.Spec.NATS.Native.Tolerations,
Volumes: []corev1.Volume{
{
Name: "config-volume",
Expand Down
2 changes: 2 additions & 0 deletions controllers/eventsource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ func buildDeploymentSpec(args *AdaptorArgs) (*appv1.DeploymentSpec, error) {
Volumes: args.EventSource.Spec.Template.Volumes,
SecurityContext: args.EventSource.Spec.Template.SecurityContext,
NodeSelector: args.EventSource.Spec.Template.NodeSelector,
Tolerations: args.EventSource.Spec.Template.Tolerations,
Affinity: args.EventSource.Spec.Template.Affinity,
},
},
}
Expand Down
1 change: 1 addition & 0 deletions controllers/sensor/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func buildDeploymentSpec(args *AdaptorArgs) (*appv1.DeploymentSpec, error) {
Volumes: args.Sensor.Spec.Template.Volumes,
SecurityContext: args.Sensor.Spec.Template.SecurityContext,
NodeSelector: args.Sensor.Spec.Template.NodeSelector,
Tolerations: args.Sensor.Spec.Template.Tolerations,
},
},
}, nil
Expand Down
202 changes: 132 additions & 70 deletions pkg/apis/eventbus/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

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

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

15 changes: 14 additions & 1 deletion pkg/apis/eventbus/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/eventbus/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ type NativeStrategy struct {
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"`
// If specified, the pod's tolerations.
// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,8,rep,name=tolerations"`
}

// ContainerTemplate defines customized spec for a container
Expand Down
7 changes: 7 additions & 0 deletions pkg/apis/eventbus/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 adee1b5

Please sign in to comment.