簡體   English   中英

Helm Sentry安裝在部署時失敗:initdb:無法更改目錄的權限

[英]Helm Sentry installation failed on deployment: initdb: could not change permissions of directory

我有一個本地Openshift實例,在該實例中,我嘗試使用舵安裝Sentry:

helm install --name sentry --wait stable/sentry

除了PostgreSQL pod(也作為Sentry的依賴項部署)以外,其他所有pod都可以良好部署。 此Pod的初始化失敗,顯示為CrashLoopBackOff ,並且日志顯示以下內容:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: could not change permissions of directory "/var/lib/postgresql/data/pgdata": Operation not permitted

不知道從哪里開始解決此問題,所以我可以成功部署哨兵及其所有依賴項

通過向用於在Pod上運行命令的服務帳戶添加權限,解決了該問題。 在我的情況下,使用的是OpenShift上的默認服務帳戶。 我使用cli向此服務帳戶添加了適當的權限:

oc adm policy add-scc-to-user anyuid -z default --as system:admin

另請參閱: https : //blog.openshift.com/understanding-service-accounts-sccs/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM