diff --git a/platform/kubernetes.go b/platform/kubernetes.go index c21a6f7..9417d19 100644 --- a/platform/kubernetes.go +++ b/platform/kubernetes.go @@ -11,7 +11,6 @@ import ( "path" "time" - "github.com/alcounit/selenosis/tools" apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -240,6 +239,7 @@ func (cl *Client) Create(layout *ServiceSpec) (*Service, error) { RestartPolicy: apiv1.RestartPolicyNever, Affinity: &layout.Template.Spec.Affinity, DNSConfig: &layout.Template.Spec.DNSConfig, + Tolerations: layout.Template.Spec.Tolerations, ImagePullSecrets: getImagePullSecretList(cl.imagePullSecretName), }, } @@ -323,7 +323,6 @@ func (cl *Client) Create(layout *ServiceSpec) (*Service, error) { cancel() }, Started: pod.CreationTimestamp.Time, - Uptime: tools.TimeElapsed(pod.CreationTimestamp.Time), } return svc, nil @@ -377,7 +376,6 @@ func (cl *Client) List() ([]*Service, error) { }, Status: status, Started: pod.CreationTimestamp.Time, - Uptime: tools.TimeElapsed(pod.CreationTimestamp.Time), } services = append(services, service) } @@ -417,7 +415,6 @@ func (cl Client) Watch() <-chan Event { }, Status: status, Started: pod.CreationTimestamp.Time, - Uptime: tools.TimeElapsed(pod.CreationTimestamp.Time), } } diff --git a/platform/platform.go b/platform/platform.go index 48e22b0..1571731 100644 --- a/platform/platform.go +++ b/platform/platform.go @@ -24,6 +24,7 @@ type Spec struct { NodeSelector map[string]string `yaml:"nodeSelector,omitempty" json:"nodeSelector,omitempty"` Affinity apiv1.Affinity `yaml:"affinity,omitempty" json:"affinity,omitempty"` DNSConfig apiv1.PodDNSConfig `yaml:"dnsConfig,omitempty" json:"dnsConfig,omitempty"` + Tolerations []apiv1.Toleration `yaml:"tolerations,omitempty" json:"tolerations,omitempty"` } //BrowserSpec describes settings for Service diff --git a/storage/storage.go b/storage/storage.go index 4a409fd..db0cae1 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -4,6 +4,7 @@ import ( "sync" "github.com/alcounit/selenosis/platform" + "github.com/alcounit/selenosis/tools" ) //Storage ... @@ -41,6 +42,7 @@ func (s *Storage) List() []platform.Service { for _, p := range s.sessions { c := *p + c.Uptime = tools.TimeElapsed(c.Started) l = append(l, c) } return l