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

Added secret handler #42

Merged
merged 1 commit into from Jan 10, 2019

Conversation

Projects
None yet
4 participants
@bartsmykla
Copy link
Member

bartsmykla commented Jan 4, 2019

Signed-off-by: Bart Smykla bsmykla@vmware.com

Description

Added secret handler

Added:

  • POST (create secret)
  • GET (get all secrets with label informing, that they are
      managed by openfaas, because we don't want to return secrets,
      which are not related to openfaas)
  • PUT (modify the secret - which will be returning only
      status 500, because secrets in Docker Swarm are immutable,
      so they cannot be changed)
  • DELETE (delete the secret)

Motivation and Context

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

Fixes: #41

How Has This Been Tested?

It was tested by calling the secret endpoints via CURL and looking
if intended action was done.

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.
Show resolved Hide resolved handlers/secrets.go Outdated
Show resolved Hide resolved handlers/secrets.go Outdated
Show resolved Hide resolved handlers/secrets.go Outdated

@alexellis alexellis requested a review from rgee0 Jan 4, 2019

@alexellis alexellis referenced this pull request Jan 6, 2019

Closed

Implement secrets handler #41

@alexellis alexellis requested a review from LucasRoesler Jan 6, 2019

Show resolved Hide resolved handlers/secrets.go Outdated
Show resolved Hide resolved handlers/secrets.go Outdated
Show resolved Hide resolved handlers/secrets.go Outdated
@ivanayov

This comment has been minimized.

Copy link
Member

ivanayov commented Jan 7, 2019

I don't know if there's an agreement not to support secret rm. This would be useful/needed when a secret is wrongly created or needs update.

Show resolved Hide resolved handlers/secrets.go Outdated
@alexellis
Copy link
Member

alexellis left a comment

Great start to this work @bartsmykla - please see comments from @LucasRoesler @ivanayov and myself. When do you think you could complete the work by?

@bartsmykla bartsmykla force-pushed the bartsmykla:feature/secret-handler branch 4 times, most recently from 77b8cb0 to 1a29db0 Jan 8, 2019

Show resolved Hide resolved handlers/secrets.go Outdated

@bartsmykla bartsmykla force-pushed the bartsmykla:feature/secret-handler branch 3 times, most recently from c0cc47d to 476ca80 Jan 8, 2019

Show resolved Hide resolved handlers/secrets.go Outdated
Show resolved Hide resolved handlers/secrets.go Outdated

@bartsmykla bartsmykla force-pushed the bartsmykla:feature/secret-handler branch 5 times, most recently from 948f29a to c08fbcc Jan 8, 2019

Show resolved Hide resolved handlers/secrets.go Outdated
Show resolved Hide resolved handlers/secrets.go Outdated
Show resolved Hide resolved handlers/secrets.go Outdated

@alexellis alexellis removed the request for review from rgee0 Jan 10, 2019

@bartsmykla bartsmykla force-pushed the bartsmykla:feature/secret-handler branch from c08fbcc to 8f63868 Jan 10, 2019

Added secret handler
Added:
- POST (create secret)
- GET (get all secrets with label informing, that they are
  managed by openfaas, because we don't want to return secrets,
  which are not related to openfaas)
- PUT (modify the secret - which will be returning only
  status 500, because secrets in Docker Swarm are immutable,
  so they cannot be changed)
- DELETE (delete the secret)

It was tested by calling the secret endpoints via CURL and looking
if intended action was done.

Signed-off-by: Bart Smykla <bsmykla@vmware.com>

@bartsmykla bartsmykla force-pushed the bartsmykla:feature/secret-handler branch from 8f63868 to 63814fa Jan 10, 2019

@bartsmykla

This comment has been minimized.

Copy link
Member

bartsmykla commented Jan 10, 2019

@alexellis can you review it again? @LucasRoesler maybe you could also have a look?

@bartsmykla bartsmykla changed the title WIP: Added secret handler Added secret handler Jan 10, 2019

@alexellis alexellis merged commit 16e9827 into openfaas:master Jan 10, 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 10, 2019

Hi @bartsmykla I see it says that you've tested this so I'm going to merge and release.

Let me know if there are any issues with this going to users?

Alex

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