forked from OpenFunction/samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request OpenFunction#121 from wanjunlei/main
update function API version to v1beta2
- Loading branch information
Showing
32 changed files
with
649 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
apiVersion: core.openfunction.io/v1beta1 | ||
apiVersion: core.openfunction.io/v1beta2 | ||
kind: Function | ||
metadata: | ||
name: sample-go-app | ||
namespace: default | ||
spec: | ||
version: "v1.0.0" | ||
image: "openfunctiondev/sample-go-app:v1" | ||
imageCredentials: | ||
name: push-secret | ||
#port: 8080 # default to 8080 | ||
build: | ||
builder: openfunction/buildah:v1.23.1 | ||
srcRepo: | ||
url: "https://github.com/OpenFunction/samples.git" | ||
sourceSubPath: "apps/buildah/go" | ||
revision: "main" | ||
shipwright: | ||
strategy: | ||
name: buildah | ||
kind: ClusterBuildStrategy | ||
name: buildah | ||
srcRepo: | ||
revision: main | ||
sourceSubPath: apps/buildah/go | ||
url: https://github.com/OpenFunction/samples.git | ||
image: openfunctiondev/sample-go-app:v1 | ||
imageCredentials: | ||
name: push-secret | ||
serving: | ||
runtime: knative | ||
template: | ||
containers: | ||
- name: function | ||
imagePullPolicy: IfNotPresent | ||
|
||
- imagePullPolicy: IfNotPresent | ||
name: function | ||
triggers: | ||
http: | ||
port: 8080 | ||
version: v1.0.0 | ||
workloadRuntime: OCIContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,34 @@ | ||
apiVersion: core.openfunction.io/v1beta1 | ||
apiVersion: core.openfunction.io/v1beta2 | ||
kind: Function | ||
metadata: | ||
name: sample-java-app | ||
namespace: default | ||
spec: | ||
version: "v1.0.0" | ||
image: "openfunctiondev/sample-java-app:v1" | ||
imageCredentials: | ||
name: push-secret | ||
#port: 8080 # default to 8080 | ||
build: | ||
builder: openfunction/buildah:v1.23.1 | ||
srcRepo: | ||
url: "https://github.com/OpenFunction/samples.git" | ||
sourceSubPath: "apps/buildah/java" | ||
revision: "main" | ||
shipwright: | ||
strategy: | ||
name: buildah | ||
kind: ClusterBuildStrategy | ||
name: buildah | ||
srcRepo: | ||
revision: main | ||
sourceSubPath: apps/buildah/java | ||
url: https://github.com/OpenFunction/samples.git | ||
image: openfunctiondev/sample-java-app:v1 | ||
imageCredentials: | ||
name: push-secret | ||
serving: | ||
runtime: knative | ||
template: | ||
containers: | ||
- name: function | ||
imagePullPolicy: IfNotPresent | ||
|
||
- imagePullPolicy: IfNotPresent | ||
name: function | ||
resources: {} | ||
triggers: | ||
http: | ||
port: 8080 | ||
route: | ||
gatewayRef: | ||
name: openfunction | ||
namespace: openfunction | ||
version: v1.0.0 | ||
workloadRuntime: OCIContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
apiVersion: core.openfunction.io/v1beta1 | ||
apiVersion: core.openfunction.io/v1beta2 | ||
kind: Function | ||
metadata: | ||
name: sample-java-app-buildpacks | ||
namespace: default | ||
spec: | ||
version: "v1.0.0" | ||
image: "openfunction/sample-java-app-buildpacks:v1" | ||
imageCredentials: | ||
name: push-secret | ||
port: 8080 # default to 8080 | ||
build: | ||
builder: "cnbs/sample-builder:alpine" | ||
builder: cnbs/sample-builder:alpine | ||
srcRepo: | ||
url: "https://github.com/buildpacks/samples.git" | ||
sourceSubPath: "apps/java-maven" | ||
revision: "main" | ||
revision: main | ||
sourceSubPath: apps/java-maven | ||
url: https://github.com/buildpacks/samples.git | ||
image: openfunction/sample-java-app-buildpacks:v1 | ||
imageCredentials: | ||
name: push-secret | ||
serving: | ||
runtime: "knative" # default to knative | ||
template: | ||
containers: | ||
- name: function | ||
imagePullPolicy: IfNotPresent | ||
- imagePullPolicy: IfNotPresent | ||
name: function | ||
resources: {} | ||
triggers: | ||
http: | ||
port: 8080 | ||
version: v1.0.0 | ||
workloadRuntime: OCIContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
apiVersion: core.openfunction.io/v1beta1 | ||
apiVersion: core.openfunction.io/v1beta2 | ||
kind: Function | ||
metadata: | ||
name: function-kaniko | ||
namespace: default | ||
spec: | ||
version: "v1.0.0" | ||
image: "openfunctiondev/sample-kankio-go:latest" | ||
imageCredentials: | ||
name: push-secret | ||
#port: 8080 # default to 8080 | ||
build: | ||
builder: openfunction/kaniko-executor:v1.7.0 | ||
srcRepo: | ||
url: "https://github.com/OpenFunction/samples.git" | ||
sourceSubPath: "apps/with-dockerfile" | ||
revision: "main" | ||
shipwright: | ||
strategy: | ||
name: kaniko | ||
kind: ClusterBuildStrategy | ||
name: kaniko | ||
srcRepo: | ||
revision: main | ||
sourceSubPath: apps/buildah/go | ||
url: https://github.com/OpenFunction/samples.git | ||
image: openfunctiondev/sample-kankio-go:latest | ||
imageCredentials: | ||
name: push-secret | ||
serving: | ||
runtime: knative | ||
template: | ||
containers: | ||
- name: function | ||
imagePullPolicy: Always | ||
- imagePullPolicy: Always | ||
name: function | ||
resources: {} | ||
triggers: | ||
http: | ||
port: 8080 | ||
version: v1.0.0 | ||
workloadRuntime: OCIContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,30 @@ | ||
apiVersion: core.openfunction.io/v1beta1 | ||
apiVersion: core.openfunction.io/v1beta2 | ||
kind: Function | ||
metadata: | ||
name: function-ko | ||
namespace: default | ||
spec: | ||
version: "v1.0.0" | ||
image: "openfunctiondev/sample-ko:latest" | ||
imageCredentials: | ||
name: push-secret | ||
#port: 8080 # default to 8080 | ||
build: | ||
builder: golang:1.17 | ||
srcRepo: | ||
url: "https://github.com/OpenFunction/samples.git" | ||
sourceSubPath: "apps/with-dockerfile" | ||
revision: "main" | ||
shipwright: | ||
strategy: | ||
name: ko | ||
kind: ClusterBuildStrategy | ||
name: ko | ||
srcRepo: | ||
revision: main | ||
sourceSubPath: apps/buildah/go | ||
url: https://github.com/OpenFunction/samples.git | ||
image: openfunctiondev/sample-ko:latest | ||
imageCredentials: | ||
name: push-secret | ||
serving: | ||
runtime: knative | ||
template: | ||
containers: | ||
- name: function | ||
imagePullPolicy: Always | ||
- imagePullPolicy: Always | ||
name: function | ||
resources: {} | ||
triggers: | ||
http: | ||
port: 8080 | ||
version: v1.0.0 | ||
workloadRuntime: OCIContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 49 additions & 45 deletions
94
functions/async/bindings/cron-input-kafka-output/cron-input-kafka-output.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,66 @@ | ||
apiVersion: core.openfunction.io/v1beta1 | ||
apiVersion: core.openfunction.io/v1beta2 | ||
kind: Function | ||
metadata: | ||
name: cron-input-kafka-output | ||
annotations: | ||
plugins: | | ||
pre: | ||
- plugin-custom | ||
- plugin-example | ||
post: | ||
- plugin-custom | ||
- plugin-example | ||
namespace: default | ||
spec: | ||
version: "v2.0.0" | ||
image: openfunctiondev/cron-input-kafka-output:v1 | ||
imageCredentials: | ||
name: push-secret | ||
build: | ||
builder: openfunction/builder-go:latest | ||
env: | ||
FUNC_NAME: "HandleCronInput" | ||
FUNC_CLEAR_SOURCE: "true" | ||
# # Use FUNC_GOPROXY to set the goproxy if failed to fetch go modules | ||
# FUNC_GOPROXY: "https://goproxy.cn" | ||
FUNC_NAME: HandleCronInput | ||
# # Use FUNC_GOPROXY to set the goproxy if failed to fetch go modules | ||
# FUNC_GOPROXY: "https://goproxy.cn" | ||
srcRepo: | ||
url: "https://github.com/OpenFunction/samples.git" | ||
sourceSubPath: "functions/async/bindings/cron-input-kafka-output" | ||
revision: "main" | ||
revision: main | ||
sourceSubPath: functions/async/bindings/cron-input-kafka-output | ||
url: https://github.com/OpenFunction/samples.git | ||
image: openfunctiondev/cron-input-kafka-output:v1 | ||
imageCredentials: | ||
name: push-secret | ||
serving: | ||
template: | ||
containers: | ||
- name: function # DO NOT change this | ||
imagePullPolicy: IfNotPresent | ||
runtime: "async" | ||
inputs: | ||
- name: cron | ||
component: cron | ||
outputs: | ||
- name: sample | ||
component: kafka-server | ||
operation: "create" | ||
bindings: | ||
cron: | ||
metadata: | ||
- name: schedule | ||
value: '@every 2s' | ||
type: bindings.cron | ||
version: v1 | ||
metadata: | ||
- name: schedule | ||
value: "@every 2s" | ||
kafka-server: | ||
ignoreErrors: false | ||
initTimeout: "" | ||
metadata: | ||
- name: brokers | ||
value: kafka-server-kafka-brokers:9092 | ||
- name: topics | ||
value: sample-topic | ||
- name: consumerGroup | ||
value: bindings-with-output | ||
- name: publishTopic | ||
value: sample-topic | ||
- name: authRequired | ||
value: "false" | ||
type: bindings.kafka | ||
version: v1 | ||
metadata: | ||
- name: brokers | ||
value: "kafka-server-kafka-brokers:9092" | ||
- name: topics | ||
value: "sample-topic" | ||
- name: consumerGroup | ||
value: "bindings-with-output" | ||
- name: publishTopic | ||
value: "sample-topic" | ||
- name: authRequired | ||
value: "false" | ||
hooks: | ||
post: | ||
- plugin-custom | ||
- plugin-example | ||
pre: | ||
- plugin-example | ||
- plugin-custom | ||
outputs: | ||
- dapr: | ||
name: kafka-server | ||
operation: create | ||
type: bindings.kafka | ||
template: | ||
containers: | ||
- imagePullPolicy: IfNotPresent | ||
name: function | ||
triggers: | ||
dapr: | ||
- name: cron | ||
type: bindings.cron | ||
version: v2.0.0 | ||
workloadRuntime: OCIContainer |
Oops, something went wrong.