这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@pixxon
Copy link
Contributor

@pixxon pixxon commented Oct 11, 2022

Docker Swarm allows the user to define secrets, that are encoding and used to store secrets.
Minio already supports them, by supplying environment variables ending in _FILE.
This PR allows AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to be configured in a similar way.

Copy link
Member

@m90 m90 left a comment

Choose a reason for hiding this comment

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

This is great, thank you very much. It's not clear to me why envconfig does not want to support this (kelseyhightower/envconfig#130), but this approach should work too.

Three things:

  • I left some nitpicky comments inline, mostly about Go conventions
  • Could you add this feature to the documentation as well?
  • Could you try logging in to CircleCI using your GitHub credentials and see if this makes it build the PR? Right now, there is some error message I don't fully understand about how it cannot find a config file (when there is a config file clearly).

@pixxon
Copy link
Contributor Author

pixxon commented Oct 12, 2022

I left some nitpicky comments inline, mostly about Go conventions

Thanks, I am not familiar with Go at all, so just whiffed most of the code.

Could you add this feature to the documentation as well?

I have added docs for the envvars and some usage guide as well. Hopefully it's enough.

Could you try logging in to CircleCI using your GitHub credentials and see if this makes it build the PR? Right now, there is some error message I don't fully understand about how it cannot find a config file (when there is a config file clearly).

I've logged in, seems to be doing a lot better now, hopefully turns green by the end of it.

It's not clear to me why envconfig does not want to support this

I assume they want a general library and not something that is specific to mostly containers. ( Although files could be used for non containerized sensitive data as well, but definietly more rarely. )

@pixxon
Copy link
Contributor Author

pixxon commented Oct 12, 2022

There is an issue with volume handling when the stack is deleted. ( Something that I ran into locally. )

When the stack is deleted, the volumes are left over and there is no flag ( as in for docker-compose ) to delete these leftover volumes. I went ahead and added a hack to make sure these are deleted, but it's not pretty.

Copy link
Member

@m90 m90 left a comment

Choose a reason for hiding this comment

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

Brilliant, thank you 🎩 - I think I should get around to merging and releasing this maybe tonight or tomorrow in any case. I will let you know here when it's done.

@pixxon
Copy link
Contributor Author

pixxon commented Oct 12, 2022

Thanks! I will probably deploy them once they are out, the plain text passwords been annoying me for some time now.

@m90 m90 merged commit b5cc126 into offen:main Oct 12, 2022
@m90
Copy link
Member

m90 commented Oct 12, 2022

This is now released in v2.22.0. Thanks for your contribution.

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.

2 participants