We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
kube-psp-advisor detects that a specified daemonset wants to use the host network, but unable to detect host port in policy generation
kube-psp-advisor
To Reproduce Steps to reproduce the behavior:
Create a new file called example_ds.yaml with the following contents:
example_ds.yaml
apiVersion: apps/v1 kind: DaemonSet metadata: name: node-exporter namespace: kube-system labels: k8s-app: node-exporter spec: selector: matchLabels: k8s-app: node-exporter updateStrategy: type: OnDelete template: metadata: labels: k8s-app: node-exporter spec: priorityClassName: system-node-critical containers: - name: node-exporter image: "node-exporter:latest" command: ["/opt/prometheus/kubernetes.sh"] ports: - name: metrics containerPort: 22000 hostPort: 22000 volumeMounts: - name: proc mountPath: /host/proc readOnly: true - name: sys mountPath: /host/sys readOnly: true resources: limits: memory: 50Mi requests: cpu: 100m memory: 50Mi hostNetwork: true hostPID: true volumes: - name: proc hostPath: path: /proc - name: sys hostPath: path: /sys
Download kube-psp-advisor from https://github.com/sysdiglabs/kube-psp-advisor/releases/tag/v1.7.0 and run it as:
./kubectl-advise-psp convert --podFile example-ds.yaml --pspFile node-exporter-psp.yaml
The generated psp file will have:
apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: creationTimestamp: null name: pod-security-policy-default-20200519154748 spec: allowedHostPaths: - pathPrefix: /proc readOnly: true - pathPrefix: /sys readOnly: true fsGroup: rule: RunAsAny hostNetwork: true hostPID: true runAsUser: rule: RunAsAny seLinux: rule: RunAsAny supplementalGroups: rule: RunAsAny volumes: - hostPath - secret
Expected behavior I expected the hostPorts to be present in the generated PSP file above.
hostPorts
The text was updated successfully, but these errors were encountered:
@amitsaha thanks for reporting this, I will address it asap.
Sorry, something went wrong.
#39: add support port range generation
5104786
Signed-off-by: kaizhe <derek0405@gmail.com>
#39: add support port range generation (#40)
7addc41
addressed in #40
Kaizhe
No branches or pull requests
Describe the bug
kube-psp-advisor
detects that a specified daemonset wants to use the host network, but unable to detect host port in policy generationTo Reproduce
Steps to reproduce the behavior:
Create a new file called
example_ds.yaml
with the following contents:Download kube-psp-advisor from https://github.com/sysdiglabs/kube-psp-advisor/releases/tag/v1.7.0
and run it as:
The generated psp file will have:
Expected behavior
I expected the
hostPorts
to be present in the generated PSP file above.The text was updated successfully, but these errors were encountered: