In this example, we will configure the binary provider to use direct-s3 with an IAM role as it is the recommended provider for using a block provider like s3. For additional options, you may also refer to the documentation for the filestore provider.
Please note that even though your filestore is now based on S3, the deployment will still attempt to create one PersistentVolumeClaim (PVC) per pod to persist the Artifactory home folder, which includes all your configurations and logs. Ensure that you have a default StorageClass set up to provision these PVCs, or specify the desired StorageClass name that you wish to use. If you do not need to persist logs and configurations, you also have the option to disable persistence.
To set up your direct-s3 binarystore
Create the binarystore.xml secret or pull the values from environment variables.
$ kubectl create secret generic my-binarystore --from-file=binarystore.xml
binarystore.xml:
<config version="2">
<chain>
<provider id="cache-fs" type="cache-fs">
<provider id="s3-storage-v3" type="s3-storage-v3"/>
</provider>
</chain>
<provider id="s3-storage-v3" type="s3-storage-v3">
<endpoint>s3.amazonaws.com</endpoint>
<bucketName>bucketName</bucketName>
<path>pathPrefix</path>
<usePresigning>true</usePresigning>
<signatureExpirySeconds>600</signatureExpirySeconds>
<maxConnections>50</maxConnections>
<connectionTimeout>10000</connectionTimeout>
<useInstanceCredentials>true</useInstanceCredentials>
</provider>
<provider type="cache-fs" id="cache-fs">
<maxCacheSize>5000000000</maxCacheSize>
</provider>
</config>
Then, create an IAM role with AmazonS3FullAccess permission
Associate an IAM role to the service account in values-artifactory.yaml by specifying the ARN:
serviceAccount:
create: true
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<IAM_ROLE_NAME>
We will add the properties above to the values.yaml
artifactory:
serviceAccount:
create: true
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::<ACCOUNT_ID>:role/<IAM_ROLE_NAME>
persistence:
enabled: true
storageClassName: myclass
accessMode: ReadWriteOnce
size: 100Gi
customBinarystoreXmlSecret: my-binarystore