!错误没有配置持久存储类型。 - 无法部署 Spinnaker

! ERROR No persistent storage type was configured. - Failed to deploy Spinnaker

我有一个问题,当我想更新 spinnaker 或设置松弛通知时,当我 运行 hal deploy apply 命令时,我得到 ! ERROR No persistent storage type was configured.- Failed to deploy Spinnaker.

root@HP:~# hal config notification slack enable
+ Get current deployment
  Success
+ Edit slack settings
  Success
+ Successfully enabled slack
root@HP:~# hal config notification slack edit --bot-name spinnaker --token *******48UWQ
+ Get current deployment
  Success
+ Get slack notification
  Success
+ Edit the slack notification
  Success
+ Edited slack.
root@HP:~# hal deploy apply
+ Get current deployment
  Success
+ Prep deployment
  Success
Validation in default.stats:
- INFO Stats are currently ENABLED. Usage statistics are being
  collected. Thank you! These stats inform improvements to the product, and that
  helps the community. To disable, run `hal config stats disable`. To learn more
  about what and how stats data is used, please see
  https://www.spinnaker.io/community/stats.

+ Preparation complete... deploying Spinnaker
+ Get current deployment
  Success
- Apply deployment
  Failure
Validation in Global:
! ERROR No persistent storage type was configured.

- Failed to deploy Spinnaker.

更新。 这很有可能都是S3的错误,他需要持久化存储来指明,但是我按照官方文档的时候,又出现了一个错误

user@HP:~/.aws$ hal config storage s3 edit
+ Get current deployment
  Success
+ Get persistent store
  Success
Generated bucket name: spin-*****-*****-*****-*****
- Edit persistent store
  Failure
Validation in default.persistentStorage:
- WARNING Your deployment will most likely fail until you configure
  and enable a persistent store.

Validation in default.persistentStorage.s3:
! ERROR Failed to ensure the required bucket
  "spin-*****-*****-*****-*****" exists: Unable to load AWS
  credentials from any provider in the chain:
  [EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from
  environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY
  (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load
  AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey),
  WebIdentityTokenCredentialsProvider: You must specify a value for roleArn and
  roleSessionName, com.amazonaws.auth.profile.ProfileCredentialsProvider@1239df9e:
  No AWS profile named 'default',
  com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@5139efc8: Failed to
  connect to service endpoint: ]

- Failed to edit persistent store "s3".

请记住,推荐的 Spinnaker 安装方式是在 Kubernetes 集群中。除非您使用可以在任何 Compute 实例中安全 运行 的 Minnaker 项目,例如 EC2 ubuntu 18.04

对于您的情况,请确保您的 AWS 帐户具有 AWS S3 的权限。如果您使用来自容器、实例或 Kubernetes Pod 的吊索,请确保您使用的是具有 AWS S3 所需权限的 AWS IAM 用户或角色。请参阅 Spinnaker 文档以编辑 Storage(https://spinnaker.io/setup/install/storage/s3/#editing-your-storage-settings)

如果您之前使用正确的 AWS IAM 策略创建了 AWS IAM 用户,完整命令应该是

hal config storage s3 edit \
--access-key-id $YOUR_ACCESS_KEY_ID \
--secret-access-key \
--region $REGION

记得在 Slack Community 中加入 Spinnaker 以获取更多问题

就我而言,我错过了这个命令:

hal config storage edit --type s3

它应该在 hal config storage s3 edit ...

之后