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

Port secrets management from OF Operator #344

Merged
merged 2 commits into from Jan 9, 2019

Conversation

Projects
None yet
2 participants
@LucasRoesler
Copy link
Member

LucasRoesler commented Jan 6, 2019

Description

Motivation and Context

  • I have raised an issue to propose this change (required)

Resolves #342

How Has This Been Tested?

This has been manually tested in a local cluster via Docker-for-Mac and unit tests have been added for the handler

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Port secrets management from OF Operator
**What**
- Port the secrets anagement handler from the OF Operator project
- Add happy path unit test for the secrets handler

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>

switch r.Method {
case http.MethodGet:
selector := fmt.Sprintf("%s=%s", secretLabel, secretLabelValue)

This comment has been minimized.

@alexellis

alexellis Jan 8, 2019

Member

Please could you create a new method to prevent this handler making maintenance harder?

i.e. func listSecrets(w http.Response, r *http.Request) would be fine.

This comment has been minimized.

@LucasRoesler

LucasRoesler Jan 9, 2019

Member

@alexellis please take a look, I split it out. let me know if i should restructure it a little more.

Refactor secrets handler logic into sub-handlers
**What**
- Create independent handler methods for each support http method

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>

@LucasRoesler LucasRoesler changed the title [WIP] Port secrets management from OF Operator Port secrets management from OF Operator Jan 9, 2019

@alexellis

This comment has been minimized.

Copy link
Member

alexellis commented Jan 9, 2019

LGTM

@alexellis alexellis merged commit ab9b56c into openfaas:master Jan 9, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@alexellis

This comment has been minimized.

Copy link
Member

alexellis commented Jan 9, 2019

@LucasRoesler thank you!

Note: additional RBAC permissions are needed to manage secrets. We need them in yaml and helm for faas-netes.

@LucasRoesler

This comment has been minimized.

Copy link
Member

LucasRoesler commented Jan 10, 2019

Damn, just realized that you merged this already, I just pushed the RBAC changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment