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

Create pull secrets for kubernetes #81

Merged
merged 2 commits into from Mar 7, 2019

Conversation

Projects
None yet
3 participants
@viveksyngh
Copy link
Member

viveksyngh commented Mar 4, 2019

Create secrets to pull function images from private docker registry
for kubernetes.

Fixes: #80

Signed-off-by: Vivek Singh viveks@akamai.com

Description

How Has This Been Tested?

I have tested this on my OpenFaaS cluster with a private repository on docker hub for my function.

http://system.vs.team-serverless.xyz/dashboard/viveksyngh/

Function Repo:
https://github.com/viveksyngh/private-func

Checklist:

I have:

  • checked my changes follow the style of the existing code / OpenFaaS repos
  • updated the documentation and/or roadmap in README.md
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests

@viveksyngh viveksyngh force-pushed the viveksyngh:pull_secret branch from a90baf4 to dc51519 Mar 4, 2019

Create pull secrets for kubernetes
This commit creates secrets to pull function images from private docker registry
for kubernetes.

Fixes: #80

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>

@viveksyngh viveksyngh force-pushed the viveksyngh:pull_secret branch from dc51519 to 95878b7 Mar 4, 2019

Change from secrets to imagePullSecrets
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>

@alexellis alexellis requested a review from stefanprodan Mar 5, 2019

@alexellis
Copy link
Member

alexellis left a comment

This looks as I would expect, I'm going to ping @stefanprodan to take a look.

@stefanprodan
Copy link
Member

stefanprodan left a comment

LGTM,

I would not create a script file for patching, but it's not that important.

@@ -0,0 +1,3 @@
#!/bin/bash

kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "registry-secret"}]}' -n openfaas-fn

This comment has been minimized.

@stefanprodan

stefanprodan Mar 5, 2019

Member

I would move this command in go, same as you did with the secrets commands.

This comment has been minimized.

@alexellis

alexellis Mar 5, 2019

Member

Thank you for taking a look. Other than running this through Go rather than a shell script, the approach seems sound?

This comment has been minimized.

@stefanprodan

stefanprodan Mar 5, 2019

Member

We assume the local docker config has been configure with the OF registry but this could not be the case. The alternative would be to ask for a url/user/pass with a command prompt.

This comment has been minimized.

@alexellis

alexellis Mar 7, 2019

Member

That's true. The instructions in the README and dev-guide for OpenFaaS Cloud mandate that you've run docker login. It's one of the easiest ways to pre-populate the data.

@alexellis
Copy link
Member

alexellis left a comment

We may want to tweak some parts in the future, but this addresses the issue. 👍

@alexellis alexellis merged commit eead3bc into openfaas-incubator:master Mar 7, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.