Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Minio Fails to deploy on 1.9.4 due to ConfigMaps now being mounted ReadOnly #4272

Closed
dominik-bln opened this issue Mar 19, 2018 · 7 comments
Closed

Comments

@dominik-bln
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

BUG REPORT

Version of Helm and Kubernetes:

Helm 2.8.1
Kubernetes 1.9.4

Which chart:
stable/minio

What happened:
Since upgrading our cluster from 1.9.x to 1.9.4, Minio fails to start with the message time="2018-03-19T09:38:54Z" level=fatal msg="Unable to create configuration directories." cause="mkdir /root/.minio/certs: read-only file system" source="[server-main.go:143:serverMain()]"

What you expected to happen:

Minio starting up correctly

How to reproduce it (as minimally and precisely as possible):

Install the Minio Helm chart in an 1.9.4 cluster

Anything else we need to know:

Likely caused by this security fix:
kubernetes/kubernetes#58720

Also related:

#4166

@svmaris
Copy link
Contributor

svmaris commented Mar 19, 2018

I submitted PR’s for rabbitmq-ha (#4169) and grafana (#4271) to work around this issue. I dont’t use minio myself, but if we all agree this is an acceptable fix, someone could do the same for this Chart.

@svmaris
Copy link
Contributor

svmaris commented Mar 19, 2018

Related: #4267

@dominik-bln
Copy link
Author

dominik-bln commented Mar 19, 2018

Thanks. We've found a workaround that was ok for us until this is fixed more permanently was to set the K8s feature gate "ReadOnlyAPIDataVolumes" to false.

Be careful though, this opens you up to this issue: http://cve.circl.lu/cve/CVE-2017-1002102

@svmaris
Copy link
Contributor

svmaris commented Mar 19, 2018

@dominik-bln: That should work for now, but please note that the feature gate is marked as deprecated in k8s 1.10 and will be removed in 1.11

@seboudry
Copy link

Another quick fix is to specify (using a subPath) each files present in the configmap and mounted on minio container.
This way only specified mounted files are mounted as read-only. The whole config dir is now writeable by container.
Of course, an error will occurs if these files will be modified by minio.

Fix :

        volumeMounts:
        - mountPath: /root/.minio/config.json
          name: minio-server-config
          subPath: config.json
        - mountPath: /root/.minio/initialize
          name: minio-server-config
          subPath: initialize

@svmaris
Copy link
Contributor

svmaris commented Mar 21, 2018

@Secathor: I think mounting subPaths from secrets and configmaps was broken in 1.9.4 (kubernetes/kubernetes#61080) and fixed in 1.9.5.

@seboudry
Copy link

Using this fix on 1.7.14-gke.1 for now.

rolanddb pushed a commit to Eneco/charts that referenced this issue Apr 9, 2018
…refactor (helm#4281)

* Rename manifests to align with best practices

* Refactor minio chart

- add ingress resource
- consolidate svc resource to support all deployment modes
- update labels and selectors to align with helm best practices
- general cleanup to align with helm best practices/patterns observed in `helm create`
- update values, README and _helpers accordingly
- bump image tag
- bump chart version

* Fix issue caused by ConfigMaps now being mounted ReadOnly

Tested on:
k8s 1.8.10 and 1.9.6

Related:
kubernetes/kubernetes#58720

Fixes:
helm#4272

* Bump chart version to 1.0.0
ichtar pushed a commit to Bestmile/charts that referenced this issue May 15, 2018
…refactor (helm#4281)

* Rename manifests to align with best practices

* Refactor minio chart

- add ingress resource
- consolidate svc resource to support all deployment modes
- update labels and selectors to align with helm best practices
- general cleanup to align with helm best practices/patterns observed in `helm create`
- update values, README and _helpers accordingly
- bump image tag
- bump chart version

* Fix issue caused by ConfigMaps now being mounted ReadOnly

Tested on:
k8s 1.8.10 and 1.9.6

Related:
kubernetes/kubernetes#58720

Fixes:
helm#4272

* Bump chart version to 1.0.0
voron pushed a commit to dysnix/helm-charts that referenced this issue Sep 5, 2018
…refactor (helm#4281)

* Rename manifests to align with best practices

* Refactor minio chart

- add ingress resource
- consolidate svc resource to support all deployment modes
- update labels and selectors to align with helm best practices
- general cleanup to align with helm best practices/patterns observed in `helm create`
- update values, README and _helpers accordingly
- bump image tag
- bump chart version

* Fix issue caused by ConfigMaps now being mounted ReadOnly

Tested on:
k8s 1.8.10 and 1.9.6

Related:
kubernetes/kubernetes#58720

Fixes:
helm#4272

* Bump chart version to 1.0.0

Signed-off-by: voron <av@arilot.com>
manics pushed a commit to ome/minio-helm-chart that referenced this issue Oct 8, 2018
…refactor (#4281)

* Rename manifests to align with best practices

* Refactor minio chart

- add ingress resource
- consolidate svc resource to support all deployment modes
- update labels and selectors to align with helm best practices
- general cleanup to align with helm best practices/patterns observed in `helm create`
- update values, README and _helpers accordingly
- bump image tag
- bump chart version

* Fix issue caused by ConfigMaps now being mounted ReadOnly

Tested on:
k8s 1.8.10 and 1.9.6

Related:
kubernetes/kubernetes#58720

Fixes:
helm/charts#4272

* Bump chart version to 1.0.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants