将来的你会感谢现在努力的自己,骚年,趁年轻多努力学习 ------ Jasper_boy

harbor使用aws s3存储

参考:http://www.vmtocloud.com/how-to-configure-harbor-registry-to-use-amazon-s3-storage/

 

s3 bucket权限:更改自己的bucket名称

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:PutAccountPublicAccessBlock",
                "s3:GetAccountPublicAccessBlock",
                "s3:ListAllMyBuckets",
                "s3:HeadBucket"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::stag-harbor/*",
                "arn:aws:s3:::stag-harbor"
            ]
        }
    ]
}

 

在harbor/common/templates/registry/config.yml文件末尾增加如下段,更改自己的aws s3 id key bucket

storage:
  s3:
    accesskey: Axxxxxxxxxxxxxx
    secretkey: xxxxxxxxxxxxxxxxxxxxxxx
    region: ap-southeast-1
    bucket: stag-harbor
    secure: false

 

posted @ 2018-12-29 16:31  Jasper_boy  阅读(1784)  评论(0编辑  收藏  举报