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

deploying telegraf-ds in openshift 4.14 fails #635

Open
yellowpattern opened this issue Apr 17, 2024 · 3 comments
Open

deploying telegraf-ds in openshift 4.14 fails #635

yellowpattern opened this issue Apr 17, 2024 · 3 comments

Comments

@yellowpattern
Copy link

I tried to deploy telegraf-ds onto OpenShift 4.14 but ran into this:
Error creating: pods "telegraf-ds-" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, provider "pipelines-scc": Forbidden: not usable by user or serviceaccount, provider "dcp-hostnework-scc": Forbidden: not usable by user or serviceaccount, provider "dcp-scc": Forbidden: not usable by user or serviceaccount, spec.volumes[0]: Invalid value: "hostPath": hostPath volumes are not allowed to be used, spec.volumes[1]: Invalid value: "hostPath": hostPath volumes are not allowed to be used, spec.volumes[2]: Invalid value: "hostPath": hostPath volumes are not allowed to be used, provider "restricted": Forbidden: not usable by user or serviceaccount, provider "containerized-data-importer": Forbidden: not usable by user or serviceaccount, provider "nonroot-v2": Forbidden: not usable by user or serviceaccount, provider "nonroot": Forbidden: not usable by user or serviceaccount, provider "noobaa-db": Forbidden: not usable by user or serviceaccount, provider "noobaa-endpoint": Forbidden: not usable by user or serviceaccount, provider "hostmount-anyuid": Forbidden: not usable by user or serviceaccount, provider "kubevirt-controller": Forbidden: not usable by user or serviceaccount, provider "machine-api-termination-handler": Forbidden: not usable by user or serviceaccount, provider "bridge-marker": Forbidden: not usable by user or serviceaccount, provider "hostnetwork-v2": Forbidden: not usable by user or serviceaccount, provider "hostnetwork": Forbidden: not usable by user or serviceaccount, provider "hostaccess": Forbidden: not usable by user or serviceaccount, provider "linux-bridge": Forbidden: not usable by user or serviceaccount, provider "kubevirt-handler": Forbidden: not usable by user or serviceaccount, provider "rook-ceph": Forbidden: not usable by user or serviceaccount, provider "node-exporter": Forbidden: not usable by user or serviceaccount, provider "rook-ceph-csi": Forbidden: not usable by user or serviceaccount, provider "privileged": Forbidden: not usable by user or serviceaccount]

@yellowpattern
Copy link
Author

I ran this to "workaround" the problem:

oc adm policy add-scc-to-user privileged system:serviceaccount:telegraf:telegraf-ds

And now I get these events from the telegraf-ds pods:

MountVolume.SetUp failed for volume "docker-socket" : hostPath type check failed: /var/run/docker.sock is not a socket file
Unable to attach or mount volumes: unmounted volumes=[docker-socket], unattached volumes=[], failed to process volumes=[]: timed out waiting for the condition

Deleting that section from the configMap and template resolved that... but shouldn't be required.

@fcolomas
Copy link

This happens to me too, on OKD, I think is because they use CRI.O for the containers...

@fcolomas
Copy link

Also on the config map you have this:

{{- if .Values.config.docker_endpoint }}
[[inputs.docker]]
endpoint = {{ .Values.config.docker_endpoint | quote }}
{{- end }}

Is supposed if there is the docket_endpoint on the values.yaml then it will be configured, I removed that but also get the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants