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

feat(kubernetes,google): Support retrieving config files from config server. #3812

Merged
merged 6 commits into from
Jun 27, 2019

Conversation

scottfrederick
Copy link
Contributor

This PR adds support for reading files from an external Spring Cloud Config Server backend (e.g. a git repository) for the purposes of keeping account secrets out of Spinnaker configuration files. See the design document for more information: https://docs.google.com/document/d/1Y7SIgobc8_CCFmFZLRUGl-76sfHWlprFYGy992S5U4A/edit#heading=h.sai17pl3aws8.

The following fields have external configuration enabled with these changes:

  • kubernetes account field kubeconfig
  • google account fields json-path and user-data-file

If these fields have a value that starts with configserver: then the value following the prefix will be loaded as a resource from a Config Server. Without the prefix the value will be used as an absolute path to a file on the filesystem as before.

The google account fields are read from the Config Server backend into memory on the clouddriver pod, and are never written to the filesystem. The kubernetes kubeconfig must be read from Config Server and stored as a temp file on the pod filesystem because the Fabric8 API used by the v1 provider and the kubectl commands used by the v2 provider both require a local file. This is an incremental improvement over storing kubernetes context info as a persistent file on the pod filesystem, as the temp file is more obfuscated and ephemeral, but we should investigate a way to remove this need for a temp file.

Copy link
Contributor

@ezimanyi ezimanyi left a comment

Choose a reason for hiding this comment

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

This looks great! A few localized comments inline, but in general this looks really good.

Copy link
Contributor

@ezimanyi ezimanyi left a comment

Choose a reason for hiding this comment

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

Latest changes look good, except one comment below.

Copy link
Contributor

@ezimanyi ezimanyi left a comment

Choose a reason for hiding this comment

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

Looks good!

@Jammy-Louie Jammy-Louie merged commit b04520b into spinnaker:master Jun 27, 2019
@scottfrederick scottfrederick deleted the config-server-files branch June 27, 2019 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants