Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: quoting s3 secret key #44

Merged
merged 3 commits into from
Aug 25, 2023
Merged

Conversation

prometherion
Copy link
Member

Closes #43.

Please @Heiko-san, may I ask you for a review of this?

I used the following values:

backup:
  enabled: true
  s3:
    url: http://mys3storage:9000
    bucket: mybucket
    retention: "--expiry-days 7" #"
    accessKey: minio
    secretKey: 'xY%foo$ba)R'

And the resulting Job specification is the following:

              - |-                   
                cd /opt/etcd-dump                                                                        
                if $MC alias set myminio http://mys3storage:9000 minio "xY%foo$ba)R" \
                && $MC ping myminio -c 3 -e 3 ; then 
                  echo -e "\nUploading snapshot(s):" 
                  $MC cp mysnapshot_*.db myminio/mybucket
                else        
                  echo -e "\nERROR: S3 storage could not be configured;\nCheck your S3 URL/Credentials or network connectivity"
                  exit 1
                fi

Copy link
Contributor

@ptx96 ptx96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@prometherion
Copy link
Member Author

Switched over environment variables, please, @ptx96 @Heiko-san, can you review it?

@prometherion
Copy link
Member Author

@ptx96 latest commits are supporting the credentials retrieval from an external object, such as a Secret.

@Heiko-san
Copy link

Both approaches (secret ref & quoted value) work great in our setup!
Thanks :)

@prometherion prometherion merged commit a29530e into clastix:master Aug 25, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for externally referenced S3 credentials and quoted plain values
3 participants