zhangansong K8S:v1.18.8 KubeSphere:3.0 storageclass:ceph.com/cephfs 问题描述:安装了devops后按官方文档安装 sonarqube ,postgresql 有状态应用提示报错 postgresql 08:23:11.05 postgresql 08:23:11.05 Welcome to the Bitnami postgresql container postgresql 08:23:11.05 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-postgresql postgresql 08:23:11.05 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-postgresql/issues postgresql 08:23:11.05 Send us your feedback at containers@bitnami.com postgresql 08:23:11.05 postgresql 08:23:11.06 INFO ==> ** Starting PostgreSQL setup ** postgresql 08:23:11.10 INFO ==> Validating settings in POSTGRESQL_* env vars.. postgresql 08:23:11.11 INFO ==> Loading custom pre-init scripts... postgresql 08:23:11.11 INFO ==> Initializing PostgreSQL database... mkdir: cannot create directory ‘/bitnami/postgresql/data’: Permission denied postgresql 08:23:11.12 INFO ==> Stopping PostgreSQL...
zackzhang zhangansong 参考这个,创建个volume挂载下 https://github.com/bitnami/bitnami-docker-postgresql/issues/242 master: extraVolumeMounts: - name: writableconf mountPath: /opt/bitnami/postgresql/conf - name: writableconfd mountPath: /opt/bitnami/postgresql/conf/conf.d - name: writabletmp mountPath: /opt/bitnami/postgresql/tmp extraVolumes: - name: writableconf emptyDir: {} - name: writableconfd emptyDir: {} - name: writabletmp emptyDir: {}
zhangansong helm pull ks-main/sonarqube tar zxvf sonarqube-6.6.0.tgz vim ./sonarqube/charts/postgresql/values.yaml volumePermissions: enabled: true 修改 volumePermissions 为 true 后进行安装,问题解决。