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

update maxInSpecOffset to 1500 from 100 issue #6 #4

Closed
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 30 additions & 0 deletions .github/workflows/build-daemon-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy Daemon Images to GHCR
env:
DOTNET_VERSION: '6.0.x'
on:
push:
branches:
- master
workflow_dispatch:
jobs:
push-daemon-image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: '.'
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@main

- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: 'Build Daemon Image'
run: |
make image
make push

8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.18 AS builder
WORKDIR /go/src/github.com/openshift/linuxptp-daemon
FROM golang:1.22.4 AS builder
WORKDIR /go/src/github.com/k8snetworkplumbingwg/linuxptp-daemon
COPY . .
RUN make clean && make

FROM registry.ci.openshift.org/ocp/4.18:base-rhel9
FROM quay.io/centos/centos:stream9

RUN yum -y update && yum -y update glibc && yum --setopt=skip_missing_names_on_install=False -y install linuxptp ethtool hwdata synce4l && yum clean all

Expand All @@ -17,6 +17,6 @@ RUN ln -s /usr/sbin/gpsd /usr/local/sbin/gpsd
RUN ln -s /usr/bin/ubxtool /usr/local/bin/ubxtool


COPY --from=builder /go/src/github.com/openshift/linuxptp-daemon/bin/ptp /usr/local/bin/
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/linuxptp-daemon/bin/ptp /usr/local/bin/

CMD ["/usr/local/bin/ptp"]
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ default:
./hack/build.sh
image:
./hack/build-image.sh
push:
docker push ghcr.io/k8snetworkplumbingwg/linuxptp-daemon-image:latest
clean:
./hack/cleanup.sh
fmt:
Expand Down
4 changes: 2 additions & 2 deletions addons/generic/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package generic
import (
"encoding/json"
"github.com/golang/glog"
"github.com/openshift/linuxptp-daemon/pkg/plugin"
ptpv1 "github.com/openshift/ptp-operator/api/v1"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/pkg/plugin"
ptpv1 "github.com/k8snetworkplumbingwg/ptp-operator/api/v1"
)

type GenericPluginData struct {
Expand Down
2 changes: 1 addition & 1 deletion addons/intel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
settings:
LocalMaxHoldoverOffSet: 1500
LocalHoldoverTimeout: 14400
MaxInSpecOffset: 100
MaxInSpecOffset: 1500
phaseOffsetPins:
ens2f0:
boardLabel: GNSS-1PPS
Expand Down
6 changes: 3 additions & 3 deletions addons/intel/e810.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"strings"

"github.com/golang/glog"
"github.com/openshift/linuxptp-daemon/pkg/dpll"
"github.com/openshift/linuxptp-daemon/pkg/plugin"
ptpv1 "github.com/openshift/ptp-operator/api/v1"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/pkg/dpll"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/pkg/plugin"
ptpv1 "github.com/k8snetworkplumbingwg/ptp-operator/api/v1"
)

type E810Opts struct {
Expand Down
2 changes: 1 addition & 1 deletion addons/intel/intel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"
"testing"

ptpv1 "github.com/openshift/ptp-operator/api/v1"
ptpv1 "github.com/k8snetworkplumbingwg/ptp-operator/api/v1"
"github.com/stretchr/testify/assert"
"sigs.k8s.io/yaml"
)
Expand Down
4 changes: 2 additions & 2 deletions addons/intel/phaseAdjust.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"

"github.com/golang/glog"
dpll "github.com/openshift/linuxptp-daemon/pkg/dpll-netlink"
ptpv1 "github.com/openshift/ptp-operator/api/v1"
dpll "github.com/k8snetworkplumbingwg/linuxptp-daemon/pkg/dpll-netlink"
ptpv1 "github.com/k8snetworkplumbingwg/ptp-operator/api/v1"
"sigs.k8s.io/yaml"
)

Expand Down
2 changes: 1 addition & 1 deletion addons/intel/testdata/profile-with-delays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ plugins:
settings:
LocalHoldoverTimeout: 14400
LocalMaxHoldoverOffSet: 1500
MaxInSpecOffset: 100
MaxInSpecOffset: 1500
ublxCmds:
- args:
- -P
Expand Down
6 changes: 3 additions & 3 deletions addons/mapping.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package mapping

import (
"github.com/openshift/linuxptp-daemon/addons/generic"
"github.com/openshift/linuxptp-daemon/addons/intel"
"github.com/openshift/linuxptp-daemon/pkg/plugin"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/addons/generic"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/addons/intel"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/pkg/plugin"
)

var PluginMapping = map[string]plugin.New{
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.art → addons/redhat/Dockerfile.ocp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder
WORKDIR /go/src/github.com/openshift/linuxptp-daemon
WORKDIR /go/src/github.com/josephdrichard/linuxptp-daemon
WORKDIR /go/src/github.com/k8snetworkplumbingwg/linuxptp-daemon
COPY . .
RUN make clean && make

Expand All @@ -18,7 +20,7 @@ RUN ln -s /usr/bin/gpspipe /usr/local/bin/gpspipe
RUN ln -s /usr/sbin/gpsd /usr/local/sbin/gpsd
RUN ln -s /usr/bin/ubxtool /usr/local/bin/ubxtool

COPY --from=builder /go/src/github.com/openshift/linuxptp-daemon/bin/ptp /usr/local/bin/
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/linuxptp-daemon/bin/ptp /usr/local/bin/
COPY ./extra/leap-seconds.list /usr/share/zoneinfo/leap-seconds.list

CMD ["/usr/local/bin/ptp"]
10 changes: 5 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"github.com/golang/glog"
"k8s.io/client-go/kubernetes"

"github.com/openshift/linuxptp-daemon/pkg/config"
"github.com/openshift/linuxptp-daemon/pkg/daemon"
"github.com/openshift/linuxptp-daemon/pkg/leap"
ptpv1 "github.com/openshift/ptp-operator/api/v1"
ptpclient "github.com/openshift/ptp-operator/pkg/client/clientset/versioned"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/pkg/config"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/pkg/daemon"
"github.com/k8snetworkplumbingwg/linuxptp-daemon/pkg/leap"
ptpv1 "github.com/k8snetworkplumbingwg/ptp-operator/api/v1"
ptpclient "github.com/k8snetworkplumbingwg/ptp-operator/pkg/client/clientset/versioned"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)
Expand Down
2 changes: 1 addition & 1 deletion glide.lock

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

4 changes: 2 additions & 2 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package: github.com/openshift/linuxptp-daemon
package: github.com/k8snetworkplumbingwg/linuxptp-daemon
import:
- package: github.com/jaypipes/ghw
version: ^0.4.0
Expand All @@ -24,6 +24,6 @@ import:
- package: k8s.io/klog
version: ^0.4.0
- package: github.com/golang/glog
- package: github.com/openshift/ptp-operator
- package: github.com/k8snetworkplumbingwg/ptp-operator
- package: github.com/fsnotify/fsnotify
version: ^1.4.7
42 changes: 21 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/openshift/linuxptp-daemon
module github.com/k8snetworkplumbingwg/linuxptp-daemon

go 1.22

Expand All @@ -8,41 +8,42 @@ require (
github.com/golang/glog v1.1.0
github.com/google/goexpect v0.0.0-20210430020637-ab937bf7fd6f
github.com/jaypipes/ghw v0.12.0
github.com/k8snetworkplumbingwg/ptp-operator v0.0.0-20241128072615-fc8a95491c23
github.com/mdlayher/genetlink v1.3.2
github.com/mdlayher/netlink v1.7.2
github.com/openshift/ptp-operator v0.0.0-20240623153039-2f8235d2dad8
github.com/prometheus/client_golang v1.16.0
github.com/sirupsen/logrus v1.9.0
github.com/sirupsen/logrus v1.9.3
github.com/stratoberry/go-gpsd v1.1.0
github.com/stretchr/testify v1.8.2
golang.org/x/sync v0.10.0
k8s.io/api v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/yaml v1.3.0
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3
sigs.k8s.io/yaml v1.4.0
)

require (
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/goterm v0.0.0-20190703233501-fc88cf888a3f // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -64,28 +65,27 @@ require (
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
howett.net/plist v1.0.0 // indirect
k8s.io/apiextensions-apiserver v0.28.3 // indirect
k8s.io/component-base v0.28.3 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
sigs.k8s.io/controller-runtime v0.16.3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
Loading