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

Add knative serving v1alpha1 to generate CRD command #638

Merged
merged 2 commits into from May 11, 2019

Conversation

Projects
None yet
2 participants
@alexellis
Copy link
Member

commented May 11, 2019

Description

Add knative serving v1alpha1 to generate CRD command

Motivation and Context

This commit adds the ability to generate a knative serving
definition from the Function Store or a stack.yaml file with
a basic definition including: namespace, name, env-vars and
image.

Allows OpenFaaS images and the function store to be deployed to Knative

How Has This Been Tested?

Tested with Istio on Packet.net using figlet.

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.

alexellis added some commits May 11, 2019

Generate CRD from store images
This feature adds the support for deploying to the operator using
a CRD from the Function Store. A new flag --from-store can be
passed that allows for matching upon the name. It means we can now
easily deploy figlet and similar functions to the operator through
CRDs.

Tested with new unit tests and manual testing to generate a CRD
positive / negative testing using the strings figlet / filgets.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
Add knative serving v1alpha1 to generate CRD command
This commit adds the ability to generate a knative serving
definition from the Function Store or a stack.yaml file with
a basic definition including: namespace, name, env-vars and
image.

Tested with Istio on Packet.net using figlet.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>

@alexellis alexellis requested a review from stefanprodan May 11, 2019

@alexellis

This comment has been minimized.

Copy link
Member Author

commented May 11, 2019

Following:

faas-cli generate --api serving.knative.dev/v1alpha1 \
   --from-store figlet

Gave:

apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
  name: figlet
  namespace: openfaas-fn
spec:
  runLatest:
    configuration:
      revisionTemplate:
        spec:
          container:
            image: functions/figlet:0.13.0

Screenshot 2019-05-11 at 11 43 51

Inspired by my work in April

https://gist.github.com/alexellis/5c1587cf24b634f940764427d50719bf

@stefanprodan
Copy link
Member

left a comment

LGTM

@alexellis alexellis merged commit b42d070 into master May 11, 2019

2 checks passed

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

@alexellis alexellis deleted the alexellis/generate-knative-serving branch May 11, 2019

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.