Skip to content

Commit

Permalink
formatting code
Browse files Browse the repository at this point in the history
  • Loading branch information
Gwonsoo Lee committed Jun 9, 2020
1 parent f9e0b98 commit 6dab6ec
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions examples/eventlisteners/eventlistener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ metadata:
name: listener
spec:
serviceAccountName: tekton-triggers-example-sa
# podTemplate:
# tolerations:
# - key: key
# value: value
# operator: Equal
# effect: NoSchedule
# podTemplate:
# tolerations:
# - key: key
# value: value
# operator: Equal
# effect: NoSchedule
triggers:
- name: foo-trig
bindings:
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/triggers/v1alpha1/event_listener_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ type EventListenerSpec struct {
ServiceAccountName string `json:"serviceAccountName"`
Triggers []EventListenerTrigger `json:"triggers"`
ServiceType corev1.ServiceType `json:"serviceType,omitempty"`
PodTemplate PodTemplate `json:"podTemplate,omitempty"`
PodTemplate PodTemplate `json:"podTemplate,omitempty"`
}

type PodTemplate struct {
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
}

// EventListenerTrigger represents a connection between TriggerBinding, Params,
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/v1alpha1/eventlistener/eventlistener.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func (c *Reconciler) reconcileDeployment(el *v1alpha1.EventListener) error {
Labels: labels,
},
Spec: corev1.PodSpec{
Tolerations: el.Spec.PodTemplate.Tolerations,
Tolerations: el.Spec.PodTemplate.Tolerations,
ServiceAccountName: el.Spec.ServiceAccountName,
Containers: []corev1.Container{container},

Expand Down
12 changes: 6 additions & 6 deletions pkg/reconciler/v1alpha1/eventlistener/eventlistener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ var (
Name: reconcilerNamespace,
},
}
reconcileKey = fmt.Sprintf("%s/%s", namespace, eventListenerName)
updateLabel = map[string]string{"update": "true"}
updatedSa = "updatedSa"
updateTolerations = []corev1.Toleration{
reconcileKey = fmt.Sprintf("%s/%s", namespace, eventListenerName)
updateLabel = map[string]string{"update": "true"}
updatedSa = "updatedSa"
updateTolerations = []corev1.Toleration{
{
Key: "key",
Operator: "Equal",
Expand Down Expand Up @@ -296,7 +296,7 @@ func Test_reconcileDeployment(t *testing.T) {
Labels: generatedLabels,
},
Spec: corev1.PodSpec{
Tolerations: eventListener0.Spec.PodTemplate.Tolerations,
Tolerations: eventListener0.Spec.PodTemplate.Tolerations,
ServiceAccountName: eventListener0.Spec.ServiceAccountName,
Containers: []corev1.Container{
{
Expand Down Expand Up @@ -605,7 +605,7 @@ func TestReconcile(t *testing.T) {
Labels: generatedLabels,
},
Spec: corev1.PodSpec{
Tolerations: eventListener0.Spec.PodTemplate.Tolerations,
Tolerations: eventListener0.Spec.PodTemplate.Tolerations,
ServiceAccountName: eventListener0.Spec.ServiceAccountName,
Containers: []corev1.Container{{
Name: "event-listener",
Expand Down

0 comments on commit 6dab6ec

Please sign in to comment.