Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bindata/linuxptp/ptp-daemon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
- name: cloud-event-proxy
image: {{ .SideCar }}
imagePullPolicy: {{ .ImagePullPolicy }}
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
args:
- "--metrics-addr=127.0.0.1:9091"
- "--store-path=/store"
Expand Down Expand Up @@ -69,6 +72,9 @@ spec:
- name: kube-rbac-proxy
image: {{.KubeRbacProxy}}
imagePullPolicy: IfNotPresent
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
args:
- --logtostderr
- --secure-listen-address=:8443
Expand All @@ -92,6 +98,7 @@ spec:
- name: linuxptp-daemon-container
securityContext:
privileged: true
readOnlyRootFilesystem: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do write files

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where? If in volumes, that is fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/var/run and /etc/linuxptp/ at least.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good feedback. I will wait for the AWS deploy-ec2 CI to get fixed (currently broken). Then, I will handle directories needing write access. I expect CI to be able to validate my PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, those two /var/run and /etc/linuxptp are already volumes. Those are not impacted by the read-only filesystem.

image: {{.Image}}
imagePullPolicy: {{.ImagePullPolicy}}
command: [ "/bin/bash", "-c", "--" ]
Expand Down
5 changes: 4 additions & 1 deletion bundle/manifests/ptp-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ metadata:
categories: Networking
certified: "false"
containerImage: quay.io/openshift/origin-ptp-operator:4.21
createdAt: "2025-11-20T09:31:49Z"
createdAt: "2025-11-24T19:07:25Z"
description: This software enables configuration of Precision Time Protocol(PTP)
on Kubernetes. It detects hardware capable PTP devices on each node, and configures
linuxptp processes such as ptp4l, phc2sys and timemaster.
Expand Down Expand Up @@ -433,6 +433,9 @@ spec:
requests:
cpu: 50m
memory: 100Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
Expand Down
6 changes: 6 additions & 0 deletions config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ spec:
containers:
- name: kube-rbac-proxy
image: quay.io/openshift/origin-kube-rbac-proxy:4.15
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
Expand All @@ -21,6 +24,9 @@ spec:
- containerPort: 8443
name: https
- name: manager
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8080"
Expand Down
3 changes: 3 additions & 0 deletions config/default/manager_webhook_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ spec:
spec:
containers:
- name: ptp-operator
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
ports:
- containerPort: 9443
name: webhook-server
Expand Down
3 changes: 3 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
image: controller
command:
- ptp-operator
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
args:
- --enable-leader-election
- --logtostderr
Expand Down
5 changes: 4 additions & 1 deletion manifests/stable/ptp-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ metadata:
categories: Networking
certified: "false"
containerImage: quay.io/openshift/origin-ptp-operator:4.21
createdAt: "2025-11-20T09:31:49Z"
createdAt: "2025-11-24T19:07:25Z"
description: This software enables configuration of Precision Time Protocol(PTP)
on Kubernetes. It detects hardware capable PTP devices on each node, and configures
linuxptp processes such as ptp4l, phc2sys and timemaster.
Expand Down Expand Up @@ -433,6 +433,9 @@ spec:
requests:
cpu: 50m
memory: 100Mi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
Expand Down
Loading