Skip to content

Latest commit

 

History

History
 
 

hello-world-dotnet

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Sample Function Dotnet

Run on OpenFunction

  1. Install OpenFunction
  2. Refer to the go function sample

Definition of a Function for dotnet is shown below:

apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
  name: dotnet-sample
spec:
  version: "v1.0.0"
  image: "<your registry name>/sample-dotnet-func:v1"
  imageCredentials:
    name: push-secret
  build:
    builder: "openfunction/gcp-builder:v1"
    env:
      GOOGLE_FUNCTION_TARGET: "helloworld"
      GOOGLE_FUNCTION_SIGNATURE_TYPE: "http"
    srcRepo:
      url: "https://github.com/OpenFunction/samples.git"
      sourceSubPath: "functions/knative/hello-world-dotnet"
      revision: "release-0.6"
  serving:
    template:
      containers:
        - name: function # DO NOT change this
          imagePullPolicy: IfNotPresent 
    triggers:
      http:
        port: 8080